Binary Addition
Table of Contents
Binary Addition
In Base-10, there are 100 combinations ($0+0$ through $9+9$) to memorize. In binary, it's much simpler. Since we only have two digits (0 and 1), there are only four rules we need to know:
- $0 + 0 = 0$
- $0 + 1 = 1$
- $1 + 0 = 1$
- $1 + 1 = 10$ ("zero, carry one")
Concept of "Carry"
In the decimal system, when you add $9 + 1$, you get $10$. We write down $0$ in the ones place and "carry" the $1$ to the tens place because we ran out of symbols. Binary works exactly the same way, but it happens much more often because we run out of symbols almost immediately.
When we add $1 + 1$ in binary:
- We can't write "2" (there is no symbol for 2).
- The value is two, which is represented as $10$ in binary ($1$ two and $0$ ones).
- So, we write down 0 and carry 1 to the next column.
An Example
Let's try adding two binary numbers: $101$ (Decimal 5) and $011$ (Decimal 3). In the decimal system we expect the result 8($1000$ in binary).
Step 1: Align the columns Just like decimal math, line up the place values.
1 0 1 (5)
+ 0 1 1 (3)
-------
Step 2: Add the Ones column (rightmost) $$1 + 1 = 10$$ We write down 0 and carry the 1 to the Twos column.
1 (Carry)
1 0 1
+ 0 1 1
-------
0
Step 3: Add the Twos column We have $0 + 1$ from the numbers, plus the $1$ we carried over. $$0 + 1 + 1 = 10$$ (Zero plus one is one; one plus one is two, which is $10$). We write down 0 and carry the 1 to the Fours column.
1 1 (Carry)
1 0 1
+ 0 1 1
-------
0 0
Step 4: Add the Fours column We have $1 + 0$ from the numbers, plus the $1$ we carried over. $$1 + 0 + 1 = 10$$ Again, this results in $0$ with a carry.
1 1 1 (Carry)
1 0 1
+ 0 1 1
-------
1 0 0 0
Result: $1000$ Let's check the math: $1000_2$ is $1 \times 8 = 8$. Correct!
Why matters?
This simple addition logic is the foundation of the Arithmetic Logic Unit (ALU) inside every CPU.
When you click a link or edit a photo, the computer is essentially flipping billions of switches using these exact rules. There is no "subtraction" circuit in a basic computer; subtraction is just addition with negative numbers. Multiplication is just repeated addition.
By understanding binary addition, we understand the absolute fundamental operation of computing: combining two states to create a new result.