Digital logic in five-minute pieces
Each guide ends with a circuit you can open in the simulator and a matching practice puzzle. Read them in order if you are new; dip in anywhere if you are not.
- 1. NAND is all you need
One gate type builds every other gate. Make NOT, AND, OR and XOR out of nothing but NANDs.
- 2. Half adders and full adders
How a computer adds: the sum bit, the carry bit, and chaining them into a whole number.
- 3. The multiplexer
A switch made of gates. Select one of two signals with a third, and see why it is everywhere.
- 4. Latches and flip-flops
How a loop of gates remembers a bit, why clocks matter, and what a JK flip-flop does.
Cheat sheet
| Gate | Output is 1 when | Symbol in formulas |
|---|---|---|
| NOT | the input is 0 | NOT A |
| AND | both inputs are 1 | A AND B |
| OR | at least one input is 1 | A OR B |
| XOR | exactly one input is 1 | A XOR B |
| NAND | not both inputs are 1 | NAND(A, B) |
| NOR | both inputs are 0 | NOR(A, B) |
| XNOR | the inputs are equal | XNOR(A, B) |
In the simulator, open inputs read as 0, a wire shows green when it carries a 1, and a loop that never settles shows a yellow X.