Comparison Table
The following table shows the positive and negative integers that can be represented using 4 bits.
Decimal | Unsigned | Sign and magnitude | Ones' complement | Two's complement | Excess-7 (biased) | Base −2 |
---|---|---|---|---|---|---|
+16 | ||||||
+15 | 1111 | |||||
+14 | 1110 | |||||
+13 | 1101 | |||||
+12 | 1100 | |||||
+11 | 1011 | |||||
+10 | 1010 | |||||
+9 | 1001 | |||||
+8 | 1000 | 1111 | ||||
+7 | 0111 | 0111 | 0111 | 0111 | 1110 | |
+6 | 0110 | 0110 | 0110 | 0110 | 1101 | |
+5 | 0101 | 0101 | 0101 | 0101 | 1100 | 0101 |
+4 | 0100 | 0100 | 0100 | 0100 | 1011 | 0100 |
+3 | 0011 | 0011 | 0011 | 0011 | 1010 | 0111 |
+2 | 0010 | 0010 | 0010 | 0010 | 1001 | 0110 |
+1 | 0001 | 0001 | 0001 | 0001 | 1000 | 0001 |
+0 | 0000 | 0000 | 0000 | 0000 | 0111 | 0000 |
−0 | 1000 | 1111 | ||||
−1 | 1001 | 1110 | 1111 | 0110 | 0011 | |
−2 | 1010 | 1101 | 1110 | 0101 | 0010 | |
−3 | 1011 | 1100 | 1101 | 0100 | 1101 | |
−4 | 1100 | 1011 | 1100 | 0011 | 1100 | |
−5 | 1101 | 1010 | 1011 | 0010 | 1111 | |
−6 | 1110 | 1001 | 1010 | 0001 | 1110 | |
−7 | 1111 | 1000 | 1001 | 0000 | 1001 | |
−8 | 1000 | 1000 | ||||
−9 | 1011 | |||||
−10 | 1010 | |||||
−11 |
Read more about this topic: Signed Number Representations
Famous quotes containing the words comparison and/or table:
“We teach boys to be such men as we are. We do not teach them to aspire to be all they can. We do not give them a training as if we believed in their noble nature. We scarce educate their bodies. We do not train the eye and the hand. We exercise their understandings to the apprehension and comparison of some facts, to a skill in numbers, in words; we aim to make accountants, attorneys, engineers; but not to make able, earnest, great- hearted men.”
—Ralph Waldo Emerson (18031882)
“Language was vigorous because, because ... editors usually laid all the cards on the table so as to leave their hands ... free for more persuasive arguments! The citizenry at large retaliated as best they could.”
—State of Utah, U.S. public relief program (1935-1943)