Two's complement numbers can be added in the exact same way as normal binary numbers. The only difference is that you must always use the same number

r of bits. In the examples above we have always used 4 bits to represent a number. You can not add an 8 bit number to a 4 bit number without converting the 4 bit number to an 8 bit number first. Normally we simply pad out the bits with zeros. However we no longer can use this simple approach. Below describes how we get around this situation.

Look at an example. The number -65 which is represented using an 8 bit number. Its binary representation is -

Positive 65

0

1

0

0

0

0

0

1

2's complement

1

0

1

1

1

1

1

1

Now let's add -6 to it. We already know the two's complement representation of -6 is 1010. In order to add an 8 bit number to a 4 bit number, under the old method, we must pad out the 4 bit number to be 8 bit.

1

0

1

1

1

1

1

1

0

0

0

0

1

0

1

0

However the binary number 0000 1010 is not -6! As such you must take the positive value then convert. So -6, using 8 bits, will be -

Positive 6

0

0

0

0

0

1

1

0

2's complement

1

1

1

1

1

0

1

0

Now we can add -65 to -6

 

1

0

1

1

1

1

1

1

+

1

1

1

1

1

0

1

0

Carry bit

1

1

1

1

1

1

 

 

=

1

0

1

1

1

0

0

1

-65 -6 = -71

We have got the two's complement number of 1011 1001. Converting this we get -

Two's complement

1011 1001

Positive value

0100 0111

Decimal value

71

Final answer

-71

Notice that we never carry over the last carry bit. As such if the result of our addition is larger than what can be represented by 8 bits, we would get what's known as overflow. This basically means we will get the wrong result. As such it is important that you choose the right number of bits for your answer.