This method also uses the most significant bit (the one on the far left) to represent the sign of a number; if 0, the number is positive, if 1, the number is negative. For positive numbers, the rest of the bits are used to determine the number’s decimal magnitude. This method reverses the sign of a number by determining its two’s complement. Therefore, the decimal magnitude of a negative number equals the magnitude of its two’s complement.
The two’s complement of a number is determined as shown. Clearly, the two’s complement of a number can also be determined by adding 1 to the one’s complement of that number.
Compared to the other two methods, only one representation exists for the number 0 and the range of negative numbers is increased. This is the method mostly used, since it simplifies the making of a computer’s arithmetic unit. |