- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
Cha2. Addition and Subtraction of Binary I Cha2. Addition and Subtraction of Binary II Cha2: Representation of Negative Numbers III Cha2: Representation of Negative Numbers IV Cha2: Representation of Negative Numbers V Cha2: Representation of Negative Numbers VI Cha2: Representation of Negative Numbers VII 数制与编码.基数补码表示法(补码的进一步理解) 数制与编码.基数补码表示法(补码的进一步理解2) 为什么引入补码 数制与编码.二进制补码加减法(1) 数制与编码.二进制补码的加减法(2) 数制与编码.二进制补码的加减法(3) 数制与编码.二进制补码加减法(4) 数制与编码.二进制补码的加减法溢出(overflow)判定(1) 数制与编码.二进制补码的加减法溢出(overflow)判定(2) 数制与编码.二进制补码的加减法溢出(overflow)判定(3) * * 原则: 逢二进一(加) 借一当二(减) 1 1 1 1 1 1 1 0 0 1 0 0 1 1 1 0 1 0 1 0 1 1 1 0 1 0 0 1 0 0 1 0 1 1 0 0 1 0 1 0 1 0 1 1 0 1 1 0 0 0 0 0 0 0 0 0 bi Di ci Si yi xi ci-1/bi-1 (i-1)’s Carry/Borrow Augend/Minuend Addend/Subtrahend Sum carry difference borrow 无符号加减 电子科技大学光电信息学院 陈德军 EX9: 1 0 0 1 1 0 0 1 0 1 1 1 1 0 0 1 + 0 0 1 1 0 0 0 0 1 1 1 0 1 0 1 0 1 1 逢2进1 153 + 121 274 1 0 0 1 1 0 0 1 0 1 1 1 1 0 0 1 - 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 借1当2 153 - 121 32 2 2 电子科技大学光电信息学院 陈德军 Signed-magnitude system: A symbol (+ or -) + magnitude——原码 S-M码 EX: Decimal: +98 –53 –100 +56 S M The S –M of binary numbers: S:定义在最高有效位(MSB) 0=正+ 1=负- M:数值位 magnitude 电子科技大学光电信息学院 陈德军 EX: +410= 01002 + Signed -410= 11002 - Signed (4-bit) +410= 000001002 -410= 100001002 (8-bit) +12710=011111112 -12710=111111112 010=000000002=100000002 +0 -0 绝对值相同的两数的原码数值位相同 符号-数值不能直接应用于加减运算 电子科技大学光电信息学院 陈德军 Two’s-Complement Representation(补码): positive:=S-M system 符号位0二进制数值码 negative: 符号位1二进制数值码逐位取反加1 The position of Sign of Two ‘s Complement (MSB) can regard as a weight : -2n-1——补码概念的体现 Positive: “0”+magnitude; Negative: “1”+radix-complement Two’s complement can +- operation directly; One’s Complement Representation(反码): positive:=S-M system 符号位0二进制数值码 negative: 符号位1二进制数值码逐位取反 基数减1补码 补码 -1 电子科技大学光电信息学院 陈德军 EX9: Write 8-bit sign-magnitude, two’s complement, and one’s complement representation for each decimal nubmber -9910 S-M 2’ complement 1’ completment1 0011
文档评论(0)