正在加载图片...
自学 13宭符号撳的二进恻表杀 o Representation of negative numbers Addition and Subtraction of Non-decimal Numbers ●原码 Sign-Magnitude ●反码Ones' complement ●补码 Two's complement ◆关于 Word-length Common sense…关于数的位数 原唱Sign- Magnitude e Limitation of the word-length or bit ◆原码(sign- magnitude 比特(b)、字节Byte) (011.1101)2 字(Word)、双字( Double Word) 0,011101)2 Quantities ●1Kilo=210 符号位,无数值意义 ●1Mega=20 ●1Giga=230 (-61) +1,011.1101)2 ●1 Totra=240 Ex:硬盘大小 绉 ●乘法运算较方便,加减运算不方便 Profiteer! 原码 Sign-Magnitude sign-Magnitude Arithmetic 0001 0= Different signs 110000111 the larger nu Note two representations for 0 Need a separate adder/subtractor, and treat signs separately6 32 Addition and Subtraction of Non-decimal Numbers 自学 33 ‹ Representation of negative numbers z原码 Sign-Magnitude z反码 Ones’ complement z补码 Two’s complement ‹ 关于Word-length…… 1.3 有符号数的二进制表示 Profiteer ! 34 Common Sense Common Sense …… ‹ Limitation of the word-length or bits z 比特 (bit)、字节(Byte) z 字(Word)、双字(Double Word) ‹ Quantities z 1 Kilo =210 z 1 Mega =220 z 1 Giga =230 z 1 Tetra =240 ‹ Ex:硬盘大小 关于数的位数 35 原码Sign-Magnitude ‹ 原码(sign-magnitude) z(61)10 = ( 011,1101)2 = (0,011,1101)2 z最高位,符号位,无数值意义 (-61)10 = (1,011,1101)2 z乘法运算较方便,加减运算不方便 36 0000 0111 0011 1011 1111 1110 1101 1100 1010 1001 1000 0110 0101 0100 0010 0001 +0 +1 +2 +3 +4 +5 +6 -0 +7 -1 -2 -3 -4 -5 -6 -7 0 100 = + 4 1 100 = - 4 + - Note two representations for 0 1 (2 1) n− Number range for n bits: ± − 原码Sign-Magnitude 37 4 + 3 7 0100 0011 0111 -4 + (-3) -7 1100 1011 1111 Same signs Sign of result is the same as the operands’. 4 - 3 1 0100 1011 0001 -4 + 3 -1 1100 0011 1001 Different signs Sign of result depends on the larger number. Need a separate adder/subtractor, and treat signs separately. Sign-Magnitude Arithmetic
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有