Computers are fun and all, but their inner workings remain a mystery to many. We like our hands-on learning, so we made up physical computers for no reason more than just understanding exactly this and maybe to topple thousands of dominos and call it work.
Article by : Prabhat, plays way too much Minecraft, so surprisingly understands how circuits work.
Ok so disclaimer, physical computers do have their real life applications.
But now on with the story. Computers run on a mystical force called electricity — a concept which sparingly few understand — something flows from one end to the other, but in truth its something else, occasionally they don’t flow, and in some cases they just stay there, and sometimes it can shock a person and in rare cases make huge sparks and most often emanate from Jamie Foxx.
Modern computers consist of components so tiny that you might just assume them to be specks of dirt. The obvious drawback of this is that explaining the running of a computer becomes a bit confuddling. Instead, one can take the fundamental concept behind the running of a computer, magnify it and apply it to a physical phenomenon to clearly visualize what’s happening. This, is physical computing.
The Fundamental Concept
Given a particular situation, the easiest answers one can break it down to is a simple yes or no. If you are trying to describe a book, you can frame multiple questions with yes or no answers, and this would be sufficient to track down the book of your choice. This, is what computers base their existence on — a system called binary. Everything a computer does, can be broken down to simple questions, each with an answer of yes and no, 1 or 0, on or off.
The ‘on or off’ is important because of the fact that computers run on electricity. The easiest detection of electricity is whether its flowing through a wire or not — detecting how much electricity is flowing is cumbersome. So if the answer to a ‘question’ [computers do not actually store questions, but let’s stick with that analogy for now], is 1 or yes, current can flow, and this can be detected — through the glowing of a lamp, for example. How bright the lamp glows is subjective, so but its state, on or off, isn’t.
To implement this physically doesn’t require much searching — we just look for common things that can have two states. An easy example is dominos — they can either be stationed erect, or can be fallen over. Taking the electricity ‘flow’ more seriously, one can look at the flow of a liquid through a pipe. If the liquid is flowing, then it counts as on.
But what use is any of this, if it can’t make decisions based on the answers to the questions we’ve set up?
Where these binary systems come into use is in logic circuits. Logic circuits involve the acceptance of inputs, and a corresponding output. For example, the book you have is fiction and has a red bind, then you can buy it. This is a simple real life logic circuit. This is implemented in computers using gizmos called transistors. But in our physical computing world, they are a lot lot harder. But at least you can see them working.
(Not to make this a minecraft plug, but redstone in minecraft is a really useful representation of ‘physical’ circuitry, you can check out some redstone videos to see these in action).
First up, inputs are through wires in circuits, rows of dominos in dominos, and water tubes or pipes in water based circuits.
When a line of dominos hits another perpendicular to it, the other line “breaks” not allowing any “signal” to pass through. The fallen dominos prevents the barrage of collapsing dominos to fall past it and continue the cascade.
In water systems, you can use seesaws or latches, which can activate when a weight (the water flow) falls on them. Water from one pipe can fall on such a seesaw, and move enough to block flow through another.
Every physical computer has these “wires” and then has junctions where the “logic” calculation takes place. Let’s look at some of the most common and interesting ones.
The AND Gate
Implementing an AND gate with two inputs (to scale to three inputs you can take the output from a pair, then combine it with another) involves two stimuli activating a ‘flow’ without both of them individually capable of doing so.
In dominos this is achieved by what I self sabotage — the input line branches off into two, one takes a longer route, and the other intersects itself further ahead, breaking the signal. However, the other input can break this rebellious streak, preventing the sabotage and allowing the signal to pass through.
In water systems, the two ‘inputs’ flow into an Archimedes cup. This cup has a unique property that once the fluid level reaches a certain point, it drains out entirely. Where we use it, is to ensure only when both the fluids have been emptied in, does the ‘signal’ pass out from this cup.
The OR Gate
This is really simple — both input lines merge into one, and either way an input passes through
The XOR Gate
Here’s where things get interesting. For dominos you can think of this as a narrow road — one car can easily pass through, but put both of them on the same road at the same time and going in opposing directions and you’ll have disaster. Or in our case, resounding success. And that’s exactly how the circuit is — the two inputs crash into each other, but have branches which can only be triggered when the domino topple isn’t interrupted.
But liquids? You can actually use a see saw. A very water tight see saw. The liquid flows into two chambers on separate sides of a seesaw, and it can tilt only if one of the chambers is empty — the exact conditions of a seesaw.
The NOT Gate
Now this might be impossible. How do you generate a fall without any input, or stop a fall, with a steaming domino line? Here’s one of the biggest problems with physical computers — they can’t generate signals out of nothing… or can they? Well you’ve got to cheat for that. To implement a NOT gate you can borrow an input from the beginning of the machine, i.e make a branch (Yes the machine has to be given an input for this to work), and run it all the way down to where your NOT gate is supposed to be. If you slow it down enough (by making it’s path longer) the dominos can wait until the main line has started falling. The main line can then break this borrowed signal preventing an output, or if there is not input on that particular line, the borrowed signal will continue — still ‘inverting’ the signal, albeit with a time delay.
Things to keep in mind
Time. That is the most important thing. A lot of these gates are very dependent on their inputs coming in at the same time. In dominos and water systems alike, one can achieve this by lengthening the path the ‘wire’ is taking, such that they enter our ‘gates’ at the same time.
This was just a dip into physical computers. There is quite a lot more to discover, as all we’ve dealt with are permanent signals, permanently switching to on or off state. However, with other physical phenomena, one can easily emulate pulse based input and their corresponding circuits, such as flip flops.