XOR from four NANDs
The gate that says "one or the other, not both", built from exactly four NAND gates. It is the heart of every adder you will build next.
Open it in the simulatorStart with one NAND gate, package every circuit you build into a chip, and use your chips to build the next one: an adder, memory, a CPU of your own, and a computer that runs your program.
0 of 23 done
23 lessons in 6 chapters, about 16 hours on a simulated breadboard. Free, in your browser, every step checked by the simulator.
The gate that says "one or the other, not both", built from exactly four NAND gates. It is the heart of every adder you will build next.
Open it in the simulatorTwo 4-bit adders make an 8-bit one: the adder a small computer uses, all 120 NAND gates of it. The end of the first milestone.
Open it in the simulatorEight ALU slices in a carry chain, a zero detector and a carry flag: the ALU the Kestrel CPU computes with.
Open it in the simulatorFour registers with one write port and two read ports: the CPU reads two registers and writes one back, all in the same tick.
Open it in the simulatorA step clock, a program ROM, your Kestrel and a terminal on one canvas: a computer built from NAND gates, running a program you can change.
Open it in the simulatorEach lesson opens when the one before it is done, and each chapter ends in a project.
Make NOT, AND, OR and XOR out of NAND gates, and package each one.
Meet the NAND gate, the only gate you need. Wire it between two switches and a lamp, read its truth table, and see why every other gate can be built from it.
0 of 4 steps
Build a NOT gate out of one NAND, test it against its table, and package it into a chip with your name on it, ready for the next lesson.
0 of 4 steps
Undo the "not" in NAND to make AND, then turn a NAND inside out with two NOTs to make OR. Two chips, both from NAND gates.
0 of 5 steps
The gate that says "one or the other, not both", built from exactly four NAND gates. It is the heart of every adder you will build next.
0 of 4 steps
Build the gates that decide which signal goes where.
A MUX picks one of two inputs with a select bit, and a DEMUX sends one input to one of two outputs. The switchboard of every processor.
0 of 5 steps
Add one bit, then three, then four and eight at once.
Add two bits and get a sum and a carry. The half adder is an XOR and an AND side by side, and it is where arithmetic starts.
0 of 4 steps
Add three bits, the two you are adding and the carry from the column before. Two half adders and an OR make a full adder, the building block of every adder.
0 of 4 steps
Chain four full adders, carry out to carry in, and add two 4-bit numbers. Number switches and a number display show the values in decimal and hex.
0 of 4 steps
Two 4-bit adders make an 8-bit one: the adder a small computer uses, all 120 NAND gates of it. The end of the first milestone.
0 of 5 steps
Choose, count and compute a byte at a time, up to an ALU.
Eight MUX chips side by side, one select line for all of them: a chip that picks one of two bytes. The CPU uses one at every fork in its data.
0 of 4 steps
An 8-bit adder with one input tied to 0 and its carry in tied to 1 adds one to anything. Meet the constant bit, and build the chip a program counter counts with.
0 of 4 steps
Turn a 2-bit number into one of four lines, then a 3-bit number into one of eight, from DEMUX chips. A decoder is how memory finds the one byte a write is for.
0 of 5 steps
An arithmetic logic unit does one of eight jobs, chosen by a 3-bit code. Build one bit of it: an adder that can subtract, four logic gates, and a MUX tree that picks the answer.
0 of 4 steps
Eight ALU slices in a carry chain, a zero detector and a carry flag: the ALU the Kestrel CPU computes with.
0 of 4 steps
Latches, flip-flops, registers, a program counter, RAM and a register file.
Two NAND gates wired into each other remember which one was pushed last. Build the set-reset latch, then the D latch that copies a bit and holds it.
0 of 4 steps
Two D latches, one open while the other is shut, make a flip-flop: it takes its input at the instant the clock rises and at no other time. Everything in a computer moves on that edge.
0 of 4 steps
A flip-flop and a MUX make a bit that loads only when told to. Eight of them make a register, the byte-sized memory every CPU is full of.
0 of 5 steps
A register that adds one to itself on every tick, loads a new value to jump, and clears to 0 on reset. It is how a CPU knows which instruction comes next.
0 of 4 steps
Eight registers, a decoder that sends a write to one of them, and a MUX tree that reads one back: eight bytes of memory you can address.
0 of 4 steps
Four registers with one write port and two read ports: the CPU reads two registers and writes one back, all in the same tick.
0 of 4 steps
Decode instructions, build a CPU, and run your own program on it.
The Kestrel has sixteen instructions. The control unit turns each 4-bit opcode into the signals that steer the ALU, the registers, the memory and the jumps.
0 of 4 steps
The control unit, the register file, the ALU, the RAM and the program counter on one canvas, one instruction a tick. Package it and the tester runs a program on it.
0 of 4 steps
A step clock, a program ROM, your Kestrel and a terminal on one canvas: a computer built from NAND gates, running a program you can change.
0 of 5 steps
All 23 lessons, in order, each with what it covers. Any of them opens in the editor right away.
From gates to a computer is part of the electrical track, a ladder of courses from zero to expert.
Take three working circuits from the breadboard to a finished board: the schematic, footprints, placement, routing, design rules, and what a board house needs.
Open the next courseCurrent and voltage you can see, then transistors, op-amps, filters, power and PCBs. Every circuit runs in a real circuit simulator in your browser.
See every course on the trackEvery lesson runs in the simulator with nothing to buy. When you want the real thing, these kits have the parts.
Pick the starter kit you own and run every lesson in its manual with the same parts on the same pins.
See every kitYes. All 23 lessons of From gates to a computer are free and run in your browser, with nothing to install and no parts to buy before you start.
No. Every circuit is built on a simulated breadboard, and the simulator checks each step as you go. When you want to build it for real, the same parts and wiring work on a real bench.
About 16 hours: 23 lessons in 6 chapters, each one a few short steps. Your progress is kept, so you can stop after any lesson and pick up where you left off.
Each chapter ends in a project that puts it together: XOR from four NANDs, An 8-bit adder, The 8-bit ALU, The register file and Your first computer.
With "The one gate", and each lesson builds on the one before it. New to circuits? Electronics basics is the course that starts from zero.