The adding machine state is
stored in these internal rockers. When the rocker is
set to the left that represents a zero. When it’s rocked to the right
it’s a one. So, I’ll demonstrate.
With the 1 bit set to zero we now add one to it.
It now goes to a state of one. If a one is added
to another one it must carry to the 2 bit
and clear the 1 bit. This is accomplished by
the rocker, rocking once again to the left.
And dropping the 1 marble which now is cleared. If I get another one to this we have a one plus a two
or a three. And adding yet another one
to this will cause it to carry twice, onto a four
as follows. I shall demonstrate the adding
machine by adding the numbers 5, 6, and 7 in binary. Number 5 is represented
by a 4 and a 1 in binary.
So, we add this into the number. Now we add a number 6, which
is a 4 plus a 2 in binary. I’ll submit it. And now add a 7, which is
a 4 plus a 2 plus a 1 in binary. Add. The internal state is now 18.
It’s much easier to see if we actually hit the result lever.
Which also clears it. And 18 is 16 plus 2. And there’s your result. Now, we shall add some more numbers. We shall add 21 16 plus 4 plus 1. To 6, which is 4 plus 2. To 13, which is 8 plus 4
plus 1. And the result is
32 plus 8, which is 40. It’s quite neat watching
all the carry go through. For example
if we start with a number and it’s most of the bits set. In this case 31, which is
1 plus 2 plus 4 plus 8 plus 16. Now if we add 1 to that. That carries over to a 32. So, we
get the whole cascading happening. So, add 1. And the result is 32. The machine is rather fun to
watch when a lot of marbles fall at once.
For example, the number 31 consists of a lot of bits set
all at once. So, if we put the
number 31 here. Add.
And add to that, 31 again. The result is 32 plus 16
plus 8 plus 4 plus 2 which is 62. This machine is limited to
6 bits worth of storage. It couldn’t exceed it. It just
simply wraps around back to zero. Much like a computer
will distribute. So, for example If we take the number 63
which is all the bits set. And we add 1 to that.
It will actually reset it because we’ve no way to set
the bit that represents 64. Which is not present
in the machine. And, then now back to zero. You can get more information
about this adding machine and other crazy wooden contraptions
on my woodworking website. Woodgears.ca