Half adder

Add two single bits and see the carry pop out. A ready-made arithmetic circuit you can open in the TorchAnvil simulator.

Adding one bit to one bit

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.

How it works

The trick is in the two gates:

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

Why it's called "half"

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.

Try this