Signmagnitude
Sign-magnitude is a method for representing signed integers in binary by separating a sign from the magnitude. In an n-bit word, the most significant bit serves as the sign: 0 indicates nonnegative values and 1 indicates negative values. The remaining n−1 bits store the magnitude, which ranges from 0 to 2^(n−1)−1. As a result, the representable set is from −(2^(n−1)−1) to +(2^(n−1)−1), plus two distinct representations of zero: +0 (sign 0, magnitude 0) and −0 (sign 1, magnitude 0).
Example (4-bit sign-magnitude): +3 is 0 011, −3 is 1 011; +7 is 0 111, −7 is
Arithmetic with sign-magnitude numbers is not as straightforward as with two’s complement. Adding numbers requires handling
Compared with two’s complement and one’s complement, sign-magnitude representation is less convenient for hardware arithmetic. Two’s