A
k-bit one’s-compliment value is a (
k - 1)-bit binary
number. Positive numbers appear as they usually do with a leftmost
(high-order, most significant) 0 bit appended. Negative values are the one’s
compliment of the positive value. For example, the 6-bit one’s-compliment binary value 011111 is 31, and the the 6-bit one’s-compliment binary value 111111 is 0, and -31 is the one’s-bit compliment of
31, or 100000.
In contrast, a k-bit two’s-compliment binary number interprets the
left-most k-1 bits as a (k-1)-bit binary number and the rightmost bit
as the value -2k - 1. For example, the 6-bit two’s-compliment
binary value 011111 is 31, and the the 6-bit two’s-compliment binary
value 111111 is -26 - 1 + 31 = -32 + 31 = -1.
This page last modified on 2006 January 24.