Binary Addition (Cambridge (CIE) IGCSE Computer Science) : Revision Note
Adding Positive 8-bit Binary Integers
Examiner Tips and Tricks
Cambridge IGCSE 0478 expects you to add 8-bit binary values using clear working, with carries shown. These examples match the style and format used in the real exam.
What is binary addition?
Binary addition is the process of adding together two binary integers (up to and including 8 bits)
To be successful there are 5 golden rules to apply:
Binary Addition | Binary Answer | Working | ||||||
---|---|---|---|---|---|---|---|---|
0 + 0 = | 0 |
| ||||||
0 + 1 = | 1 |
| ||||||
1 + 0 = | 1 |
| ||||||
1 + 1 = | 10 |
| ||||||
1 + 1 + 1 = | 11 |
|
Like denary addition, start from the rightmost digit and move left
Carrying over occurs when the sum of a column is greater than 1, passing the excess to the next left column
Example 1
Add together the binary values 1001 and 0100
8 | 4 | 2 | 1 | + |
---|---|---|---|---|
1 | 0 | 0 | 1 | |
0 | 1 | 0 | 0 | |
|
|
|
| C |
|
|
|
|
|
Starting from right to left, add the two binary values together applying the 5 golden rules
If your answer has 2 digits, place the rightmost digit in the column and carry the remaining digit to the next column on the left
In this example, start with 1+0, 1+0 = 1, so place a 1 in the column
8 | 4 | 2 | 1 | + |
---|---|---|---|---|
1 | 0 | 0 | 1 | |
0 | 1 | 0 | 0 | |
|
|
|
| C |
|
|
| 1 |
|
Repeat until all columns have a value
8 | 4 | 2 | 1 | + |
---|---|---|---|---|
1 | 0 | 0 | 1 | |
0 | 1 | 0 | 0 | |
|
|
|
| C |
1 | 1 | 0 | 1 |
|
The sum of adding together binary 1001 (9) and 0100 (4) is 1101 (13)
Examiner Tips and Tricks
You can earn marks just for showing carries correctly, even if your final answer is wrong. Always show your carry bits clearly above or below your sum—examiner reports say it matters.
Example 2
Add together the binary values 00011001 and 10001001
128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 | + |
---|---|---|---|---|---|---|---|---|
0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | |
1 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | |
|
|
|
|
|
|
|
| C |
|
|
|
|
|
|
|
|
|
Starting from right to left, add the two binary values together applying the 5 golden rules
If your answer has 2 digits, place the rightmost digit in the column and carry the remaining digit to the next column on the left
In this example, start with 1+1, 1+1 = 10, so place a 0 in the column and carry the 1 to the next column
128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 | + |
---|---|---|---|---|---|---|---|---|
0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | |
1 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | |
|
|
|
|
|
| 1 |
| C |
|
|
|
|
|
|
| 0 |
|
Repeat until all columns have a value
128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 | + |
---|---|---|---|---|---|---|---|---|
0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | |
1 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | |
|
| 1 | 1 |
|
| 1 |
| C |
1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 |
|
The sum of adding together binary 00011001 (25) and 10001001 (137) is 10100010 (162)
Overflow & Binary Addition
What is an overflow error?
An overflow error occurs when the result of a binary addition exceeds the available bits
For example, if you took binary 11111111 (255) and tried to add 00000001 (1) this would cause an overflow error as the result would need a 9th bit to represent the answer (256)
256 | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 | + |
---|---|---|---|---|---|---|---|---|---|
| 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | |
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | |
1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
| C |
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
|
Examiner Tips and Tricks
If the next question asks what error has occurred, it's probably testing overflow. Look for sums that go over 255—Cambridge loves this trick.
You've read 0 of your 5 free revision notes this week
Unlock more, it's free!
Did this page help you?