What is Binary Addition?
You already know how to add numbers in decimal (base 10), where the digits go from 0 to 9. Binary addition works the same way, but there are only two digits: 0 and 1. This is called base 2.
Because there are only two digits, you "carry over" much sooner than in decimal.
The Four Rules of Binary Addition
There are only four possible combinations when adding two binary digits:
| A | B | Sum | Carry |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 1 |
The key rule to remember: 1 + 1 = 10 in binary (which equals 2 in decimal). The result is 0 with a carry of 1.
When you carry in binary, you are carrying a value of 2 to the next column, just like carrying a value of 10 to the next column in decimal arithmetic.
A Step-by-Step Example
Let's add 0110 (6) and 0011 (3) in binary.
0110
+ 0011
------
Work from right to left, column by column:
- Column 1 (rightmost): 0 + 1 = 1. Write 1, carry 0.
- Column 2: 1 + 1 = 10. Write 0, carry 1.
- Column 3: 1 + 0 + 1 (carry) = 10. Write 0, carry 1.
- Column 4: 0 + 0 + 1 (carry) = 1. Write 1, carry 0.
Result: 1001 — which equals 9 in decimal. Check: 6 + 3 = 9. Correct!
Overflow
Overflow happens when the result of a binary addition is too large to fit in the number of bits available. For example, if a computer stores numbers in 4 bits (maximum value 15), adding 1110 (14) and 0011 (3) would give 10001 (17), but the 5th bit has nowhere to go. This can cause errors in programs.
Overflow is a real problem in computer science. Programmers must choose data types with enough bits to hold the largest value their program will ever need.
Why Does This Matter?
Every calculation your computer performs — adding scores in a game, calculating a bank balance, processing a photo — is ultimately done in binary at the hardware level. Understanding binary addition helps you understand how CPUs work at their most fundamental level.
Practice Problems
Add the binary numbers 0101 and 0110. Show your working and convert the result to decimal.
Show answer
A computer uses 4-bit storage. What is the largest number it can hold, and what happens if you try to add 1 to it?