Learning Computer Architecture Through a Game

Learning and meta-learning have been lifelong passions of mine. I find it endlessly fascinating to think about how we learn, to improve my own ability to learn, and to rethink the ways that we try to teach in our society. One nagging thread I’ve been thinking about is what’s next for learning, especially when we know that current systems are ineffective or inefficient.

I recently learned about a game through the Embedded.fm Slack Group that I think demonstrates a potential future for improved learning. Turing Complete involves building a functional computer system starting from the ground up: using NAND gates to build additional logic gates, then using those gates to craft components like SR latches, registers, 1-bit adders, byte adders, muxes, demuxes, and so forth. Eventually you find that you have created a CPU architecture and assembly language, and then you use that assembly language to implement CS concepts like bubble sort as well as games like Towers of Hanoi.

Playing Turing Complete reminded me of my college experience; I had three courses along the same lines that the game follows. One course involved building an ALU in a VLSI tool, starting with individual gates and working our way up to the full ALU. Another course involved building an 8-bit processor in VHDL, which included creating a basic instruction set. The third involved using MIPS assembly to implement algorithms, solve puzzles, and create playable games.

Think about that: three courses, representing an entire year’s worth of learning time. Those three courses still rank as my favorite courses even today, and I learned more from them than I did from the rest of my engineering classes. But when I play this game, I think of how superior the game’s experience is. One is the efficiency of learning: in a couple hours of game time, I have condensed and covered the same amount of ground that took weeks to cover in college. Another aspect that stands out is that I am doing more with the ideas within the game than I did in college: I never actually got to run my ALU. I just built up the logic, ran through design rule checks, and was evaluated on electrical characteristics, gate counts, and area used. I also didn’t get to run through the process end-to-end in school – each experience was distinct and separated from the rest. But in the game, you get to build the ALU, then you get to build the full processor, then you create your own instruction set, and write programs using that instruction set. I’m bummed that I didn’t get this type of comprehensive end-to-end experience with my college courses, because the foundation was clearly there.

The game is supposed to be a puzzle game, so you will be challenged to figure things out for yourself. While you can fudge your way through the first few puzzles, the game does expect that you have knowledge of Boolean Algebra and De Morgan’s Laws. You’ll reach a point where you need to derive equations from truth tables and simplify the logic – I certainly had to break out the pen and paper for that. If you want an accompanying textbook, something like NAND2Tetris would be a good pairing.

The game is early access, so it’s still being improved, but I think it is a) a fun learning experience for any computer nerd and b) an example of how we can rethink the ways we approach learning and teaching to do it in more interesting, powerful, and effective ways. Aside from a direct download into your brain, there is no better way to learn about computer architecture than to go through the process of building up a computer, resolving problems that you run into, and seeing your computer run programs that you wrote.

References

Share Your Thoughts

This site uses Akismet to reduce spam. Learn how your comment data is processed.