ssd6复习lecture4

上传人:平*** 文档编号:10604767 上传时间:2017-08-13 格式:PPT 页数:104 大小:3.38MB
返回 下载 相关 举报
ssd6复习lecture4_第1页
第1页 / 共104页
ssd6复习lecture4_第2页
第2页 / 共104页
ssd6复习lecture4_第3页
第3页 / 共104页
ssd6复习lecture4_第4页
第4页 / 共104页
ssd6复习lecture4_第5页
第5页 / 共104页
点击查看更多>>
资源描述

《ssd6复习lecture4》由会员分享,可在线阅读,更多相关《ssd6复习lecture4(104页珍藏版)》请在金锄头文库上搜索。

1、SSD6,Lecture 4Representation of Data,The Contents in iCarnegie cover:2.1Bits and Bit Manipulation 2.2Integers 2.3Floating-Point Numbers 2.4Structured Data,Lecture 3,Representation of Data,We will talk about:Numbering System Alphanumeric ExpressionNumber Expression Structured Data in MemoryLogic Oper

2、ation,Lecture 3,Representation of Data,Lecture 3,Numbering System,十进制(Decimal)数字系统二进制(Binary)数字系统十六进制(Hexadecimal)数字系统,Lecture 3,Numbering System,十进制(Decimal)数字系统以 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 等十个不同符号(symbol)组成人类使用的数字系统: 人有十根指头超过九的数目就必须用多位数元(digits)表示如 : 9+1=10, 99+1=100,Lecture 3,Numbering System,十

3、进制(Decimal)数字系统以10为基底的数字系统(Base 10 number system)不同位置数元代表不同的数量(quantity)小数点左边第一位为 1, 第二位为10, 每个位置所代表的数量为其右边位置所代表的数量之10倍,4 6 2 .7 9,10-2,10-1,102,101,100,Lecture 3,Numbering System,十进制(Decimal)数字系统,4 6 2 .7 9,10-2,10-1,102,101,100,Lecture 3,Numbering System,二进制(Binary)数字系统以 0, 1 两个符号组成数字计算器使用的数字系统:电子

4、开关(晶体管)有两种状态(ON:1, OFF:0)超过一的数目就必须用多位数元(digits)表示如 : 1+1=102, 11+1=1002binary digit (二进制数元) 简称 bit (位),Lecture 3,Numbering System,二进制(Binary)数字系统以2为基底的数字系统(Base 2 number system)不同位置数元代表不同的数量(quantity)小数点左边第一位为 1 , 第二位为2 , 每个位置所代表的数量为其右边位置所代表的数量之2倍,1 0 1 .1 1,2-2,2-1,22,21,20,Lecture 3,Numbering Syst

5、em,二进制(Binary)数字系统,1 0 1 .1 1,2-2,2-1,22,21,20,Lecture 3,Numbering System,十六进制(Hexadecimal)数字系统以 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F 等十六个符号组成符号AF 代表1015超过十五的数目就必须用多位数元(digits)表示如 : F+1=1016, FF+1=10016,Lecture 3,Numbering System,为何要谈十六进制数字系统8个字节成一个字 (byte), 可表现256(28)种不同0/1组合可用十六进制法精简表示一个

6、字的内容下图之内容以二进制表示为101100102 ,以十六进制表示法为B216,B,2,Lecture 3,Numbering System,十六进制(Hexadecimal)数字系统以16为基底的数字系统(Base 16 number system)不同位置数元代表不同的数量(quantity)小数点左边第一位为 1 , 第二位为16, 每个位置所代表的数量为其右边位置所代表的数量之16倍,1 F 5 .4 C,16-2,16-1,162,161,160,Lecture 3,Words & Virtual Address Space,Lecture 3,Numbering System,十

7、六进制(Hexadecimal)数字系统,1 F 5 .4 C,16-2,16-1,162,161,160,Lecture 3,Alphanumeric Data Expre.,字符型 (Alphanumeric)数字表示法ASCII code EBCDIC codeUnicodeGB codeBIG-5 code,Lecture 3,Alphanumeric Data Expre.,ASCII codeAmerican Standard Code for Information Interchange目前最多计算机使用标准ASCII code使用7位来表示128(27)字符集编号 031,

8、127: 控制字符编号 3264: 特殊字符(!, “, #, $, .)及数字字符(0, 1, 9)编号 6590: 大写字母编号 97122: 小写字母,Lecture 3,Alphanumeric Data Expre.,ASCII code table (7 bits),A,例如:“A”的 编号为65: 10000012(4116),Lecture 3,Alphanumeric Data Expre.,8 位 ASCII code共256(28)个不同符号前128字符(编号0127)为标准ASCII code, 利用编号128255描述各种不同字符集例如国际标准组织(ISO)制定标准(

9、ISO 8859-1)来表示西欧语言字母,Lecture 3,Alphanumeric Data Expre.,ASCII code单词 “Pen” 需用三个字节表示内容若用十六进制表示为: 50 65 6E每个字符均有一对应内码(编码), 计算机语言中常会对两字符比大小,此时是利用内码值相比右式会成立 : “A” “B”, “D”0, 0-1)如对1101 执行 not 运算结果是 0010,1 1 0 1,0 0 1 0,1的补码运算,Number Expression,Lecture 3,1的补码表示法(1s complement)正数最前面一位为 0将数值以二进制值表示直接放入其余位中如用16位表示 +5為 00000000 00000101 (000516),Number Expression,Lecture 3,1的补码表示法(1s complement)负数最前面一位为 1将数值之正数以二进制值表示,对其执行1的补码运算后,再将结果放入其余位中,

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 高等教育 > 大学课件

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号