SCIENTISTS are not, in their own imaginations anyway, much given to myths. There is one mythical beast, though, that has haunted physics for almost 150 years. In 1867 James Clerk Maxwell, a British researcher, wondered if you could extract useful energy from thin air, in apparent contradiction to the second law of thermodynamics. He posited the existence of an all-seeing homunculus that might do so—a homunculus that was almost instantly dubbed “Maxwell's demon”.

The second law, one of the most famous in physics, states that order cannot come about spontaneously. Work must be done to create it, and that work (in the technical, physical sense of measurable amounts of energy moving things around) is converted into heat in the process. Since heat is, at bottom, the disorderly movement of molecules, the order created by the work done is more than counterbalanced by the molecular disorder of the newly liberated heat.

Maxwell's demon, however, overcomes that. The homunculus in Maxwell's original thought experiment could sort the molecules of air found in two connected boxes according to their velocities. It controlled a trap door between the boxes and allowed only fast-moving (ie, hot) molecules through in one direction and only slow-moving (ie, cold) ones through in the other. When the molecules had been thoroughly sorted in this way the temperature difference between the boxes could, so the theory went, be employed to do useful work in the way that the hot and cold parts of a steam engine do.

The search for real physical systems that behave like Maxwell's demon has gone on ever since. In 1929, though, Leo Szilard, a Hungarian physicist, added a wrinkle. He realised that Maxwell had failed to consider the energy which the demon would require to decide whether a molecule was moving fast or slowly. This binary decision is equivalent to one bit of information. Storing this bit, so that it can be acted on, requires energy. Szilard calculated that at room temperature one bit of information must take at least three thousand-billion-billionths of a joule of work to store. Not a huge amount, but enough to balance the equations and restore the laws of thermodynamics to their pristine state.

Szilard's observation had an interesting implication, which was that information is, itself, a type of energy—an observation somewhat analogous to Einstein's, 24 years earlier, that mass is a type of energy. Only now, however, has a team of physicists, led by Shoichi Toyabe of Chuo University in Tokyo, been able to prove Szilard's principle of information/energy equivalence by building a working example of Maxwell's demon. They describe their experiment in Nature Physics.

Rather than sort air molecules into boxes, Dr Toyabe and his colleagues used an object composed of two linked polystyrene beads, each 287 billionths of a metre across, immersed in a liquid. One of the beads was pinned to a glass surface so that as it spun the other rotated around it. This minuscule rotor wiggled clockwise or anticlockwise as molecules bumped into it from one side or the other. An electrical field was then used to apply torque to the rotor, making it harder for the system to spin anticlockwise than clockwise.

Dr Toyabe likens the system to a ball on a spiral staircase. All other things being equal, when the ball receives a jolt of energy, it is more likely to drop down a step than to pop up one. If, however, every time it pops up, a block is inserted by a version of Maxwell's demon to stop it falling down again, the ball will gradually make its way up the staircase, storing potential energy as it goes. This can be turned into work by letting it fall down the staircase once again—an analogy of using the movement of hot and cold gases to do work in Maxwell's original thought experiment.

In Dr Toyabe's experiment, the jolt that moved the bead came from molecules in the liquid buffeting it at random. However, because of the clockwise torque, the rotor was much less likely want to budge anticlockwise (equivalent to the ball's popping up the staircase) than clockwise (equivalent to its falling down). Whenever it did move anticlockwise, though, that movement was detected by a camera: the demon's eye, as it were. This was connected to a computer, which tweaked the electric field so as to lock in the corresponding energy gain, storing information as it did so. The ball was thus on a one-way trip up, to use Dr Toyabe's analogy, the staircase.

The experiment was precise enough to permit the researchers to calculate that about 28% of the energy stored as information on the beads' movements was converted into the mini-rotor's potential energy, confirming a prediction made in 1997 by Christopher Jarzynski, a statistical chemist at the University of Maryland. In other words, Dr Toyabe's information-to-work engine was 28% efficient. That does not, of course, take into account the vast array of external apparatus needed to perform the trick. But the point has been proved. Information is, indeed, energy.

By a curious coincidence it was Szilard who drafted a letter to President Franklin Roosevelt that Einstein then signed and which set in motion the process of building that ultimate converter of mass into energy, the atomic bomb. Converting data into energy sounds a lot less threatening. But you never know.