# The Physics of Computation

> A bit is a physical thing, not an abstraction - and that fact sets hard, measured limits on every computer that will ever exist, from your laptop to whatever comes after silicon.


---

# The Physics of Computation

Your computer feels like pure logic - symbols pushed around according to rules, no physics required. That feeling is wrong in a load-bearing way. Every bit your machine holds is a real physical state: a voltage on a wire, a trapped charge, a magnetic domain pointed one way instead of another. Every operation on that bit costs real energy, some of it unavoidably. Computation isn't running on top of physics. It's made of physics, all the way down.

This guide takes that seriously and follows it to conclusions most programmers never see stated plainly: there is a minimum energy cost to erasing information, and it's not an engineering shortfall, it's a law. Chips can't shrink and speed up forever because heat has nowhere to go. And the reason all of this works - the reason information behaves like a thermodynamic quantity at all - is that Shannon's entropy and Boltzmann's entropy are, underneath the different words, the same formula.

## How to read this

This is an advanced guide - it assumes you're comfortable with how computers represent and process information, and leans on the entropy foundation from [/guides/heat-energy-and-entropy](/guides/heat-energy-and-entropy). If entropy-as-counting-microstates is new to you, read at least that guide's second and third phases first. No new math is required beyond what that guide already used; where a formula shows up, it's there to make a claim checkable, not to gatekeep it.

## The phases

1. [A bit is a physical thing](01-a-bit-is-a-physical-thing.md) - what a bit actually is inside real hardware, and why erasing one has a minimum, measured energy cost (Landauer's principle, properly this time).
2. [The thermodynamic limits of computing](02-the-thermodynamic-limits-of-computing.md) - why chips hit a real heat wall, and reversible computing: the theoretical escape hatch nobody has fully built.
3. [Information theory meets physics](03-information-theory-meets-physics.md) - Shannon entropy and thermodynamic entropy turn out to be the same equation, and that's the reason the rest of this guide is true.


---

# A Bit Is a Physical Thing

Ask a programmer what a bit is and you'll hear "a 0 or a 1." True, but incomplete in a way that hides something important. A 0 or 1 written on a whiteboard is a symbol. A 0 or 1 inside your laptop is a physical arrangement of matter and energy - and that arrangement is where the real story starts.

In a modern chip, a bit is a packet of electric charge sitting on a tiny capacitor, or the presence/absence of voltage on a transistor gate. On a hard drive, it's the magnetic orientation of a nanoscale grain - pointing "up" for 1, "down" for 0. On a DVD, it's the presence or absence of a physical pit etched into a reflective layer. Different hardware, same underlying move: pick some physical property that can sit in one of two (or more) distinguishable states, and let that state stand for information.

This isn't an implementation detail you can abstract away and forget. It's the whole reason computation has a physical cost at all. Software treats bits as free to copy, move, and discard. Physics disagrees.

## Why physical states cost energy to change

Distinguishing "definitely a 1" from "definitely a 0" requires those two states to be separated by an energy barrier large enough that random thermal jostling doesn't flip one into the other by accident. Room-temperature matter is never still - atoms vibrate, electrons jitter, and a charge stored on too small or too shallow a well will randomly leak away. Engineers pick a barrier height well above the ambient thermal energy (roughly the product of Boltzmann's constant and temperature) specifically so a stored bit stays put.

Getting a bit to cross that barrier on purpose - writing a new value, flipping a magnetic domain - takes energy, for the same reason pushing a ball up a hill takes energy: you're moving the system away from where it would otherwise settle. That's ordinary engineering. The physics gets more interesting, and less optional, when you ask about the opposite of writing: erasing.

## Erasure is special

Suppose a bit currently holds an unknown value - it could be 0, it could be 1, and from your position you genuinely don't know which. Now you erase it: you force it to a known state, say 0, regardless of what it held before.

Look at what happened to the possibilities. Before, the bit had two accessible physical configurations, either one consistent with what you know. After, it has exactly one. You didn't only move a charge around - you threw away a distinction. Two physically possible microstates collapsed into one.

That is a drop in entropy, in the exact sense used in [/guides/heat-energy-and-entropy](/guides/heat-energy-and-entropy): entropy counts the number of microscopic arrangements consistent with what you know about a system, and erasure takes that count from two down to one, for every bit erased. The second law of thermodynamics does not allow entropy to drop for free, anywhere, ever. If the bit's entropy fell, something else's entropy has to rise by at least as much - and in practice that means heat gets dumped into the surrounding environment.

## Landauer's principle, stated properly

This is **Landauer's principle**, and it deserves to be stated as the hard limit it is, not a curiosity: **erasing one bit of information requires dissipating a minimum amount of energy as heat**, equal to Boltzmann's constant times the absolute temperature times the natural log of 2 (k·T·ln 2). Rolf Landauer derived this at IBM in 1961, and it survived every attempt to find a loophole - including the one built specifically to break it, Maxwell's demon, whose failure is the subject of Phase 3 of the entropy guide.

A few things about this limit that matter to a builder, not just a physicist:

- **It's about erasure, not computation in general.** Copying a bit, or applying a *reversible* operation (one where you could run the process backward and recover the input) carries no Landauer cost. The cost attaches specifically to the logical operations that destroy information - overwriting a register, resetting a flip-flop, and (crucially) the AND/OR/NAND gates that make up ordinary logic, which take two input bits and produce one output bit, throwing away the information needed to tell which input pair you started from.
- **It's not theoretical.** Table-top experiments - trapped colloidal particles in laser tweezers, nanomagnetic memory cells - have measured energy dissipation during erasure landing right at the Landauer bound as temperature and switching speed are dialed in. This is measured physics, the same way the speed of light is measured physics.
- **It's astronomically small.** At room temperature, k·T·ln 2 works out to roughly 3 × 10⁻²¹ joules per bit. A modern CPU erasing billions of bits per second is still dissipating a Landauer-limit energy budget many orders of magnitude below a single watt. Your laptop's fan is not spinning because of Landauer's principle - real transistors are wildly less efficient than this limit for engineering reasons, not fundamental ones.

That last point is worth sitting with. Landauer's principle isn't why your computer gets hot today. It's the floor underneath all the engineering slack that current chips still have - and, as later phases show, the floor that no amount of future engineering can ever push through.

## Why this isn't just philosophy

It's tempting to file this under "interesting but irrelevant" - after all, no current chip is anywhere near the Landauer limit. But the principle does real work in a few places right now:

- It resolved a century-old paradox (Maxwell's demon) by proving that information storage and erasure are physical processes with a physical price tag, closing what looked like a free lunch.
- It's the reason "erasing information" and "generating entropy" are not two different things that happen to correlate - they're the same event looked at from two angles, one from information theory, one from thermodynamics. Phase 3 makes that identity precise.
- It sets the actual, non-negotiable floor that any future computing technology - optical, biological, quantum, whatever comes after silicon - has to respect. Better engineering can approach the floor. Nothing can go under it.

A bit, then, is never "just information." It's a physical state with a location, an energy barrier, and a thermodynamic bill that comes due the moment you erase it.

Check what actually sticks:

```quiz
[
  {
    "q": "In real hardware, what is a bit physically?",
    "choices": [
      "A purely mathematical symbol with no physical form",
      "A physical state of matter or energy - a voltage, a trapped charge, a magnetic domain - chosen to have two distinguishable configurations",
      "A property that only exists while software is actively reading it",
      "An agreed-upon convention that has no bearing on hardware design"
    ],
    "answer": 1,
    "explain": "Every bit is realized as some physical property with (at least) two stable, distinguishable states - charge on a capacitor, magnetic domain orientation, presence of a pit on a disc. The abstraction of '0 or 1' rides on top of a real physical difference."
  },
  {
    "q": "Why does erasing a bit (forcing it to a known value) have a minimum energy cost, while copying a bit does not?",
    "choices": [
      "Erasing physically destroys atoms, while copying does not",
      "Copying is always slower, so it dissipates less power",
      "Erasing collapses two possible physical microstates into one, lowering entropy inside the bit - a drop the second law requires to be paid for elsewhere as heat; reversible operations like copying don't destroy that information",
      "There is no real difference - both cost the same minimum energy"
    ],
    "answer": 2,
    "explain": "Landauer's principle applies specifically to logically irreversible operations - ones where you cannot run the process backward and recover the input, like erasure or a two-input-to-one-output logic gate. Copying preserves enough information to reverse it, so it carries no Landauer cost."
  },
  {
    "q": "Why doesn't Landauer's principle explain why your laptop's fan spins today?",
    "choices": [
      "Landauer's principle has never been experimentally confirmed",
      "The Landauer limit (k·T·ln 2 per bit) is many orders of magnitude smaller than the energy real transistors actually dissipate, so today's heat comes from engineering inefficiency, not the fundamental floor",
      "Laptops don't erase any bits during normal operation",
      "The principle only applies to magnetic storage, not transistors"
    ],
    "answer": 1,
    "explain": "The Landauer bound at room temperature is about 3 x 10^-21 joules per bit - vastly below what current transistors dissipate per operation. Real chips run hot because of resistive and switching losses far above the fundamental limit, not because they're bumping into it."
  }
]
```


---

# The Thermodynamic Limits of Computing

Around 2005, chipmakers quietly stopped chasing higher clock speeds. Desktop CPUs had climbed from megahertz to multiple gigahertz over two decades, then that climb flattened. Chips kept improving - more cores, better architectures, smarter caches - but raw frequency growth hit a ceiling and stayed there. The ceiling had a name: the **power wall**, downstream of the same physics from Phase 1.

## Heat is not a bug you can engineer away

Every transistor switching state dissipates some energy as heat, for reasons that go beyond Landauer's principle - resistive losses in wires, energy needed to charge and discharge capacitance, current that leaks even when a transistor is supposedly off. Pack more transistors into a chip and switch them faster, and the heat generated per square millimeter climbs fast: power density roughly scales with clock frequency times the number of active transistors, while the chip's surface area (which is what actually carries heat away to a heatsink) stays fixed.

That's a losing trade. A modern high-end CPU already dissipates on the order of 100-250 watts from a die smaller than a postage stamp - power density in the same neighborhood as a kitchen hotplate, concentrated on silicon that has to stay under roughly 100°C or the transistors themselves start behaving unreliably and eventually get damaged. Push clock speed further without a fundamentally different transistor or cooling technology, and the result isn't a faster chip. It's a chip that overheats and throttles itself back down, or fails outright.

This is why "just make it smaller and faster" stopped working on its own. Smaller transistors do help - they need less energy to switch, and shorter wires mean less resistive loss - which is exactly why chipmakers kept shrinking transistor features long after clock speeds plateaued. But shrinking has its own wall: at a few nanometers, transistors approach the size of tens of atoms, and quantum effects (electrons tunneling through gates that are supposed to block them) start leaking current even harder. The industry's answer was to go sideways - more cores running in parallel at moderate clock speeds - rather than fight the heat wall head-on. That's an engineering workaround for a physical fact, not a repeal of it.

None of this is Landauer's principle in action yet - today's chips dissipate energy per operation that's many orders of magnitude above the Landauer floor, purely from resistive and switching losses. But it establishes the real wall: heat has to go somewhere, and the amount of silicon available to shed it into is finite. That constraint - dissipated heat must leave the chip - never goes away, whether the inefficiency is today's engineering slack or, eventually, Landauer's actual floor.

## Reversible computing: the theoretical way out

If erasing a bit is what forces a minimum energy cost, then the obvious question is: what if you never erase anything?

This is the idea behind **reversible computing**, first laid out by Charles Bennett (also at IBM, building directly on Landauer's work) in the 1970s-80s. A computation is *logically reversible* if, given the output, you can always reconstruct the input - no information gets thrown away at any step. Ordinary logic gates like AND and OR are not reversible: given the output of an AND gate, you cannot tell which of the input combinations produced it, because two different inputs can map to the same output. That collapse of possibilities is exactly the entropy-lowering, energy-costing move from Phase 1.

Reversible logic replaces those gates with reversible equivalents - the **Toffoli gate** and **Fredkin gate** are the classic examples - that take the same number of output bits as input bits, so no information is ever discarded and the operation could, in principle, be run backward to recover the inputs. Chain reversible gates together and you can build any computation an ordinary computer can, without ever performing a Landauer-costing erasure in the logic itself.

The payoff, if it could be fully realized: a reversible computer's energy dissipation isn't bounded below by k·T·ln 2 per bit the way an erasing computer's is. Run the logic slowly and gently enough (a regime called **adiabatic** switching, by analogy with the thermodynamic sense of adiabatic), and the theoretical energy cost per operation can be pushed arbitrarily close to zero, limited only by how slowly you're willing to run and how good your switches are, not by any law of physics.

## Why nobody has actually built one

Be clear about where this stands: reversible computing is a proven theoretical framework and an active research area, not a technology sitting in a store. A few real obstacles explain why:

- **You still have to erase eventually.** A useful computer takes many inputs and produces one useful output - it needs somewhere to put the intermediate information it didn't erase. Bennett's own scheme handles this by running the computation forward, copying out the answer, then running everything backward to reclaim the circuit's original state - but that "uncompute" step doubles the work.
- **Reversible logic needs more hardware.** Reversible gates typically need extra "garbage" output bits to preserve enough information to invert the operation - more transistors and wiring per logical operation than irreversible logic needs.
- **Adiabatic switching means slow switching.** Approaching zero-dissipation operation means ramping voltages gradually rather than snapping them, which works against raw speed - a real trade-off between beating the Landauer limit and running fast.
- **The non-Landauer losses still dominate.** Today's transistors waste so much energy on resistive and leakage losses, far above the Landauer floor, that reversible logic's theoretical advantage doesn't yet translate into a practical win. Switches efficient enough that Landauer's limit is the *actual* bottleneck don't broadly exist yet.

Small reversible and adiabatic circuits have been built and demonstrated in labs, and reversible logic is used today in a different context: quantum computers are built entirely from reversible gates, because quantum mechanics itself requires it (a topic [/guides/quantum-computing-for-humans](/guides/quantum-computing-for-humans) covers from the quantum side). But a general-purpose, reversible classical CPU that beats ordinary chips on real workloads remains a research goal, not a shipping product.

## The plain bottom line

The power wall is real today, measured in watts and throttled clock speeds. Landauer's limit is real but not yet the binding constraint on any real chip. Reversible computing is a legitimate, physics-respecting escape route from that eventual limit - and also a genuinely hard engineering problem that decades of research haven't fully solved. All three of those statements are true at once, and treating any of them as settled in the other direction - "chips will keep getting faster forever" or "reversible computers are just around the corner" - overstates what's known.

```quiz
[
  {
    "q": "Why did CPU clock speeds plateau around the mid-2000s instead of continuing to climb?",
    "choices": [
      "Software stopped needing faster processors",
      "Power density (heat generated per unit area) climbs with clock speed and transistor count, and a fixed chip surface area can only dissipate so much heat before the chip overheats or fails",
      "Transistors physically cannot switch faster than a few gigahertz",
      "Manufacturers agreed to slow down progress to sell more chips over time"
    ],
    "answer": 1,
    "explain": "Heat generated scales with switching activity, but the area available to carry that heat away to a heatsink is fixed. Past a point, higher clock speed only produces more heat than the chip can shed, so the industry shifted to multiple moderate-speed cores instead of one ever-faster core."
  },
  {
    "q": "What makes a computation 'logically reversible' in Bennett's sense?",
    "choices": [
      "It runs backward in time",
      "It uses less electricity than an irreversible version",
      "Given the output, the input can always be reconstructed - no information is discarded at any step, unlike ordinary AND/OR gates",
      "It only works on quantum computers"
    ],
    "answer": 2,
    "explain": "Ordinary logic gates like AND collapse multiple possible inputs onto the same output, destroying information (and, by Landauer's principle, costing energy). Reversible gates like the Toffoli gate preserve enough output bits to always recover the input, avoiding that Landauer-costing collapse."
  },
  {
    "q": "What is the real current status of reversible computing?",
    "choices": [
      "It has been fully implemented and already replaced conventional CPUs",
      "It is a proven theoretical framework and active research area that could, in principle, beat the Landauer limit, but no practical general-purpose reversible CPU exists yet due to overhead, extra hardware, and speed trade-offs",
      "It was proven impossible and abandoned decades ago",
      "It only matters for storage devices, not processors"
    ],
    "answer": 1,
    "explain": "Reversible and adiabatic circuits have been demonstrated in labs, and quantum computers use reversible gates out of necessity. But general-purpose reversible classical computing still faces real engineering obstacles - uncompute overhead, extra garbage bits, and a speed-versus-dissipation trade-off - that keep it a research direction rather than shipping technology."
  }
]
```


---

# Information Theory Meets Physics

In 1948, Claude Shannon needed a word for how much uncertainty a message resolves, and he asked John von Neumann what to call it. Von Neumann's answer, as the story goes: call it entropy - the formula is identical to Boltzmann's, and "nobody knows what entropy really is, so you'll win every argument."

It's a good story, and better than a joke. The two entropies are not merely similar in spirit, decorated with the same word by coincidence or convenience. They are the same mathematical object, applied to two different questions, and that identity is not a curiosity sitting off to the side of this guide - it's the reason everything in Phases 1 and 2 is true.

## Two entropies, one formula

Boltzmann's thermodynamic entropy, from [/guides/heat-energy-and-entropy](/guides/heat-energy-and-entropy), counts microstates: `S = k log W`, where `W` is the number of microscopic arrangements consistent with a system's observable state, and `k` is Boltzmann's constant, which fixes the units to joules per kelvin.

Shannon's information entropy measures the uncertainty in a message or a random variable: `H = -Σ p(x) log p(x)`, summed over every possible outcome `x`, where `p(x)` is that outcome's probability. A fair coin flip has two equally likely outcomes and `H = log 2`. A coin that always lands heads has `H = 0` - no uncertainty, no information gained by watching it.

Set aside the constant `k` (it only exists to convert an entropy count into joules-per-kelvin units, a bookkeeping choice with no content) and Boltzmann's formula is the special case of Shannon's where every one of the `W` microstates is equally likely: `p(x) = 1/W` for each, and Shannon's sum collapses exactly to `log W`. Boltzmann entropy isn't "like" Shannon entropy. It's Shannon entropy, evaluated on the uniform distribution over microstates, with a unit conversion applied.

This isn't numerology. Both formulas answer the identical underlying question: *given what you know about a system's macroscopic state, how many distinguishable configurations remain, and how surprised should you be to learn which one it actually is?* Ask that question about a gas and you get thermodynamic entropy. Ask it about a coin flip, a compressed file, or a bit in a register, and you get Shannon entropy. Same question, same math, different subject matter.

## Why this makes Landauer's principle work

This identity is the reason Phase 1's claim - that erasing a bit has a real thermodynamic energy cost - isn't a metaphor borrowed from physics to make a point about computers. It's a direct consequence.

A bit with an unknown value has two equally likely microstates (0 or 1), so its Shannon entropy is `log 2`. Because Shannon entropy and thermodynamic entropy are the same quantity, that bit's *physical* microstate count also carries `log 2` worth of entropy, in the literal Boltzmann sense - the same sense that applies to a box of gas. Erasing the bit forces it to one definite state, dropping its entropy to `log 1 = 0`. That drop isn't a figurative "entropy" standing in for a physical idea - it is thermodynamic entropy, full stop, and the second law governs it exactly as it governs a gas that's been compressed into a smaller volume. The dropped entropy has to reappear somewhere else - as heat in the environment - because the underlying law doesn't know or care whether the microstates it's counting belong to gas molecules or to a transistor's charge state.

If Shannon entropy and Boltzmann entropy were only analogous rather than identical, Landauer's principle would have no right to be literally true. It would be a suggestive metaphor, the kind of thing said in a talk and forgotten by the next slide. It's not a metaphor, because there's only one entropy underneath both names, and that's precisely why the k·T·ln 2 bound from Phase 1 is a real, measurable number of joules and not a rhetorical flourish.

## The myth worth killing here

The popular version of this story often runs backward: "information is a kind of energy" or "bits are made of entropy," phrasings that sound profound and explain nothing. Information isn't energy, and a bit isn't made of entropy. What's true and precise is narrower and more useful: *the number of physical microstates available to a system is the same mathematical quantity whether you're counting them to describe a gas's temperature or to describe what a message could have said.* Entropy is the accounting method, shared by both domains because both domains are, underneath, about counting possibilities consistent with partial knowledge. Erasing a bit lowers that count exactly the way compressing a gas does, which is why it costs energy exactly the way compressing a gas does.

## Why this matters practically, not only philosophically

Zoom out to what this guide has actually established across three phases: a bit is a physical state (Phase 1), erasing it has a real energy floor because doing so is a genuine thermodynamic entropy decrease (Phase 1, sharpened here), heat dissipation from switching real transistors is a hard wall current chip design runs straight into (Phase 2), and reversible computing is a legitimate but unfinished attempt to route around the erasure cost specifically, rather than the switching losses (Phase 2).

None of that is a story about current silicon being immature. It's a story about what computation *is*. Every computer that will ever be built - optical, biological, superconducting, quantum, or something not yet invented - manipulates physical systems, and physical systems answer to thermodynamics whether or not their designers were thinking about it. A future computer might get breathtakingly close to the Landauer floor, might dissipate heat a million times more efficiently than today's chips, might use reversible logic throughout. It cannot erase a bit for less than k·T·ln 2, because that number isn't a property of transistors. It's a property of what erasure *means*, expressed in the one formula that thermodynamics and information theory turned out to share all along.

```quiz
[
  {
    "q": "What is the actual relationship between Shannon (information) entropy and Boltzmann (thermodynamic) entropy?",
    "choices": [
      "They are unrelated ideas that happen to share a name by historical accident",
      "They are the same mathematical formula - Boltzmann's is the special case of Shannon's formula applied to equally likely microstates, with a unit-converting constant attached",
      "Shannon entropy measures energy, while Boltzmann entropy measures probability",
      "Boltzmann entropy is a metaphor inspired by Shannon's earlier, unrelated information theory"
    ],
    "answer": 1,
    "explain": "Shannon's H = -Σ p(x) log p(x) reduces exactly to Boltzmann's S = k log W when every one of the W microstates is equally likely. They are the identical formula, evaluated on the same kind of question - how many distinguishable possibilities remain - applied to different subject matter."
  },
  {
    "q": "Why does the Shannon/Boltzmann identity matter for Landauer's principle specifically?",
    "choices": [
      "It doesn't - Landauer's principle stands on its own, independent of information theory",
      "It means the entropy drop from erasing a bit is literal thermodynamic entropy, not a figurative comparison - so the second law applies to it exactly as it applies to a compressed gas, making the energy cost a real physical bound rather than a metaphor",
      "It proves that information itself is a form of energy",
      "It shows that Shannon entropy only applies to communication, not to physical hardware"
    ],
    "answer": 1,
    "explain": "Because Shannon entropy and Boltzmann entropy are the same quantity, a bit's uncertainty (log 2) is genuine thermodynamic entropy. Erasing it is a real entropy decrease that the second law must charge for elsewhere as heat - which is exactly what makes Landauer's k*T*ln 2 bound a measurable physical fact rather than a suggestive analogy."
  },
  {
    "q": "What is the precise, defensible claim connecting information and physics - as opposed to the vaguer popular version?",
    "choices": [
      "\"Bits are made of energy\" - a literal physical equivalence between data and power",
      "\"Information is entropy\" - a rebranding that adds no new content",
      "The number of physical microstates consistent with what's known about a system is the same mathematical quantity whether counted for a gas or for a message, so operations that reduce that count (like erasure) cost energy for identical reasons in both cases",
      "Information theory and thermodynamics are entirely separate fields that should not be compared"
    ],
    "answer": 2,
    "explain": "The precise claim is about shared mathematics applied to a shared underlying question (how many possibilities remain, given partial knowledge), not a claim that information literally is energy or that the two fields were always describing identical things in every respect."
  }
]
```
