Why can't you build a perpetual motion machine?
A perpetual motion machine needs a move the world does not have. In 1775 the Paris Academy of Sciences stopped examining such designs and filed them beside squaring the circle. A wheel that gains energy from nowhere asks for a one-sided entry, and the only move on offer, repair between two neighbors, takes from one reading exactly what it gives the other. The subtler kind runs on a room's heat alone. James Clerk Maxwell imagined a being at a door in a box of gas, passing fast molecules one way and slow ones the other, warming one side for free. Leo Szilard showed in 1929 that one recorded bit buys work worth the temperature times the logarithm of two. Charles Bennett settled it in 1982. The being's memory fills, and clearing each bit costs at least what it earned.
Also in Chapter 23: Why Does Writing Something Down Cost Heat?.
This answer comes from OPH, Observer Patch Holography. OPH is a rigorous, consistent and complete description of the unified, self-creating computational Universe we inhabit. Its consistency is machine-checked: the fixed point at its core is constructed explicitly, and a theory with a model contains no contradiction.
To understand OPH and check every step yourself, start with the free book Reverse Engineering Reality. It builds the theory from the ground up, and the OPH Notebook answers your questions while you read.
read the free bookask the notebookor ask sage:read chapter 18: Why Does Anything Have Energy?watch a universe make its own particles