Build a CPU

Step 3 of 9

Half adder

Where arithmetic starts

Add two single bits and there are only four sums: 0+0=0, 0+1=1, 1+0=1, and 1+1=10. That last one needs two digits, which is why this circuit has two outputs.

Sum is the digit you write down. Carry is the one you carry over — exactly what you do adding 7+5 on paper.

You have XOR now, because you built it.

This step builds on the ones before it, and will make a lot more sense after them. Go to Logic gates

Tap a part to add it. Tap an output pin, then the part it feeds. Tap a switch to flip it.

A0 · tap to flipB0 · tap to flipSum—Carry—
Something has an unconnected input. Every input pin needs a wire before the circuit can run.
ABSumCarry
000·0·
011·0·
101·0·
110·1·

Sign in to save your progress. The board works either way.