Microsoft Word - Digital Logic Design v_4_6a

(lily) #1

 RC numbers for n-bit word range from +(2 n-1 – 1) to –(2 n-1) with the following two characteristics:
 The range is not symmetrical, there is one more negative number than there are positive
numbers.
 There is only one pattern for zero (-0 and +0 have the same pattern)


 Example of Binary RC or 2’s Complement Numbers for a 4-bit word


Binary SM Number (n=4) Decimal Number
d3 d2 d1 d
0 1 1 1 + 7 = +(2^4 -^1 -1)
0 1 1 0 + 6
0 1 0 1 + 5
0 1 0 0 + 4
0 0 1 1 + 3
0 0 1 0 + 2
0 0 0 1 + 1
0 0 0 0 + 0
0 0 0 0 - 0
1 1 1 1 - 1
1 1 1 0 - 2
1 1 0 1 - 3
1 1 0 0 - 4
1 0 1 1 - 5
1 0 1 0 - 6
1 0 0 1 - 7
1 0 0 0 -8 == -2^4 -^1

 Quick Inspection Method  Finding 2’s complement
 Working from the LSB of the number to be complemented toward the MSB (right to left),
rewrite each bit up to and including the first “1” encountered, then complement each bit
thereafter
 Example:
MSB LSB
Old Number: (1 0 1 1 0 1 0)
2’s Complement: (0 1 0 0 1 1 0)


**Note: 2’s complement gets you back to the original number.

(+5) 10 = (0 1 0 1 )2RC


( -5) 10 = -(0 1 0 1)2RC^


Bit-invert  1 0 1 0
Add 1  + 1
-----------
2’s Compl.  (1 0 1 1)2RC

One Sign Bit
0  +
1  -

3 Magnitude Bit
Free download pdf