Hardware Reference
In-Depth Information
N
decimal
N
binary
N
signed mag.
N
1's compl.
N
2's compl.
N
excess 128
1
00000001
10000001
11111110
11111111
01111111
2
00000010
10000010
11111101
11111110
01111110
3
00000011
10000011
11111100
11111101
01111101
4
00000100
10000100
11111011
11111100
01111100
5
00000101
10000101
11111010
11111011
01111011
6
00000110
10000110
11111001
11111010
01111010
7
00000111
10000111
11111000
11111001
01111001
8
00001000
10001000
11110111
11111000
01111000
9
00001001
10001001
11110110
11110111
01110111
10
00001010
10001010
11110101
11110110
01110110
20
00010100
10010100
11101011
11101100
01101100
30
00011110
10011110
11100001
11100010
01100010
40
00101000
10101000
11010111
11011000
01011000
50
00110010
10110010
11001101
11001110
01001110
60
00111100
10111100
11000011
11000100
01000100
70
01000110
11000110
10111001
10111010
00111010
80
01010000
11010000
10101111
10110000
00110000
90
01011010
11011010
10100101
10100110
00100110
100
01100100
11100100
10011011
10011100
00011100
127
01111111
11111111
10000000
10000001
00000001
128 Nonexistent
Nonexistent Nonexistent
10000000
00000000
Figure A-7. Negative 8-bit numbers in four systems.
ferent singularity. The bit pattern consisting of a 1 followed by all 0s is its own
complement. The result is to make the range of positive and negative numbers
unsymmetric; there is one negative number with no positive counterpart.
The reason for these problems is not hard to find: we want an encoding system
with two properties:
1. Only one representation for zero.
2. Exactly as many positive numbers as negative numbers.
The problem is that any set of numbers with as many positive as negative numbers
and only one zero has an odd number of members, whereas m bits allow an even
number of bit patterns. There will always be either one bit pattern too many or one
bit pattern too few, no matter what representation is chosen. This extra bit pattern
can be used for
0 or for a large negative number, or for something else, but no
matter what it is used for it will always be a nuisance.
 
 
Search WWH ::




Custom Search