1 1. Computer Systems / Binary Addition


Binary Addition
Before you attempt to follow this page, please make sure that you have read through and understood the binary introduction page here.
Adding Binary Numbers
Human beings are comfortable with the idea of performing addition with Denary numbers e.g. 4 + 5 = 9
It is equally possible to add Binary numbers e.g. 0100 + 0101 = 1001
Once you are comfortable with the steps involved with adding binary numbers you might even find it easier than adding denary numbers!
It is equally possible to add Binary numbers e.g. 0100 + 0101 = 1001
Once you are comfortable with the steps involved with adding binary numbers you might even find it easier than adding denary numbers!
How to add Binary Numbers
To add binary numbers you need to first of all remember 4 key rules these are:
Rule 1 = 0 + 0 = 0
Rule 2 = 1 + 0 = 1
Rule 3 = 1 + 1 = 10 (0 below & carry the 1)
Rule 4 = 1 + 1 + 1 = 11 (1 below & carry the second 1)
This may initially be confusing so lets try to put it into a different context with an example.
Lets say that we have been asked to add two simple binary numbers: 10 + 11 (2 + 3).
Rule 1 = 0 + 0 = 0
Rule 2 = 1 + 0 = 1
Rule 3 = 1 + 1 = 10 (0 below & carry the 1)
Rule 4 = 1 + 1 + 1 = 11 (1 below & carry the second 1)
This may initially be confusing so lets try to put it into a different context with an example.
Lets say that we have been asked to add two simple binary numbers: 10 + 11 (2 + 3).
Worked Example 1
In this example we ended with the binary number 101 which converts into 5. 2 + 3 = 5 so we can confirm that our addition worked, Yay!.
The same process applies for larger numbers. The only thing omitted from the previous example was the use of rule 4. Lets take a look at slightly larger numbers that will require us to use rule 4.
Worked Example 2
Step 3  Now move to the next column to the left. In this column we now actually have 3 numbers to add due to the carried over 1. We have to add 1 + 0 + 1. The 0 will not really affect this so we essentially have to add 1 + 1. According to Rule 3 we should place a 0 in the answer column and carry a 1 over to the next column.

As long as you follow these 4 rules and work methodically through each column of the addition then you will be able to add together any binary numbers.
The CAIE IGCSE specification specifies that the largest numbers that you will need to add together is two 8 bit binary numbers e.g.
10110000 + 01001010
The CAIE IGCSE specification specifies that the largest numbers that you will need to add together is two 8 bit binary numbers e.g.
10110000 + 01001010
Binary Addition with Overflow
Calculations such as the addition of binary numbers are performed in registers of a limited size. A register may have a capacity of 8 bits which means that it has the capability of holding 8 bits.
The size of a register will have a crucial impact on the success of an addition. If you are using an 8 bit register, the largest number that it is going to be able to store is 255. This is achieved when all digits are set to 1.
The problem?
What would occur if you attempted to add two 8 bit binary numbers where the result would be larger than 255?
Lets attempt to add 200 in binary with 178 as an example.
11001000 + 10110010 = ?
The size of a register will have a crucial impact on the success of an addition. If you are using an 8 bit register, the largest number that it is going to be able to store is 255. This is achieved when all digits are set to 1.
The problem?
What would occur if you attempted to add two 8 bit binary numbers where the result would be larger than 255?
Lets attempt to add 200 in binary with 178 as an example.
11001000 + 10110010 = ?
Carried 1s 
1 

Value 
1 
1 
O 
O 
O 
O 
O 
O 

+ 
Value 
1 
O 
1 
1 
O 
O 
1 
O 
Result 
1 
O 
1 
1 
1 
O 
O 
1 
O 
As you can see from the working out above 11001000 + 10110010 results in a 9 bit binary number  101110010.
The problem is that we were only able to store the result in an 8 bit register. When this happens it is known as an OVERFLOW error as the Most Significant Bit (MSB) is left out. This will result in an incorrect number being stored in the register.
In this case, the result of the addition would be 01110010 (incorrect) rather than 101110010 (Correct).
The problem is that we were only able to store the result in an 8 bit register. When this happens it is known as an OVERFLOW error as the Most Significant Bit (MSB) is left out. This will result in an incorrect number being stored in the register.
In this case, the result of the addition would be 01110010 (incorrect) rather than 101110010 (Correct).