1 / 17
文档名称:

2-2二进制运算-课件【PPT讲稿】.ppt

格式:ppt   页数:17页
下载后只包含 1 个 PPT 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

2-2二进制运算-课件【PPT讲稿】.ppt

上传人:2768573384 2016/5/19 文件大小:0 KB

下载得到文件列表

2-2二进制运算-课件【PPT讲稿】.ppt

文档介绍

文档介绍:Cha. Addition and Subtraction of Binary I 原则: 逢二进一(加) 借一当二(减) b iD ic iS iy ix ic i- /b i- (i-) ’ s Carry/Borrow Augend /Minuend Addend/Subtrahend Sum carry difference borrow 无符号加减电子科技大学光电信息学院陈德军 Cha. Addition and Subtraction of Binary II EX : + 逢进 + - 借当 - 电子科技大学光电信息学院陈德军 Cha: Representation of Negative Numbers III Signed-magnitude system : A symbol (+ or -) + magnitude ——原码 S-M 码 EX : Decimal: + – – + SM The S – M of binary numbers : S:定义在最高有效位( MSB ) = 正+= 负- M:数值位 magnitude 电子科技大学光电信息学院陈德军 Cha: Representation of Negative Numbers IV EX : + = + Signed - = - Signed ( -bit ) + = - = ( -bit ) + = - = = = + & - 绝对值相同的两数的原码数值位相同符号-数值不能直接应用于加减运算电子科技大学光电信息学院陈德军 Cha: Representation of Negative Numbers V Two ’ plement Representation( 补码):? positive : =S-M system 符号位 &二进制数值码 negative : 符号位 &二进制数值码逐位取反加 The position of Sign of Two ‘ plement (MSB) can regard as a weight : - n-——补码概念的体现 Positive: “”+magnitude; Negative: “”+plement Two ’ plement can +&- operation directly; One ’ plement Representation( 反码):? positive : =S-M system 符号位 &二进制数值码 negative : 符号位 &二进制数值码逐位取反基数减 补码补码- 电子科技大学光电信息学院陈德军 Cha: Representation of Negative Numbers VI EX : Write -bit sign-magnitude , two ’ plement , and one ’ s complement representation for each decimal nubmber - S-M ’ complement ’ completment 逐位取反取反加 + 正数不变- 忽略+ , -补码统一电子科技大学光电信息学院陈德军 Cha: Representation of Negative Numbers VII A shot cut to find the two ’ plement : 从右边数出现的第一个“”(包括第一个“”)不变,其余的都取反, 符号位不变