Here is the complete list of representations for 3 bits using 2's complement:
Bit pattern Unsigned 2's complement
-------------------------------------------
100 4 -4
101 5 -3
110 6 -2
111 7 -1
000 0 0
001 1 +1
010 2 +2
011 3 +3
Notice that
-
all negatives have a 1 in the first bit.
-
there is only one 0
-
all positive numbers are the same bit patterns for both unsigned and 2's
comp.
-
there is one more negative number than positive numbers (4 negs, 3
positives).
-
the absolute value of the smallest number (4 in this case) is about half
of the absolute value of the largest unsigned number (7). In fact, it is
half of the largest unsigned number plus 1 (7+1=8).
-
the absolute value of the smallest negative will always be 1 greater than
the largest positive.
-
the total number of negative numbers, positive numbers and 0 is always the
same as the total number of unsigned numbers, which is the largest unsigned
number plus 1.
|