In 1867 Maxwell imagined a demon that sorts a gas by watching it — seeming to make order from chaos for free. In 1929 Szilárd reduced it to one molecule in a box and a single recorded bit. In 1961 Landauer found the catch: erasing that bit must dump heat. In 1982 Bennett closed the loop — the demon's information costs exactly what its sorting saves. Run the engine below. Cash a bit into work, and the bill comes due in erasure. One ledger, two units — and you cannot beat it.
A single molecule, a partition dropped. Which half is it in? Learning the answer is exactly 1 bit of
information for a fair box — counted by the very same entropy() the Shannon bench uses.
Couple a piston to the known side and let the gas expand V→2V isothermally. The work is
∫P dV = kT·ln2 — and at 300 K that bit is worth 2.87×10⁻²¹ J. Raise T and the bit fattens.
To run again the demon must forget — and erasing one bit dumps kT·ln2 of heat to the surroundings.
Erase what you learned and the heat cost equals the work won. Net cycle work ≤ 0.
Shannon's bit and Clausius's J/K are the same ledger in two currencies: ΔS = 1 bit × k·ln2 = 9.57×10⁻²⁴ J/K.
The demon never breaks the Second Law — it just hides the cost in memory.
Watch the cyan bit slide across the bridge as a kT·ln2 work-pill — its width is the joules that one bit is worth, so raising T fattens the same single bit. Cash work out of the gas and the gold ledger fills; to run again you must erase, and the pill slides back the other way as heat. Refuse, and the tape fills while the bill hides in the demon's memory — until the tape is full and the demon is dead. You cannot win, and you cannot break even.
entropy() to price the demon's bit.Two units, one ledger, re-run live in the self-test badge above: the bit is counted by the
same entropy() the Shannon bench uses, the work ∫P dV equals H·kT·ln2
derived from scratch, the erasure cost kT·ln2 cancels it to net work ≤ 0, and the universe's entropy
never goes below zero even when you refuse to pay. · The microscopic gas this engine runs on lives one
wing over in the Cavern's
Maxwell–Boltzmann bench;
the bit it spends comes from the
Shannon Limit.