二进制编码的十进制码.ppt

  1. 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
  2. 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  3. 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
* 2 Number Systems, Operations, and Codes * Contents Number Systems: Decimal Numbers Binary Numbers Hexadecimal Numbers Binary Arithmetic Code Systems (the principal focus) Binary Coded Decimal (BCD) 2-1 2-2 Number Systems (数制) a. Decimal Number System(十进制) 143.75=1*102+4*101+3*100+7*10-1+5*10-2 D= ? ki10i b. Binary Number System(二进制) (101.11)2=1*22+0*21+1*20+1*2-1+1*2-2=(5.75)10 D= ? ki2i D= ? kiNi N=Weight(权) (自学) 幂的读法 2-3 Decimal-to-Binary Conversion 情况一:十进制整数 (Whole-Number Conversions) 方法:十进制整数除以2,直到商为0,余数 即为二进制数。 Repeated Division-by-2 Method: Divide the decimal number by 2 until the quotient is 0.Remainders form the binary number. * (自学) 解:根据上述原理,可将(37)D按如下的步骤转换为二进制数 由上得 (37)D=(100101)B 例: 将十进制数(37)D转换为二进制数。 思考:当十进制数较大时,有什么方法使转换过程简化? 解:由于27为128,而133-128=5=22+20, 例: 将(133)D转换为二进制数 所以对应二进制数b7=1,b2=1,b0=1,其余各系数均为0,所以得 (133)D=B * 2-3 Decimal-to-Binary Conversion 情况二:十进制小数 (Fractional-Number Conversions) 方法:十进制小数乘以2,直到小数部分为0或直到达到所需的小数位数。 Multiply each resulting fractional part of the product by 2 until the fractional product is 0 or until the desired number of decimal places is reached. Carries produce the binary number. 举例: 1. P22 0.39×2 = 0.78 b-1= 0 0.78×2 = 1.56 b-2= 1 0.56×2 = 1.12 b-3= 1 0.12×2 = 0.24 b-4= 0 0.24×2 = 0.48 b-5= 0 0.48×2 = 0.96 b-6 = 0 0.96×2 = 1.92 b-7 = 1 0.92×2 = 1.84 b-8 = 1 0.84×2 = 1.68 b-9 = 1 0.68×2 = 1.36 b-10= 1 所以 例 将十进制小数(0.39)D转换成二进制数,要求其误差不大于2-10 * 2-4 Binary Arithmetic (二进制的算术运算) Binary addition (二进制加法) The four basic rules for adding binary digits(bits) are as follows: 0+0=0 Sum of 0 with a carry of 0 和为0,进位为0 0+1=1 Sum of 1 with a carry of 0 1+0=1 Sum of 1 with a carry of 0 1+1=10 Sum of 0 with a carry of 1 carry Ex: Add 1010 and 0101. 2-4 Binary Arithmetic (二进制的算术运算) Binary Subtraction(二进制减法) 0-0=0 1-1=0 1-0=1 10-1=1 0-1 with a bo

您可能关注的文档

文档评论(0)

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

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

1亿VIP精品文档

相关文档