Alan Turing was a British mathematician who is famous for his efforts in codebreaking in the WWII but also as the “father of modern computing and artificial intelligence”. His contributions to computing and mathematics are outstanding and fundamental to so much that our modern world is built upon. Really, there ought to be a global national holiday in his honour.
Quite recently, and through no real apparent reason, I was asked if I would give some tutelage to a first-year Computer Science degree student who was struggling with, well, Computer Science. Now when I studied it, you only needed string and coloured beads to fix a computer, but now it’s very much mathematics and complicated words.
One of the things my student was having a hard time coming to grips with was the idea of a Turing Machine. Alan Turing (three paragraphs in and still no sign of a national holiday) wanted to understand what a machine might and might not be compute so he theorised (i.e. dreamt up) a simple machine which had a small number of instructions and an infinitely long piece of tape onto which a 1 or a 0 could be written. His idea was that it would show if such a machine given long enough (hence the infinitely long tape) could carry out any program it was given.
Well, I didn’t have an infinitely long piece of tape (we have some long ribbons in The Snail of Happiness, but even they cannot be considered to be infinite in length) but I did have a cardboard box (which had wine in it, so that had to be dealt with first) so I used that (and a bit of glue) instead…
My infinite tape is six compartments long, so it can store six 1s or 0s. It, for these purposes, has four things it can do: move the pointer thing one space to the left, one space to the right, read the contents of the compartment or write (1, 0 or Space) to it.
To run a program, look at what is shown on the pointer, and the value it is pointing at. Then find that sequence in the first two columns of the program and set the pointer to the value in the fourth column, the value to that in the fifth column. Finally, move the pointer in the direction given in the sixth column. Then repeat the process.
So, here’s a simple program:
Pointer | Tape | Pointer | Tape | Move | |
A | 0 | → | A | 1 | Right |
A | 1 | → | A | 0 | Right |
A | Space | → | A | Space | STOP |
Start with some 1s and 0s and the pointer set to A, pointing at the most left-hand location.
If you follow the instructions, you will have changed all the 1s to 0s and vice versa, even you have no clue what is going on (welcome to my world!).
In fact, you could, in theory, use this to do all sorts of calculations. Here is a much longer program which, if you follow it, will add 1 to the binary number stored in the compartments. It will do this even though you may have no idea how to carry out binary addition (start with the pointer set to A pointing at the most left-hand digit). have a go! Start with 011 and hopefully end up with… oh, I’ll let you and your new-fangled machine figure that out!
Pointer | Tape | Pointer | Tape | Move | |
A | 0 | → | A | 0 | Right |
A | 1 | → | A | 1 | Right |
A | Space | → | B | Space | Left |
B | 0 | → | C | 1 | Left |
B | 1 | → | D | 0 | Left |
C | 0 | → | C | 0 | Left |
C | 1 | → | C | 1 | Left |
C | Space | → | C | Space | STOP |
D | 0 | → | C | 1 | Left |
D | 1 | → | D | 0 | Left |
D | Space | → | C | 1 | Left |
Combined, the two programs I have shown here allow you to carry out binary addition and subtraction, meaning you have the start of a fully-fledged digital computer. Made out of scrap cardboard.
oOo
P.S. Having created this cardboard computer, I went to my pupil who informed me, with some relief on his face, that the Turing Machine would not be on the exam. Outrageous!
Many other people contribute to Kate and Gun’s wonderful ScrapHappy every month – check out what they have been up to too!
Kate, Gun, Eva, Sue, Lynda,
Birthe, Turid, Tracy,
Jan, Moira, Sandra, Chris, Alys,
Claire, Jean, Jon, Dawn, Gwen,
Sunny, Kjerstin, Sue L, Vera, Edith,
Ann, Dawn 2, Carol, Preeti,
Viv, Karrin,
Amo, Alissa, Lynn, Tierney and Hannah
You must be logged in to post a comment.