![]() |
VOOZH | about |
In computer systems, binary numbers use only two symbols: 0 and 1. Unlike decimal numbers, binary numbers cannot include a plus (+) or minus (-) symbol directly to denote positive or negative values. Instead, negative binary numbers are represented using specific methods that incorporate a special bit or flag called the sign bit or sign flag.
The sign bit indicates the sign of the number:
In computing, representing negative numbers is crucial for performing arithmetic operations such as subtraction and handling signed data. Several methods have been devised to achieve this, including Signed Magnitude, 1’s Complement, and 2’s Complement, each with its own advantages and limitations.
Below are the three primary methods to represent signed binary numbers, along with their ranges and characteristics:
We only add an extra sign bit to recognize negative and positive numbers. Sign bit has 1 for negative number and 0 for positive number.
👁 Signed Magnitude methodRange of Numbers for Signed Magnitude
For n bits register, MSB will be sign bit and (n-1) bits will be magnitude. Then, Negative lowest number that can be stored is -(2(n-1)-1)and positive largest number that can be stored is (2(n-1)-1). But, this (sign) representation has an ambiguous representation of number 0. It means 0 has two different representation one is -0 (e.g., 1 00000 in six bit register) and second is +0 (e.g., 0 00000 in six bit register).
👁 Signed Magnitude MethodPlease note that MSB is always Sign bit, if it 0, then there are no changes. MSB is always 1 in case of negative numbers. We only take 1’s complement of negative numbers to represent in the computer.
👁 1’s Complement MethodRange of Numbers for 1’s Complement Method
For n bits register, negative lowest number that can be stored is -(2(n-1)-1) and positive largest number that can be stored is (2(n-1)-1) . But, this (sign) representation has an ambiguous representation of number 0. It means 0 has two different representations one is -0 (e.g., 1 1111 in five bit register) and second is +0 (e.g., 0 0000 in five bit register).
👁 1’s Complement MethodPlease note that MSB is always Sign bit, if it 0, then there are no changes. MSB is always 1 in case of negative numbers. We only take 2’s Complement of negative numbers to represent in the computer.
👁 2’s Complement MethodSince, there is only one representation of +0 and -0, so this 2’s complement representation is better than sign representation and 1’s complement representation.
👁 2’s Complement MethodRange of Numbers for 2’s complement
For n bits register,negative lowest number that can be stored is -(2(n-1)) and positive largest number that can be stored is (2(n-1)-1).
Among the three methods discussed, 2’s Complement is the most widely used for representing negative binary numbers due to its simplicity, unique zero representation, and efficient arithmetic operations. While Signed Magnitude and 1’s Complement have historical significance, they are rarely used in modern computing