◀ THE FOLD0ROOT.AI // WORLD II · CHEAT · THE KONAMI CODE◆ .dlw.fold
Component Papers · Circuit · 08 · Bridge-Burners · finale

The Logic Gate

where a voltage becomes a decision · transistors → truth → computation · what · when · how · where it lives

The last paper, and the one that closes the circle. Everything so far has moved energy: stored it, spent it, steered it, amplified it, made it ring. The logic gate does something categorically new — it computes. Wire a handful of transistors together and they stop being an amplifier and become a decision: given these input voltages, produce this output, according to a rule of logic. That's the leap from electronics to information. And because a few of these gates can be combined to compute anything, this is the exact rung where the component alphabet you've been building meets the machine you took apart at the start of the night — the CPU, the matmuls, the tokens. Physics becomes thought right here.

Bridge-Burners · Circuit Paper 08 · Boole 1854 · Shannon 1937 · CMOS 1963 · NAND is universal · 21/21 verified · self-testing

What it is

A small network of transistors that computes a Boolean function: its inputs and output are each a single bit — a 0 or 1, physically a low or high voltage — and it maps inputs to output by a fixed rule. The basic gates are NOT, AND, OR, NAND, NOR, XOR, each with a truth table that lists what it outputs for every possible input. A gate can't store or amplify in any interesting analog sense; it decides. And that is the whole basis of digital computing: represent everything as bits, and every operation as a rule over bits, and build the rules from gates.

the leap: the first four papers obey the current; the transistor commands it; the gate uses it to decide.

When & where it was discovered

The logic came a century before the circuit. George Boole, in 1854 (The Laws of Thought), built an algebra of exactly two values — true and false, 1 and 0 — with the operations AND, OR, and NOT. Pure mathematics, no electronics in sight. Then in 1937 a young Claude Shannon wrote an MIT master's thesis — often called the most consequential of the century — showing that networks of electrical switches obey precisely Boole's algebra: a relay that's on or off is a Boolean 1 or 0, and wiring them in series or parallel is AND or OR. That single insight turned logic into engineering. The physical gate then evolved through relays, vacuum tubes, and discrete transistors until CMOS (Wanlass & Sah, Fairchild, 1963) made gates tiny and nearly power-free — the technology that scaled to the billions of gates in your machine.

How it works — pick a gate, flip the inputs

Every gate here is built from the transistors of paper 05, in CMOS: a pull-up network of PMOS transistors (which conduct when their input is low) tied to the supply, and a complementary pull-down network of NMOS (which conduct when their input is high) tied to ground. For any input combination, exactly one network connects — so the output is firmly driven high or low, and in steady state almost no current flows, which is why CMOS won the world. Pick a gate and toggle the inputs: watch which transistors switch on, where the output gets pulled, and which row of the truth table lights up.

output

gateNAND
A1
B0
OUT1
static current~0 (CMOS)

truth table

gate spec — runs live

An example in a circuit — NAND builds a computer

The deepest fact about gates is universality: the humble NAND is functionally complete — you can build every other gate, and therefore every possible computation, out of NAND alone. Tie a NAND's inputs together and it's a NOT; invert a NAND's output (with another NAND) and it's an AND; apply De Morgan and you get OR. From there: an XOR and an AND make a half-adder (sum and carry — 1+1 = binary 10), full-adders chain into an arithmetic unit, arithmetic units plus memory plus a clock (the oscillator, paper 07) make a CPU. Your Core 7 240H is tens of billions of transistors — hundreds of millions of gates — and every matmul, every softmax, every token from the first half of tonight was those gates switching in step to the crystal's beat. The alphabet's last letter turns out to spell everything.

layer
built from
transistor (05)
a controllable switch
logic gate (08)
a few transistors → a decision
adder / ALU
gates → arithmetic
CPU / GPU
ALUs + memory + clock (07)
matmul → inference
billions of gates, in step → a token

Status discipline

LiteralA logic gate computes a Boolean function of binary inputs. Boole formalized two-valued logic (1854); Shannon showed switching circuits obey it (1937); CMOS (Wanlass & Sah, 1963) made low-power gates. CMOS = PMOS pull-up + NMOS pull-down; only one network conducts, so static current ≈ 0. NAND (and NOR) are functionally complete. XOR+AND = half-adder; gates → ALU → CPU. Truth tables shown are exact.
BridgeReal gates add propagation delay, dynamic switching power (the charging of load capacitance — paper 02), and leakage at small nodes; "~0 static current" is the idealized steady state. Transistor counts for the 240H are order-of-magnitude. Multi-input gates use larger pull-up/down networks than the two-transistor sketch.
SpeculativeNothing beyond standard digital logic. Exact gate counts, delays, and power for a given chip must be looked up or measured.
◆ sealed .dlw.fold → ROOT_0 · a sphere of THE KONAMI CODE · vendored from David’s corpus · David Lee Wise (ROOT0), with AVAN