The hardware course
From one NAND gate to a working computer
Fifteen steps, each adding exactly one idea: gates from NAND, adders from gates, the ALU, sequential logic, RAM, the machine specification, its language, the assembler, the CPU, and the screen and keyboard that turn it into something you can play with.
01Why universal?Why a machine that only adds is not enough, and what a stored program buys.→02Basic gatesNOT, AND, OR, XOR from NAND; then multiplexers, in one bit and in sixteen.→03AddersHalf adder, full adder, 16-bit adder, incrementer, and the ALU that follows.→04ALUSix control bits choose an operation; the flags report zero and negative.→05SequentialCombinational logic forgets. A clock and a latch are what let a value persist.→06RAMFrom one register to 16K words: decoding an address into a load signal.→07SpecWhat the machine promises: memory map, registers, instruction width.→08Machine languageSixteen bits, two formats: address instructions and compute instructions.→09AssemblySymbols, labels and two passes: why a forward jump needs the second one.→10CPUFetch, decode, execute: the control bits wired to the parts that obey them.→11ComputerROM, RAM, CPU and the screen and keyboard mapped into one address space.→12ScreenA memory-mapped bitmap: 8K words, and how a program draws into it.→13KeyboardOne word at address 24576, read in a loop, because there are no interrupts.→·GatesSix basic gates, each with its expression, truth table and symbol.→·LayersThe same NAND as algebra, as a gate, as CMOS, and as a relay contact.→
The sequence follows the nand2tetris projects, but the pages are written from scratch: every chip is introduced as the answer to a problem the previous page left open.