Half adder
Adding two bits gives a sum bit and a carry bit: 1 + 1 = 10 in binary. The sum is A XOR B, and the carry is A AND B. This is the first step to a computer’s arithmetic unit.

Open this lesson in the labFree, in your browser, no account needed.
How it works
S = A ⊕ B · C = A · B
| A | B | C | S | bench | |
|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | — | |
| 0 | 1 | 0 | 1 | — | |
| 1 | 0 | 0 | 1 | — | |
| 1 | 1 | 1 | 0 | — |
Flip the switches to try every row. “bench” fills in with what the chip actually did.
Read C and S together as a 2-bit number: 1 + 1 gives C S = 1 0, which is two.
Try it on the bench
- Set A = 1 and B = 1: the carry lights and the sum goes out, which is binary 10, or two.
- A half adder has no carry input, so it can only add the lowest bits. The full adder lesson fixes that.
Parts on the bench
- Bench power supply
- DIP switch module
- 74xx86
- 74xx08
- 2 × Logic indicator LED
In the course
Zen’s Electronics Design Mastery, module “Digital Electronics”.