A logic gate is a tiny machine with switches in and one lamp out, following one fixed rule: AND lights only if both switches are on, OR if either is. Chain millions together, each lamp flipping the next gate's switch, and you get a computer.
Most people think a computer makes intelligent decisions. In fact it only makes billions of trivial ones (AND, OR, NOT) and nothing smarter is ever added; a whole CPU is just more of them, better arranged.
What's actually happening
In 1854, George Boole worked out an algebra where the only values are true and false — pure philosophy, with no machine in sight. Ninety years later it turned out to be the perfect blueprint for electronics: "true" is a high voltage, "false" a low one, and a handful of transistors can compute AND, OR, or NOT. A logic gate is Boole's algebra cast in silicon: inputs in, one rule applied, answer out, billions of times per second.
The gates compose. Feed gate outputs into gate inputs and the rules compound into arithmetic: an XOR gives you the sum digit of two bits, an AND gives you the carry — together they're a "half-adder", the first cell of real addition. Chain eight of those and you can add bytes; add memory loops (two NOR gates glaring at each other) and the circuit can remember. From there, step by step, you reach a CPU. Nothing smarter than AND/OR/NOT ever gets added — just more of them, better arranged.
The strangest fact in the field: one gate type suffices. Every other gate can be built from NANDs alone — NOT is a NAND with its inputs tied, AND is a NAND plus that NOT, and so on. A modern chip is, in a real sense, one idea repeated twenty billion times. The Apollo Guidance Computer that landed humans on the Moon was built almost entirely from a single 3-input NOR gate design — proof that with enough of one simple decision, you can navigate to another world.
Chain enough dead-simple yes/no gates together and you get a computer — the Apollo guidance computer flew to the Moon on essentially one repeated gate.
- 1Get two coins (your input bits: heads = 1) and a friend, and add two one-bit numbers: 0+0, 0+1, 1+0, 1+1.
- 2You compute the XOR (call out 1 if the coins differ) — that's the sum digit. Your friend computes the AND (1 only for two heads) — that's the carry.
- 3Check 1+1: you say 0, your friend says 1 → binary "10" = two. You have, between you, performed the fundamental act of all computer arithmetic.
Common questions
Combining gates compounds their rules. An XOR gate gives the sum digit of two bits and an AND gives the carry; together they form a half-adder, the first cell of real addition. Chain eight and you can add whole bytes.
Yes. NAND is functionally complete — every other gate can be made from NANDs alone, so a modern chip is essentially one idea repeated billions of times. The Apollo computer used almost entirely a single NOR-gate design.
George Boole worked out an algebra of true and false in 1854, as pure philosophy. Ninety years later it became the blueprint for electronics, with "true" as a high voltage and "false" as a low one.