Learn TorchAnvil
A guided curriculum that teaches logic circuits by building them — gates, adders, registers, and a tiny ALU.
- Your first gate — A signal that flips. One lever, one lamp, one surprise.
- Combining two inputs — Two levers, one lamp, four possibilities. Time to make decisions.
- Either one — If any single switch is on, the lamp lights. The friendliest two-input rule.
- Exactly one — Not zero, not both. The rule that picks out "these two disagree".
- Your first adder — Two inputs, two outputs. You're officially doing arithmetic now.
- Carrying forward — Three inputs, two outputs. Now you can chain adders to handle any number of bits.
- Picking with a switch — One selector bit, two data lines, one output. The circuit every CPU uses a million times a second.
- A pocket calculator — Four operations on two bits, selected by two control bits. This is what a CPU does.
- Your first memory — A circuit that remembers what you told it. Welcome to sequential logic.
- Clocked memory — Set the data, pulse the clock, and the bit gets latched. The cell behind every CPU register.
- Counting clock pulses — Pulse the clock, the lamp toggles. The seed of every counter and divider.