Add two single bits and see the carry pop out. A ready-made arithmetic circuit you can open in the TorchAnvil simulator.
When you add two single bits you can get 0 + 0 = 0, 0 + 1 = 1, 1 + 0 = 1,
or 1 + 1 = 10 — that last case needs a second bit to hold the carry.
A half adder is the smallest circuit that does exactly this: two bits go in,
a Sum bit and a Carry bit come out.
The trick is in the two gates:
1 + 1 correctly rolls back to 0 on the Sum.That's why XOR is sometimes called "addition without carry." Bolt an AND beside it to catch the overflow and you've got the real thing.
| A | B | Sum | Carry |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 1 |
It's a half adder because it can't accept a carry in — only produce one. Wire two half adders together (plus an OR for the carries) and you get a full adder, which is the building block of every multi-bit adder ever built. That's the next sample.
1 + 1 = 10 in silicon.0 + 1 = 01.