Some time ago, Zed Shaw, the famed coding educator made a simple Turing machine which he called buttons.computer. After having some conversations with him (he is very approachable), he sort of challenged me to write the same thing in Python as a learning exercise. I took up the challenge, but dropped off mid-way after understanding that I did not know much about these things.
However, scratching the surface by trying to understand his code, and trying to come up with a blog post, taught me a lot. And this was much before the advent of generative AI models and such.
Fast forward almost two years, I am going to give it a try again. This time, I have increased in some learning. I also have the assistance of generative AI to teach me some theory.
Zed Shaw’s buttons.computer is a stack-based emulation of a Turing machine, with registers like a CPU. I am also trying to emulate this, but I’ll be trying to go further (a lot further) by trying to emulate a von Neumann computer virtually using Python.
This is an attempt to study computer architecture and organisation without getting bored. I went through some books and got bored mid-way, and left feeling sad. When I am coding an actual program, and learning theory side by side, I think I learn the best.
And I have named my Turing machine/computer “Keys”. Zed’s computer was named buttons because it had a web GUI which enabled one to program the computer using only two buttons of the mouse.
I won’t be making that (most probably), and mine would require you to program it using the keys in your keyboard. So, it is named “Keys”. 😁
Edit: 14 September 2025
Leave a Reply