In 1867, Maxwell proposed a thought experiment: a "demon" monitors gas molecules and opens a trapdoor for fast molecules to pass one way, slow molecules the other — apparently violating the 2nd law by creating a temperature gradient without work.
The resolution (Brillouin, Landauer, Bennett) is information-theoretic: the demon must remember each molecule's state. When its memory is full and must be erased, the entropy cost exactly restores the 2nd law. Landauer's principle (1961):
The Shannon entropy of the gas: S = −k_B Σ p_i ln p_i
This connects thermodynamics to information theory — entropy IS information. Bennett (1982) showed reversible computation avoids erasure cost entirely.