Conservative Logic

Physics runs on conservation laws. Energy is never created or destroyed; electric charge is never created or destroyed; in a game of billiards, balls bounce and scatter but their number never changes. Ordinary logic gates ignore all this — an AND gate happily takes in two 1s and emits one, as if a particle had quietly evaporated. In 1982, Ed Fredkin and Tommaso Toffoli published a manifesto for doing better. Their framework, conservative logic, asks computation to respect a conservation law of its own: treat every 1 as an indestructible token. Gates may move tokens around; they may never mint or melt one.

Under that discipline a circuit stops looking like a factory that manufactures answers and starts looking like a railway yard: a fixed population of tokens flows in on wires, gets routed — steered, swapped, redirected — and flows out again, rearranged into the answer. Computation becomes pure traffic control.

The conservative primitive

Which gates are allowed in this world? A gate qualifies if every truth-table row has as many 1s in its output as in its input. NOT fails immediately (it turns a 0-token into a 1-token from nothing). The Toffoli gate fails too — its row 110 \to 111 creates a third token out of thin air. But the Fredkin gate passes with honours: a controlled swap can only ever relocate tokens between tracks.

And here is the punchline of the last lesson, reread through conservative eyes: the Fredkin gate, plus constant inputs, builds AND, OR, NOT and fan-out — all of Boolean logic. So the conservative world is not a poorer world. One routing gate is a universal conservative primitive: everything computable is computable by swaps alone, with every token accounted for from the first wire to the last.

Fredkin and Toffoli pushed the physical picture to its logical extreme: make the tokens literal billiard balls, rolling along grooves and bouncing off each other and off mirrors, with a Fredkin gate built out of nothing but collisions. That construction — the billiard-ball computer — gets its own lesson in the cellular-automata module.

Dual-rail encoding: every bit gets a token

One irritation remains. A logical 0 is the absence of a token — and you cannot route an absence. The fix is a small masterpiece called dual-rail encoding: represent each logical bit by a pair of rails carrying exactly one token between them.

Now both logical values are physical presences, and every logical bit contributes exactly one token, always. A machine for n logical bits has 2n rails carrying exactly n tokens, no matter what it is computing. Any Boolean function — even 1-heavy monsters like "output eleven 1s" — becomes conservative once its inputs and outputs are dual-rail encoded: the function's answer is written in where the tokens are, not in how many there are. Two delicious bonuses:

Why a physicist smiles at this

Conservative logic is reversibility taken one step closer to the hardware. A reversible gate promises "no information is destroyed"; a conservative gate promises, on top, "no stuff is created or destroyed." That extra promise is what lets bits be embodied by things nature already conserves — charge packets shuttled between capacitors, photons switched between waveguides, balls on a table. The gate then needs no mechanism for making or unmaking signal; its only job is steering, and steering is exactly the kind of thing that can, in the ideal limit, be done without dissipation. The billiard-ball fantasy makes the point vividly: collisions are elastic, so between friction and measurement nothing about the computation requires spending energy at all.

Because everything a signal can be made of is conserved. Deep theorems tie physics' conservation laws to its symmetries — energy to time, momentum to space, charge to a subtler one — and a computer is built out of exactly the stuff those laws govern. A gate that "outputs a 1 from nothing" is, at the hardware level, an obligation: somewhere a driver must inject fresh charge, and somewhere else the old charge must be dumped — usually as heat into the ground rail. That dumping is where the microscopic bill for ordinary logic gets paid, erasure by erasure. A conservative circuit sidesteps the whole transaction: the tokens that leave are the tokens that arrived, so in the ideal limit nothing needs injecting and nothing needs dumping. The conservation law is not decoration — it is the design principle that lets the electricity bill approach zero.

It is easy to blur the two words; keep them apart. Reversible means the truth table is a permutation — no information lost. Conservative means every row preserves the count of 1s — no tokens lost. Neither implies the other! NOT is perfectly reversible but not conservative (it turns 0 into 1). And a silly two-bit gate mapping 01 \to 01, 10 \to 01 conserves the count in every row yet is hopelessly irreversible — two pasts, one present. The gates this framework prizes, Fredkin first among them, are the ones that keep both promises at once: permutations that also conserve tokens.