Building a Computer from a Nand Gate - Nand2Tetris Unit 01
The journey is beginning. Unit 01 of Nand2Tetris throws you right into the deep end of the pool and starts with all the fundamental logic gates. Starting with the Nand gate and building on top of that.
Spent a week on this unit and was quite surprised to how much i actually enjoyed it.
The goal of Unit 01
Unit 01 focuses on boolean logic and how theses gates consist of it. It was not completely new to me, since i’ve been doing programming for the last 10ish years. The AND and ORs made sense. Stacking them on top of each other and making conditionals without ifs and early return statements, that was new.
We’re introduced to HDL (Hardware Description Language), which I used to built the gates:
- Basics: NOT, AND, OR, XOR
- 16-bit: AND16, OR16, NOT16, OR8Way
- Multiplexers for Reading: Mux, Mux16, Mux4Way16, Mux8Way16
- Demultiplexers for Writing: Dmux Dmux4Way, Dmux8Way
Learn how all these gates work at a fundamental level and you can build a computer. Which I will in the later chapters.
Some of the blockers for me, was coming with a programmers mindset. I keep thinking of if this then that and trying to route the gates and wires based on statements. That finally clicked somewhat along the way, but still have to remind myself sometimes to get out of that mindset.
I was surpised to see that I actually enjoyed learning all of this and find it extremely interesting. I can’t wait to learn more and while doing this course I’m reading Code by Charles Petzold(Hard recommend) on the side. It’s a really good companion.
I think Binary was/is super interesting. It always seemed like gibberish, but when actually taking time to learn it, it makes perfect sense. The logic is not hard for me to understand. The powers of 2. Something that follows computing in many areas.
It surprised that some of these logic gates were actually quite hard to get right. Some I had to visualize on paper, and some I actually made diagrams of on circuitverse. Forgot to save them from this unit to include here…