- With 16 bits, -33 is represented by
1111 1111 1101 1111 - Given
*n*bits, there are

2^{n-1}- 1 possible positive numbers,

2^{n-1}possible negative numbers, and 1 zero - Two's complement allows arithmetic to be implemented very efficiently in hardware.
- Addition does not have to be concerned with the sign(s) of the numbers, and subtraction can be implemented by complementing the subtrahend and then adding.
- Multiplication can be implemented without regard to the sign of either number with only minor amendments, and similarly for division.
- The most significant bit can still be viewed as a sign bit since a given bit string represents a negative number
if and only if the leading bit is one.

CS1104 Main Page

Last Updated 01/05/2000

© L.Heath, 2000