How Digital Logic Works
Bits, gates and flip-flops, from AND and OR to circuits that remember.
Everything is a wire that is 0 or 1
A digital circuit is a set of wires, and each wire carries one of two voltages: 0 (low) or 1 (high). Groups of wires side by side form a bus that carries a multi-bit number. Logisim Revisited also tracks two extra states that real hardware has: Z (nothing is driving the wire, so it floats) and E (two drivers disagree, which is a short circuit).
Gates
A gate computes one output bit from its inputs.
| NOT | Inverts its input. 0 becomes 1 and 1 becomes 0. |
|---|---|
| AND | Outputs 1 only if every input is 1. |
| OR | Outputs 1 if at least one input is 1. |
| XOR | Outputs 1 if an odd number of inputs are 1, which for two inputs means they differ. |
| NAND, NOR, XNOR | The AND, OR and XOR gates followed by a NOT. |
NAND alone is enough to build every other gate, which is why real chips lean on it.
Combinational circuits
When the output depends only on the current inputs, the circuit is combinational. Adders, multiplexers and decoders are all combinational. You can describe any of them with a truth table and, from that, a Boolean expression. See the Karnaugh map tutorial for how to make the expression small.
Sequential circuits
Feed a gate's output back to its own input and the circuit can remember. Two cross-coupled NOR gates make an S-R latch; add a clock and you get a flip-flop (S-R Flip-Flop, J-K Flip-Flop, T Flip-Flop, or D Flip-Flop) that only changes on a clock edge. Registers, counters and memories are built from flip-flops.
Try it: open the flip-flop circuit guide or the app, click an input pin with the Poke tool, and watch the wires change color.