4.2: Signed Binary
Eduqas / WJEC
What is Sign and Magnitude and Two's Complement?
Sign and Magnitude and Two's Complement are both methods of writing positive and negative binary values.
Sign and Magnitude is simpler but will cause incorrect answers if used in binary calculations.
Two's Complement is more complex but will generate correct answers when used in binary calculations.
Sign & Magnitude
The most significant bit (MSB) is the largest bit of a binary number - the one furthest to the left.
The MSB is the sign - it represents whether the binary value is positive or negative.
If the sign is 0 then the binary number is positive.
If the sign is 1 then the binary number is negative.
The other bits represent the magnitude - the value of the binary number.
For an 8-bit binary number, the range is -127 to 127, because only 7 bits are used to define the magnitude.
Sign & Magnitude: Problems
Sign and magnitude is not commonly used by computers for two main reasons:
Performing binary addition and subtraction (see section 4.3) will often cause a wrong result.
In the example below, -7 + 3 should equal -4 but the result given is 2.
Sign and magnitude creates two different values for 0 - positive 0 and negative 0 which is incorrect.
Two's complement is a method of representing positive and negative binary values.
It is used often by computers because binary calculations will work correctly and there is only one value for zero.
Two's Complement: Denary to Binary
To represent a negative value using two's complement follow these steps:
Write out the positive value in binary.
Start on the right-hand side and move along, copy all 0s until you get to the first 1. The first 1 is copied too.
After the first 1 invert each value (change to its opposite). So 0 becomes 1 and 1 becomes 0.
Two's Complement: Binary to Denary
To convert a binary number to denary using two's complement you must remember that the MSB is a negative value.
Just add the numbers with 1 together to work out the denary value.
4.2 - Signed Binary:
Sign & Magnitude
1. Using sign and magnitude, convert the following values to denary:
d. 01001111 [1 each]
2. Using sign and magnitude, convert the following values to binary:
d. -24 [1 each]
3. Describe two problems when using sign and magnitude. 
4. Using sign and magnitude, the range of numbers that can be represented in 6 bits is from - 31 to + 31. State the range of numbers that can be represented using sign and magnitude in the following bits:
a. 8 bits
b. 4 bits [1 each]
1. Using two's complement, convert the following values to binary:
d. -113 [2 each]
2. Using two's complement, convert the following values to denary:
d. 10011111 [2 each]