A Half Adder

This lesson builds step by step toward a half adder — a circuit that can add two binary digits.

Step 1

AND → NOT = NAND

Feed the output of an AND gate into a NOT gate. Output is only 0 when both inputs are 1.

A
B
0
AND
1
Q
ABANDQ (NAND)
0001
0101
1001
1110

Step 2

OR → NOT = NOR

An OR gate followed by a NOT. Output is 1 only when both inputs are 0.

A
B
0
OR
1
Q
ABORQ (NOR)
0001
0110
1010
1110

Step 3

AND + OR (three inputs)

A and B feed an AND gate. That result, plus a third input C, feed an OR gate. Q = (A AND B) OR C.

A
B
C
0
A·B
0
Q
ABCA·BQ
00000
00101
01000
01101
10000
10101
11011
11111

Step 4 — the key insight

XOR + AND = half adder

Two inputs, two gates in parallel, two outputs. XOR gives the Sum bit. AND gives the Carry bit.

Why two outputs? Adding 1+1 in binary gives 10 — two digits. Sum is the right digit, Carry is the left. Try it: set both A and B to 1. Sum=0, Carry=1 — that's binary 10, which equals decimal 2.
A
B
0
Sum
0
Carry
ABSum (XOR)Carry (AND)Decimal
00000+0 = 0
01100+1 = 1
10101+0 = 1
11011+1 = 2
Next lesson: Full Adder

Click for Logic Home