Technical Playground

Nand2Tetris - Elements of Computing Systems

I’ve been working with computers for a very long time – starting with an Apple IIe and a bunch of things in between. I never owned an Apple II, and my mother was not very forgiving of me investigating how our home computer worked many years later (never mind the fact that I did correctly install the sound card…) Anyway for one reason or another, there have been a lot of missing pieces in my understanding of computers. This is fairly common – any sufficiently large task requires abstracting away underlying details, only digging in when it matters.

A couple years ago I first heard about “The Elements of Computing Systems” – the basic idea is you build a computer from the ground up with nothing but a NAND gate (and later a FlipFlop.) Progressing from basic boolean logic gates to ALU to Memory structures to computer to assembler, compiler, OS, etc… This sounded awesome when I first heard about it and immediately purchased the book. Like so many things, I started looking at it but never really worked through much of it until about a month or so ago. Speaking with a college, we were discussing how to understand computer assembly language and what it really meant. I happened to mention the book in question and a very freeform study group was formed.

Thus far I’ve built a ton of logic gates, built an ALU (Arithmetic Logic Unit,) and worked through some basic memory structures. So far I’d say that beyond a better understanding of boolean logic I’ve finally developed an appreciation for where hardware and software are different. In dealing with things like FPGAs I’ve always heard that you program a computer (or micro controller) but you describe an FPGA (i.e., what it is, not what it does.) This didn’t make a lot of sense until working through some of these chapters. I had no real idea what a MUX was logic wise until now – I now would call it my favorite. The idea of LSB / MSB (bit in this case) finally makes sense.

I’m being a little vague here due to a few requests from the creators – they do ask that no solutions be posted in public as everyone should be able to work through these themselves. I definitely understand things so much better after the first 3 chapters – I can’t wait to finish the rest. If you’re looking to add a bit of understanding yourself, I can’t recommend this enough.

First 6 chapters are free on http://www.nand2tetris.org – others are in the book.