Build a CPU
Step 1 of 9
Logic gates
The only parts a computer actually has
Everything a computer does is built from parts that take one or two on/off signals and produce another one. There is nothing underneath this — no arithmetic, no numbers, just switches feeding switches.
You have three to start with. AND turns on only when both of its inputs are on. OR turns on when either one is. NOT flips whatever it is given.
Wire the board so the lamp lights only when both switches are on. Click an output pin, then an input pin, to connect them.
Tap a part to add it. Tap an output pin, then the part it feeds. Tap a switch to flip it.
Something has an unconnected input. Every input pin needs a wire before the circuit can run.
| A | B | Out | |
|---|---|---|---|
| 0 | 0 | 0· | |
| 0 | 1 | 0· | |
| 1 | 0 | 0· | |
| 1 | 1 | 1· |
Sign in to save your progress. The board works either way.