Introduction: K'Nex Binary Calculating Machine
This device can be used to add or multiply binary numbers (i.e. numbers expressed in base 2) by dropping balls into columns.
There is one column for each power of 2 (from 2º = 1 to 2¹º = 1024), thus representing a number in binary notation.
Starting with an empty machine, if a ball is inserted into the 1 column on the right it stays there. When another ball is inserted in that column, it dislodges the ball that is there and falls into the 2 column – the dislodged ball is collected in a tray at the bottom of the machine ready for reuse. There is now just a ball in the second column, representing the binary number 10.
When a third ball is dropped into the first column, it stays there because it is not already occupied. The machine now has a ball in the first two columns, representing the binary number 11.
Now the fun starts. When a fourth ball is dropped into the first column (the one labelled ’1′), it dislodges the ball which is there and falls into the 2 column. Since that column is occupied too, the ball dislodges that ball and then drops into the 4 column – where it stays because it was empty. The machine now has a ball in just column 4, representing the binary number 100.
And so it goes on. After 1,024 balls have been inserted, there will be just one ball in column 11 – the far left column – representing 1,024 as 10000000000.
Another way of expressing the rule is that, starting with column 1 and working from right to left, the ball must fall into the first empty column it encounters, emptying each occupied column it passes over en route.
“So how can this machine be used to multiply numbers?” you may ask. Well, you must remember that, just as with our normal base-10 number system, the value of a digit is multiplied by 10 if it is shifted one position to the left, so a binary digit is worth twice as much if it is shifted one place to the left. For example, if you drop a ball in column 1, it is worth 1, but drop it in the column to the left and it is worth 2. If you drop it in the column which is three places to the left, if is worth 2³ = 8 times as much.
Let’s multiply 23 by 17.
First of all, express these as the sum of powers of 2: (16 + 4 + 2 + 1) x (16 + 1).
We are going to insert two balls, one in the 16 column and the other in the 1 column. We end up with the machine showing 10001. This is 17. We have 1 x (16 + 1).
We are now going to add 2 more 17s, but instead of adding two more lots of balls to the 16 and 1 columns we are going to speed things up by dropping one ball in the 32 column and one in the 2 column, i.e. as before but one column to the left. This means that we have just added twice as much – 2 x (16 + 1) making (2 + 1) x (16 + 1) altogether. The balls in the machine now represent 110011, i.e. 51 in base 10. We know it’s 51 because all we have got to do is add up the values of the columns which have a ball in them (32 + 16 + 2 + 1).
We now need to add 4 17s and so we drop one ball in column 64 and one in column 4, i.e. two columns to the left of the first balls to make them worth four times as much. The machine now represents (4 + 2 + 1) x (16 + 1).
Finally, we need to add 16 17s by dropping the balls in the columns which are 4 to the left of the original two columns, i.e. columns 256 and 16. It’s 4 columns to the left because 16 is 2 to the power 4. The machine is now showing (16 + 4 + 2 + 1) x (16 + 1).
We end up with balls in columns 256, 128, 4, 2 and 1. The sum of these is 391, and the machine has represented this as 110000111.
So now we have the result: 23 x 17 = 391 – and all we had to do was drop eight balls into the machine and add five numbers together!
There is one column for each power of 2 (from 2º = 1 to 2¹º = 1024), thus representing a number in binary notation.
Starting with an empty machine, if a ball is inserted into the 1 column on the right it stays there. When another ball is inserted in that column, it dislodges the ball that is there and falls into the 2 column – the dislodged ball is collected in a tray at the bottom of the machine ready for reuse. There is now just a ball in the second column, representing the binary number 10.
When a third ball is dropped into the first column, it stays there because it is not already occupied. The machine now has a ball in the first two columns, representing the binary number 11.
Now the fun starts. When a fourth ball is dropped into the first column (the one labelled ’1′), it dislodges the ball which is there and falls into the 2 column. Since that column is occupied too, the ball dislodges that ball and then drops into the 4 column – where it stays because it was empty. The machine now has a ball in just column 4, representing the binary number 100.
And so it goes on. After 1,024 balls have been inserted, there will be just one ball in column 11 – the far left column – representing 1,024 as 10000000000.
Another way of expressing the rule is that, starting with column 1 and working from right to left, the ball must fall into the first empty column it encounters, emptying each occupied column it passes over en route.
“So how can this machine be used to multiply numbers?” you may ask. Well, you must remember that, just as with our normal base-10 number system, the value of a digit is multiplied by 10 if it is shifted one position to the left, so a binary digit is worth twice as much if it is shifted one place to the left. For example, if you drop a ball in column 1, it is worth 1, but drop it in the column to the left and it is worth 2. If you drop it in the column which is three places to the left, if is worth 2³ = 8 times as much.
Let’s multiply 23 by 17.
First of all, express these as the sum of powers of 2: (16 + 4 + 2 + 1) x (16 + 1).
We are going to insert two balls, one in the 16 column and the other in the 1 column. We end up with the machine showing 10001. This is 17. We have 1 x (16 + 1).
We are now going to add 2 more 17s, but instead of adding two more lots of balls to the 16 and 1 columns we are going to speed things up by dropping one ball in the 32 column and one in the 2 column, i.e. as before but one column to the left. This means that we have just added twice as much – 2 x (16 + 1) making (2 + 1) x (16 + 1) altogether. The balls in the machine now represent 110011, i.e. 51 in base 10. We know it’s 51 because all we have got to do is add up the values of the columns which have a ball in them (32 + 16 + 2 + 1).
We now need to add 4 17s and so we drop one ball in column 64 and one in column 4, i.e. two columns to the left of the first balls to make them worth four times as much. The machine now represents (4 + 2 + 1) x (16 + 1).
Finally, we need to add 16 17s by dropping the balls in the columns which are 4 to the left of the original two columns, i.e. columns 256 and 16. It’s 4 columns to the left because 16 is 2 to the power 4. The machine is now showing (16 + 4 + 2 + 1) x (16 + 1).
We end up with balls in columns 256, 128, 4, 2 and 1. The sum of these is 391, and the machine has represented this as 110000111.
So now we have the result: 23 x 17 = 391 – and all we had to do was drop eight balls into the machine and add five numbers together!