You are on page 1of 1

Sign and Magnitude

The left most bit (one with the greatest value) is called most significant bit.
It is set to 1 for negative and 0 for positive
Eg: For denary value 28 ➔ its binary number 00011100
Using sign and magnitude method ➔ for +28 = 00011100 and for -28 = 10011100
It has an disadvantage in adding two of these
The result of +28 + (-28) will be zero. However, using this method, it got -56. So, 2’complement
method will introduced.

0 0 0 1 1 1 0 0 +28
1 0 0 1 1 1 0 0 -28
1 0 1 1 1 0 0 0 -56

Two’s complement
Method 1 – Reverse Calculation
first write the number as a positive binary value – in this case 28 ➔ 0 0 0 1 1 1 0 0
then invert(flip) each binary value, which means swap the 1s and 0s around: ➔ 1 1 1 0 0 0 1 1
then add 1 to that number: 1
this gives us the binary for −28 ➔ 1 1 1 0 0 1 0 0

Method 2 – Place Value

-128 64 32 16 8 4 2 1
1 1 1 0 0 1 0 0 -28

By adding +28 + (-28) in two’s complement method.

0 0 0 1 1 1 0 0 +28
1 1 1 0 0 1 0 0 -28
0 0 0 0 0 0 0 0 0

Dr.MTK

You might also like