All articles
Articles

Maxwell's demon and the cost of forgetting

A tiny imaginary creature seemed able to cheat the second law of thermodynamics for a century. The way physics finally caught it reveals something startling: information is physical, and it is erasure, not knowledge, that has to be paid for in heat.

A gas box split by a trapdoor that sorts fast molecules to one side and slow ones to the other, beside a note that erasing one bit releases at least kT ln2 of heat
The demon sorts hot from cold for free, until you ask what its memory costs. Erasing a single bit of that memory releases at least kT·ln2 of heat, and the ledger balances after all.

In 1867 the physicist James Clerk Maxwell invented a creature to needle his own discipline. Picture a box of gas at a uniform temperature, divided in two by a wall with a tiny trapdoor. A microscopic, sharp-eyed being, later christened a “demon”, watches the molecules approach. When a fast one flies toward the door from the left, it opens the door and lets it through to the right; when a slow one comes from the right, it lets it pass to the left. Slowly, sorting one molecule at a time, the demon gathers the fast (hot) molecules on one side and the slow (cold) ones on the other.

That sounds harmless until you notice what it means. The demon has created a temperature difference out of a box that started perfectly uniform, and it did so, apparently, without spending any energy, just by deciding which molecules to wave through. A temperature difference is usable: you can run an engine off it. The demon looks like a free lunch, and a free lunch in thermodynamics is heresy. It seems to violate the second law, the rule that says, in an isolated system, disorder (entropy) never spontaneously decreases. For more than a century this little thought experiment sat there like a splinter, daring physics to explain why the trick can’t actually work.

A bit of information is worth real energy

The first crack in the puzzle came from the Hungarian physicist Leó Szilárd in 1929. He stripped the demon down to its barest possible form: a box with a single molecule in it. The demon looks to see which half the molecule is in: left or right. That is exactly one bit of information: a yes/no, a 0 or a 1. Armed with that one bit, the demon can insert a piston on the empty side and let the molecule, bouncing around, push the piston out. The gas does work; you have extracted useful energy from a single molecule’s random motion, paid for with a single measurement.

Szilárd’s quiet bombshell was the exchange rate. He showed that one bit of information about the molecule is worth a definite, calculable amount of work, set by the temperature of the surroundings. This is the first time anyone put a price on information in the currency of energy. A bit is not an abstraction floating above the physical world; it buys a specific quantity of joules. The demon was no longer free. It was running a business, and someone, somewhere, had to be paying.

But who? Szilárd showed information could be cashed in for work; he had not yet found the hidden cost that keeps the second law intact. For that, the question had to be flipped on its head.

The hidden cost is erasure, not knowledge

The resolution arrived in two stages, and it is genuinely counter-intuitive. In 1961 Rolf Landauer at IBM asked a question nobody had thought to ask: does computation itself have a thermodynamic cost? His answer is now called Landauer’s principle, and it is the single idea worth carrying away from all of this:

Erasing one bit of information (resetting a memory from “unknown” to a definite blank) must release at least a small, fixed amount of heat into the surroundings: kT·ln2, where T is the temperature.

Read that twice, because the surprising word is erasing. Acquiring information, measuring, even computing reversibly: those can in principle be done for arbitrarily little energy. What is irreversibly expensive is forgetting: throwing a bit away, collapsing two possible states of a memory into one. Logical irreversibility (you can’t recover what you deleted) forces physical irreversibility (heat must flow out). The cost of thinking, it turns out, is not the knowing. It is the wiping clean.

1 · MEASUREstore 1 bit2 · EXTRACTgain kT·ln2 of work3 · ERASEpay kT·ln2 of heatto run again, the memory must be reset → the gain is handed back
Why the free lunch never arrives. The demon really does extract work in step 2, but to repeat the cycle it must clear its memory in step 3, and Landauer's principle says that erasure costs back exactly what was gained. The second law was never in danger; it was hiding in the demon's notebook.

In 1982 Charles Bennett closed the loop. The demon’s “free” sorting was never free, because the demon is a memory device. Every molecule it inspects leaves a record. To keep working, the demon must eventually erase those records to make room for new ones, and by Landauer’s principle, that erasure dumps exactly enough heat into the environment to cover the entropy the demon seemed to remove from the gas. The books balance to the penny. The second law survives not because the demon can’t sort, but because it can’t forget for free.

Entropy and information are the same quantity

Step back and the deepest lesson comes into focus. The entropy of nineteenth-century thermodynamics (Boltzmann’s measure of how many microscopic arrangements look the same from outside) and the information of twentieth-century communication theory (Shannon’s measure of missing knowledge, of surprise) are not analogies for one another. They are the same mathematical quantity, wearing two costumes. Entropy is missing information; information is negative entropy. That is why a bit can be traded for joules, and why deleting a bit must warm the room. Information is not a ghost laid over matter. It is a physical thing, subject to physical law, with a price tag denominated in heat.

Where this stands in 2026

This is no longer a curiosity for thought experiments. As of 2026, energy has become the binding constraint on artificial intelligence, and Landauer’s century-old bookkeeping is suddenly the most practical number in the field. Data-centre electricity demand has climbed steeply on the back of large-model training and inference; in Ireland, data centres now consume on the order of a fifth of national grid electricity, with projections pushing toward roughly a third. Analysts have begun writing explicitly about a thermodynamic ceiling on machine intelligence, the point where the heat generated by computation, not the cleverness of the algorithm, sets the limit.

The gap that makes this interesting is enormous. Today’s chips dissipate something like a million times more energy per logical operation than Landauer’s theoretical minimum. That is bad news and good news at once: bad, because we are nowhere near the floor; good, because the floor is so far below us that there is, in principle, vast room to fall. The race to make computation cheaper is, at bottom, a race toward kT·ln2, and the demon’s old lesson, that the expensive step is throwing information away, is exactly where the efficiency battle is now being fought.

Further reading

← Back to all articles
How this article is written?

This article is imported daily by an AI assistant from a personal learning journal, then reviewed by me. Shared under CC BY 4.0.

© 2026 Akciali
Legal & Privacy