|A 4-Bit Adder Made Of Cardboard!|
|Written by Mike James|
|Sunday, 11 December 2016|
Even if you know it, the fact that computation can be achieved in an amazing range of different ways still comes as a surprise. Programmer lapinozz decided to prove the point by building a full adder using cardboard, marbles and hot glue.
You can see the full project on lapinozz's website, but it is worth a few words of explanation first.
A half adder takes two input bits and produces a sum and a carry. The logic table for a half adder is
You can see that the Sum is just
and Carry is
What this means is that you can add two bits together if you can implement an AND gate and an XOR gate. This is the beauty of working in binary, it reduces arithmetic to logic.
However, a half adder isn't enough because you might have a carry from the previous bit position to add in. You can build a full adder from two half adders and this is the way most people choose to implement a full adder:
The problem is that it would have needed a lot of cardboard cutting to create a machine that adds marbles together. The solution is to notice that in terms of what marbles have to do a full adder can be described more easily:
Put like this all we need is a gate that does different things for one, two and three marbles. This can be created with a modification of a single half adder. While this is simpler it still looks complicated to me, but it sort of works and it is possible to implement the addition of four bits:
You put the marbles in at the top - a marble for a one and no marble for a zero and you put two rows of four marbles to represent the two binary numbers you want to add. You then remove a piece of cardboard and let them fall to the bottom. Some of the marbles are retained in the machine but the ones that get through are the result - a single 5-bit value. Of course, it doesn't always work as the marbles bounce and don't fall at the same rate, but if you repeat you do get the answer some of the time.
For the fine detail and some nice animated GIFs of the marbles going though the gates visit lapinozz's website.
There have been marble-based computers before, but the marbles simply changed the state of levers which represented the state of the system. This particular machine uses gates to work with the marbles representing the numbers and does it in a word-parallel, bit-serial way. That is, it is the fact that one marble follows another that makes the behavior different for one and two marbles. For example, consider the simple AND gate:
The two bits arrive one after the other. If there is only one bit then nothing comes out. You only get an output if the cup is filled by the first marble and the second marble rolls across it.
or email your comment to: firstname.lastname@example.org
|Last Updated ( Friday, 18 January 2019 )|