Musings of a Fondue

Nand to Tetris - Part 1 of 2

I finished the first half of the course.

And here’s a video of what my implementation looks like in action.

It can run programs! Albeit very slowly. The demo above is vastly sped up. In realtime, it took about 37 minutes to run.

The code for the emulator is on Github.


The first half of the Nand to Tetris course covers the hardware part of building a computer. It starts with logic gates, moves on to combinatorial circuits such as multiplexers, then to the design of an ALU, and finally an assembler.

Here’s the schematic of my hardware implementation. It deviates from the one specified in the course, but works nonetheless.

The second half of the course will cover software (including the design and implementation of a high level programming language and an operating system). One of the things I’m looking forward to in the second half of the course is better graphics! We will be implementing logic to draw individual pixels. (Currently the computer draws in 16 pixel wide chunks.)

Getting here took a couple of months largely due to zero prior knowledge about the workings of computers (and microprocessors). Also, building the emulator was a beast in and of itself (I’m looking at you Python threads). I’ve learned a lot in the process and I’m looking forward to learning more as I tackle the second half of the course.

Comments