网站大量收购独家精品文档,联系QQ:2885784924

[理学]ch03-Translation.ppt

  1. 1、本文档共99页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
[理学]ch03-Translation

Questions? 用什么来表示十六进制的一位? 0, 1, …, 9, ??? 如何知道一个数是十六进制数? X, x, or (N)16 十六进制数的一位可以用多少位二进制数表示? Questions? 用什么来表示八进制数的一位? 0, 1, 2, 3, 4, 5, 6, 7 如何知道一个数是八进制数? 0, o, or (N)8 八进制数的一位可以用多少位二进制数表示? 取补(complement)?? 考虑一个时钟, 标准时间为4点整,而有一只表已经7点了,为了校准时间,可以采用两种方法:一是将时针退7-4=3个格;一是将时间往前拨12-3=9个格。 7 - 3 = 4 7 + 9 (mod 12)= 4 将减法转换成加法运算 方法二 1.The number is changed to binary; the sign is ignored 忽略符号,将数转换成二进制。 2.0s are added to the left of the number to make a total of N bits. 不足 N 位时,左侧用0 填充至 N位。 3.If the sign is positive, no more action is needed. If the sign is negative, complement the bits and add 1. 正数时不做任何其他操作;负数时,按位取反后加1。 方法二 正数时不做任何操作;负数时按位取反后加1. Floating-Point representation To convert a floating-point number to binary: 1.Convert the integer part to binary. 将整数部分转换成二进制 2.Convert the fraction to binary. 将小数部分转换成二进制 3.Put a decimal point between the two parts. 在两部分中间加上小数点 Example 11 Interpretin decimal if the number was stored as a one’s complement integer. Solution The leftmost bit is 1, so the number is negative. First complement it . The result is The complement in decimal is 9. So the original number was –9. One’s complement means reversing all bits. If you one’s complement a positive number, you get the corresponding negative number. If you one’s complement a negative number, you get the corresponding positive number. If you one’s complement a number twice, you get the original number. Note: Two’s complement is the most common, the most important, and the most widely used representation of integers today. Note: Two’s Complement Format Ranger: -(2 N-1)~ +(2N-1-1) Table 3.7 Range of two’s complement integers # of Bits --------- 8 16 32 -128 -32,768 -2,147,483,648 0

文档评论(0)

hhuiws1482 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

版权声明书
用户编号:5024214302000003

1亿VIP精品文档

相关文档