Binary addition works just like decimal addition, but we only have two digits: 0 and 1. When we add two binary digits, we may need to carry a bit to the next column, just like carrying in decimal addition.
Basic Binary Addition Rules:
0 + 0 = 0 (no carry)
0 + 1 = 1 (no carry)
1 + 0 = 1 (no carry)
1 + 1 = 10 (sum = 0, carry = 1)
Example 1: Simple Binary Addition (No Carry)
101 (5 in decimal)
+ 010 (2 in decimal)
-----
111 (7 in decimal)
Example 2: Binary Addition with Carry
11 (carry bits)
110 (6 in decimal)
+ 011 (3 in decimal)
-----
1001 (9 in decimal)
Key Concept: When we add 1 + 1, we get 0 in the current column and carry a 1 to the next column. This is exactly what adder circuits implement in hardware!
Example 3: Multi-bit Addition with Multiple Carries
1111 (carry bits)
1011 (11 in decimal)
+ 0111 (7 in decimal)
------
10010 (18 in decimal)
2. Half Adder Circuit
A half adder adds two single binary digits (A and B) and produces a sum (S) and a carry (C). It's called "half" because it doesn't account for a carry-in from a previous addition.
Half Adder Truth Table:
A
B
Sum (S)
Carry (C)
0
0
0
0
0
1
1
0
1
0
1
0
1
1
0
1
Logic Equations:
Sum (S) = A ⊕ B (XOR gate) Carry (C) = A · B (AND gate)
Why XOR for Sum? The sum output is 1 only when A and B are different (exclusive OR). Why AND for Carry? The carry output is 1 only when both A and B are 1.
Half Adder Circuit Diagram:
3. Full Adder Circuit
A full adder adds three binary digits: two significant bits (A and B) plus a carry-in (Cin) from a previous addition. This is essential for multi-bit addition where carries propagate through multiple bit positions.
Full Adder Truth Table:
A
B
Cin
Sum (S)
Cout
0
0
0
0
0
0
0
1
1
0
0
1
0
1
0
0
1
1
0
1
1
0
0
1
0
1
0
1
0
1
1
1
0
0
1
1
1
1
1
1
Logic Equations:
Sum (S) = A ⊕ B ⊕ Cin Cout = (A · B) + (A · C) + (B · C) (alternate) Cout = (A · B) + (Cin · (A ⊕ B))
Analysis:
The sum is 1 when an odd number of inputs are 1, which can be
represented by a three-way XOR.
The carry-out is 1 when at least two of the three inputs are 1, which is
a 3-majority circuit. There are two ways to build a majority circuit;
both are shown above.
A full adder can be built using two half adders and an OR gate
Full Adder Circuit Diagram (Using Two Half Adders):
4. Building a Multi-Bit Adder
To add multi-bit binary numbers, we chain multiple full adders together in a ripple-carry adder. The carry-out from each bit position becomes the carry-in for the next higher bit position.
Circuit Structure:
• Bit 0 (LSB): Can use a half adder (no carry-in needed)
• Bits 1-3: Use full adders, each taking the carry from the previous bit
• The final carry-out becomes the MSB of the result (overflow bit)
5. Design Summary
Circuit
Inputs
Outputs
Sum Logic
Carry Logic
Half Adder
A, B
S, C
A ⊕ B
A · B
Full Adder
A, B, Cin
S, Cout
A ⊕ B ⊕ Cin
(A·B) + (Cin·(A⊕B))
6. Practice Questions
Complete the binary addition: 1101 + 1011 = ?
How many full adders are needed to build a 4-bit ripple-carry adder?
Why does the carry output use an AND gate in a half adder?
What happens if you add 1111 + 0001 in a 4-bit adder? (Hint: overflow)
Design a truth table for a circuit that detects when exactly two of three inputs are 1.
7. Next Steps in Your Design
For your circuit implementation:
Start by building and testing a half adder using XOR and AND gates
Verify your half adder against the truth table
Build a full adder using two half adders and an OR gate
Test the full adder with all 8 possible input combinations
Chain multiple full adders to create a 4-bit or 8-bit ripple-carry adder
Consider the propagation delay as carries ripple through the circuit
Tutorial created for AP Computer Science - Digital Logic Design