## Domino Computation

I try to explain this so that someone with no technical background can understand it, but I go pretty quick in an effort not to bore those who already know this stuff. I hope I found the right balance for you, if not, jump to the pictures and videos. This describes how I worked out how to make a computer (well, calculator) with dominos. If such a thing doesn’t interest you, you better not read any further.

### Introduction

I’ve been interested in primitive and alternative computation since I learnt that computers were made of pretty much nothing but switches. 10 years ago, I was thinking of pneumatic computers, when I first met roo we had a discussion about computers made of wood and elastic bands or cockroaches, and chatting to woodly got me thinking about computers made of dominos.

### Theory

To really make a complete computer, I’d need a NOT gate, which sadly is pretty complicated with dominos – I figure you’d need a clock and a mechanism to stand dominoes back up again – I’m imagining a piece of string tied to the pendulum of a grandfather clock, something like that anyway…

Luckily though, you can make some useful computation circuits without the NOT gate. To make things as simple as possible, we restrict ourselves to binary numbers (poor old Babbage, doing everything in base 10). Binary numbers are just another way of writing numbers, any whole number can be easily represented as a binary number – it works just like decimal, except that the individual places never go above 1, and each position doubles the value of the digit instead of increasing by 10 times. 101 in decimal is a hundred and one (1×100 + 0x10 + 1×1), whereas 101 in binary is five (1×4 + 0x2 + 1×1). Adding two numbers together is the same as in base 10 as well, except instead of carying 10, we have to carry 2.

Here’s the longhand calculation for the decimal sum 574 + 927 = 1501

```4 + 7               = 1 (carry 1)
7 + 2 + 1 (carried) = 0 (carry 1)
5 + 9 + 1 (carried) = 5 (carry 1)
0 + 0 + 1 (carried) = 1```

And now the longhand for the binary sum 101 + 11 = 1000 (in decimal, that would be 5 + 3 = 8)

```1 + 1               = 0 (carry 1)
0 + 1 + 1 (carried) = 0 (carry 1)
1 + 0 + 1 (carried) = 0 (carry 1)
0 + 0 + 1 (carried) = 1```

You can see that in binary you’d need loads more digits to represent the same number, but that it simplifies things because you only ever have to deal with 0 and 1 (if only the Nintendo Brain Training game only gave me sums with 0 and 1 in them). Looking at the steps we took, you can see that in order to add two numbers together of any size (in decimal or binary), you need to do many steps of adding together 3 numbers of only one digit. We take a digit from one, a digit from the other, and the carry from the previous calculation, and produce a digit for the answer, and the carry for the next step.

When working with binary there are relatively few possibilities so it can be nice to see these things in a table. On the left are all the possible inputs, and on the right are the outputs we want. This is called a truth table, and this is the truth table for what’s known as a Full Adder.

 a b c 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1
 sum carry 0 0 1 0 1 0 0 1 1 0 0 1 0 1 1 1

In dominos, it makes sense to represent a 1 as the dominos being knocked down, so, this table tells us that if we could create a series of dominos that had 3 input lines of dominos that resulted in two output lines, where the first was knocked down if one or all three of the input lines were knocked down, and the second was knocked down if two or more of the input lines are knocked down, then we can build a sequence of dominos to add any number together.

Actually coming up with a domino chain to do that is pretty complicated, so I simplified the problem again. Rather than adding three numbers, you can create something simpler that only adds two numbers, and chain two of them together so that it ends up adding 3 numbers. This simpler component is called a half adder, and the truth table looks like this.

 a b 0 0 0 1 1 0 1 1
 Sum Carry 0 0 1 0 1 0 0 1

If you can make a half adder, then you can stick two of them together to make a full adder. If we can make a half adder in dominos, this means that we could stick a bunch of them together and if we had enough of them, add any two numbers together, simply by flipping some dominos and reading out the result.

### Practice

So can I make a half adder in dominos? Here’s the planning for the sum part. My sum design used two “Inhibit pass through” gates and an Or gate. The inhibit pass through gate is a domino gate I invented that only lets one of the two input lines continue. The truth table looks like this

 a b 0 0 0 1 1 0 1 1
 output1 output2 0 0 1 0 0 1 0 1

In domino terms, we have two lines of dominos going in, and two coming out. There’s a middle domino that twists depending on which hits it first, and so only allows one of the lines to continue. An OR gate is really easy in dominos, just have two lines merge, and the resulting line will fall when either of it’s input lines falls. With that I was able to create the sum part. The final part of the half adder is the carry. This only falls if both of the inputs fall, it’s also called an AND gate. I stuck a few dominos together to make a large domino that would fall if hit, but only if a blocking domino placed side on to it also fell. Here’s a close up of it being blocked by the side-on domino. ### Result

So, with everything together, does it work?

Domino Half Adder, Input 00, result 00 Domino Half Adder, Input 10, result 10

Domino Half Adder, Input 01, result 10

Domino Half Adder, Input 11 result 01

Yes. Given enough time and dominos I could build a domino chain to add numbers of arbitrary size.

Thanks to Sarah who helped with the filming, and Woodly who discussed the idea with me, and encouraged me to build it.

Update: Bonerici has constructed a domino computer using his own domino logic gate, an XOR constructed in quite a cunning way. I haven’t tried building one yet, but it looks good, and enables a domino computer more palatable to the purists (who were never happy with me sticking dominoes to each other).