Thursday, August 16, 2018

Microscopic gravity-powered mechanical computer

This post can be of general interest, but I need it as background reference material for a future article about cryptocurrencies.

A mechanical, gravity-based bit
Let's say that a bit in our system is a ball in a box instead of electrons stored on a capacitor or magnetic domains stored on a ferro-magnetic material.  A 0 or 1 is if the ball is or is not in the box.  For our ball to remain in the box, it must have at least a 50% chance of not being bumped out of the box by thermal agitations. This is the basis of Landauer's principle. The energy needed to do this according to the principle is E1 = k*T*ln(2) where k = 1.38E-23 = Boltzmann's constant and T = absolute temperature in Kelvins.  At room temperature T = 300 so that E1= 3E-21. This is very close to a van der Waals force, which is an attraction so weak it's not considered a bond. Hydrogen bonds are the weakest of attractions called bonds and are not considered permanent in water, due to the polar nature of water and thermal agitations. They are from 2x to 20x stronger. So the Landauer limit is unrealistically low. Covalent bonds are about 200x stronger, and ionic bonds are about 400x to 2000x stronger. In a computer we need a LOT more reliability than 50% chance of the ball being in the box.  If we use E2 as our energy barrier, frequency of a bit escaping out is f = f0 * e^(-E2/E1). See Arrhenius equation (E1 for this part should be k*T, 30% larger than k*T*ln(2)). f0 is the frequency of thermal vibrations in the crystal which is on the order of 10THz for silicon, the structure I'll make this CPU out of. 10 THz is a great overestimate of what I'll need because the balls I'll use are bouncing off the surface so that only a portion of the vibrations are imparting energy.  Let's say I'll make it a nice big CPU with really high reliability. Say 100 million NAND gates with about 2 energy wells per gate and Ill allow 1 error per 10 years, so I want "f" error rate = 1 per 10yr*8670 hrs/sec*3600 sec/hrs*100 million gates*2 wells/gate.Rearranging gives E2/E1 = -ln(f/f0).  For these numbers, I get E2 needs to be > 70 * E1. E1 here is 30% less than my E1=k*T*ln(2), so E2 > 100 * E1. so it appears the strength can be like a weak covalent bond, which makes sense, assuming covalent bonds in air at normal T & P conditions almost never break.

If the ball has a mass in kg of "m", then the height "h" of the walls in meters has to follow the E2 = mgh equation to determine the h necessary to store the ball in the box (g=10 for gravity on Earth).   If I use balls that are 50 billion atoms of gold, E2 = 100*3E-21 = 50E9*1.66E-27 kg/amu*198 amu/goldAtom*(g=10)*h.  Solving gives height of wall = 1.8 microns. The diameter of the ball is 1.2 microns.

Mechanical NAND Gate

This will show that a logic circuit making the simplest single calculation must use the same amount of energy as storing a bit. This is obvious if you already understand entropy and its relation to energy because 2 bits of energy come in and 1 goes out, so the other bit must have turned into heat. That's the minimum energy expenditure for a logic function, not counting esoteric reversible logic.

But that's not enough for my goal. My goal is to show the fundamental physics basis of all the deep parallels between economics and computing.

A single type of many different gates (like NAND, XOR, Toffoli, Fredkin, etc) can (and have) form a complete computer.  The NAND is the usual one used, so I'll use that one. I only need to design a single NAND gate for my purpose, and let others decided how to use them to build a computer.

The balls shown are defined in the bit section above. The pink lines are tubes that return the balls to a pump (not shown) that returns them to the top.

I accidentally made an AND gate instead of NAND gate, but this will show the general idea. This is lacking in detail that I could only fix by building a physical model or with 3D software.

The left-side balance goes down only when there are 2 balls on the left side. It's not shown, but the input has two slots.  Only 1 is shown because we are looking at the side view.  The output can also have more than 1 output.  The balls being stored at the top is a system-wide potential energy well that powers the computer, like voltage drives electrons. There is a rectangular counterweight on the balance equal to the weight of 1 ball.  If 2 balls come in on the inputs, causing the left balance to fall, closing the output . If only 1 ball comes in the top, it is basically back up to its initial level, and there is a mechanism to roll them out of the way to clear the gate for the next computation.



The green and red bars represent walls that go up and down (valves). CPUs are engines going through a cycle, so it's natural they have valves.  They have to be synchronized with a clock. They go down to let previous balls out.. They close after all balls have had time to get in place, in the entire computer. They can weigh much less than the balls and can be mechanically linked so that thermal vibrations cancel each other in trying to raise and lower the individual valves.

The cycle is: green valves open, balance resets. Green valves close, red valves opens. Red valves close. Inputs applied to "highest-level" NAND gates, which has a cascade effect of triggering all the NAND gates that it should. It takes some time to propagate as the appropriate balances fall. Repeat (green valves open).

Each level is the "well" that makes sure we know what state the balls are in: they are deep enough that we know the balls will not bounce out. When 2 balls come into the inputs, the balls fall two levels.  This is a total of 4 units of energy calculated in the previous section that gives me a guaranteed bit, so in 1 cycle, 4 units were used. If no balls come in, zero.  If 1 ball comes in, 1 unit.  There are 4 possible states: 0 balls, 1 ball in "left" side, 1 ball in "right" side, and both balls.  According to Landauer limit, it should average 1 unit of energy, and here I have used (0+1+1+4)/4 = 1.5 units.  One way to help is to let only 1 ball out at the bottom when 2 balls come, so the other can be helped to get back up 1 of the two levels. A more complicated design and arguments might be able to use the counterweight in a might help further.

There are two balls at the top which help push balls into the top compartment when the red valve goes down. This means I have to raise the balls a little more than the top floor. There needs to be at least as many as the number of red valves. The deeper the top layer of balls, the faster they will be pushed into place, enabling a faster computer but requiring more energy since the balls have to be raise higher. Also, the computer has to wait on the balls to fall which depends on force of gravity. If they were magnetically pulled down to fall faster, this would make it faster, but again require more energy.  Also, the wedges needed to get the balls out will force it to require a deeper gravity, again requiring more energy per gate per operation.  This seems to show a connection to the Margolus–Levitin theorem aka Bremermann's limit which says a bit can transition from one state to the next with a combination of more energy and more time.
bits  = 4Et/h
where E = energy, t = time, and h =Planck's constant.   So if E is higher, the time per bit can be less.

Clock Speed: The central clock will have a massive ball raised and lowered based on the clock that provides the energy to raise and lower the light-weight green walls..The clock speed is based on how quickly the balls can fall h which is based on h = 1.8 micon = 1/2*g*t^2 which gives t = 0.007 seconds on Earth where g=10. A clock cycle is at least 2x this which makes this a 750 Hz machine.  I could have chosen heavier balls to get an h as low as 1 nm which gives 28 kHz.

"Transistor" Density?
Four transistors are needed to create a NAND gate. It looks like my NAND gate will take up about 10x30 microns. This gives me about 1.3 million "transistor equivalents" in 1 cm^2 of material.

Memory
Memory may be built more simply, but two NAND gates can be wired as a flip flow to create bit storage.

No comments:

Post a Comment