Although the sign magnitude system is simple it is also inefficient. Why do we need to represent a positive or negative zero? Also we can not easily add positive and negative numbers using this notation. Most computers represent negative numbers using a different system known as two's complement. This representation allows us to add negative numbers easily as well as being able to subtract numbers simply.

Below is the table for two's complement for 4 bit numbers. We shall use this as the basis to explain two's complement.

Decimal

Binary

 

Decimal

Binary

-8

1000

 

0

0000

-7

1001

 

1

0001

-6

1010

 

2

0010

-5

1011

 

3

0011

-4

1100

 

4

0100

-3

1101

 

5

0101

-2

1110

 

6

0110

-1

1111

 

7

0111

We are using 4 bit's to represent a number, as such this is the complete list of all numbers represent able by a 4 bit binary number. From 0 to 7, you should notice, that they are in the notation we are already used to. There should be no issues to retrieve the decimal value from these binary numbers.

The main difference is how we represent negative numbers. What we do is start off with the binary number 1111, which is used to represent -1. We then count backwards until we get to 1000. The diagram on the next page shows how the binary numbers progress from 0000 to 1111. This may seem a bit strange, so let's look at it in a bit more detail.

If we convert a binary number 1111 into decimal, using the normal system, we get the decimal number 15. This is where we are going to start counting backwards from. We know that 1111 represents -1 and to get the next number we must count backwards.

15 - 1 = 14

Binary representation of 14 = 1110

If we compare this to our table and the diagram we see that 1110 represents -2. To get -3 we subtract 1 from 1110 or 14 which is 1101 or 13.