A Teacher's Nand2Tetris Deep Dive — Why Learning for Fun Is Unbeatable
A Teacher's Nand2Tetris Deep Dive — Why Learning for Fun Is Unbeatable
9 min read
— views
learning essay education rust nand2tetris
Table of Contents

This post contains Amazon affiliate links. If you make a purchase through these links, I may earn a small commission at no extra cost to you. See Privacy Policy for details.


In my previous post, I wrote about buying three programming books after building five apps with vibe coding. I’d planted seeds and started watering them.

Two days later, I’m reading Appendix A of Nand2Tetris, muttering “No way…” out loud.

A World Built from NAND Gates

Meeting Nand2Tetris

In my previous post, I mentioned buying The Elements of Computing Systems (aka Nand2Tetris) — a book that starts from NAND gates, the simplest logic circuits, and builds up to a complete computer.

Now that I’ve actually started reading it, here’s my honest take: This book is incredible.

Within the first few dozen pages, you see the entire blueprint of a computer. Starting from NAND gates, you build logic circuits, then an ALU, then memory, then a CPU, then an assembler, then a virtual machine, then a compiler, then an OS — and finally, Tetris runs. In 13 chapters.

“Stack these up in this order, and you can build a computer.” That roadmap is laid out from the very beginning.

Appendix A Blew My Mind — Boolean Function Simplification

But the moment I actually gasped wasn’t during the main chapters. It was Appendix A.

“Canonical Representation of Boolean Functions.” Normally, you’d skip an appendix. But before starting Chapter 1, I opened it on a whim.

What I found was the algebra of Boolean simplification:

  • Commutative law: x And y = y And x
  • Associative law: x And (y And z) = (x And y) And z
  • Distributive law: x And (y Or z) = (x And y) Or (x And z)
  • De Morgan’s law: Not(x And y) = Not(x) Or Not(y)
  • Idempotent law: x And x = x

I’d seen all of this in certification exam prep books. My reaction was “Yeah, yeah, I know.”

But Nand2Tetris takes it further. It uses these laws to actually simplify circuits.

Take this expression:

Not(Not(x) And Not(x Or y))

This requires 5 gates. Apply the laws step by step:

  1. De Morgan’s: Not(Not(x) And (Not(x) And Not(y)))
  2. Associative: Not((Not(x) And Not(x)) And Not(y))
  3. Idempotent: Not(Not(x) And Not(y))
  4. De Morgan’s: Not(Not(x)) Or Not(Not(y))
  5. Double negation: x Or y

A 5-gate circuit reduced to 1 gate.

Five gates versus one. In actual hardware, this directly translates to power consumption, processing speed, and chip area. Mathematics can make a circuit 5x more efficient.

“This is an appendix?” I said out loud.

Japan’s IT certification exam (FE exam) covers AND, OR, and NOT truth tables, has you draw Venn diagrams, and explains “De Morgan’s law is…” — and stops there. You memorize it because it’s on the test. But it never shows you why it matters — how applying these laws can dramatically optimize real hardware.

Nand2Tetris shows you exactly that.

Top-down approach (disassembling from a complete product) vs bottom-up approach (building from NAND gates)

The Bottom-Up Paradigm Shift

This book’s approach is entirely “bottom-up.” Start from the lowest, most primitive components, and build upward.

What I did when I built five apps with vibe coding was the opposite — “top-down.” Start with a vision of the finished app, tell AI “build this.” You get something that works without knowing the internals. And that’s perfectly valid.

But Nand2Tetris lets you understand why things work, starting from the very bottom.

As a teacher, this distinction felt familiar. In education, there’s an approach called “inquiry-based learning” — instead of giving answers first, you let students discover things on their own. Nand2Tetris does exactly that. It says, “Here’s a NAND gate. Now figure out how to build everything else.”

Know what to build through top-down thinking. Know why it works through bottom-up understanding. When you have both, your comprehension jumps to a whole new level — that’s the feeling I’m getting.

The Elements of Computing Systems
The Elements of Computing Systems
Noam Nisan, Shimon Schocken
View on Amazon →

Shelving My Certification Exam (For Now)

Why I Planned to Get Certified

Here’s a confession: I was planning to take Japan’s Fundamental Information Technology Engineer Examination (FE exam).

The reason was simple. As a solo developer who’s also a teacher, saying “I built apps” doesn’t carry much weight without technical credentials. A certification would prove “I have at least baseline knowledge.”

I’d already read through two prep books cover to cover. All I needed was to grind past exam questions, and I’d be within passing range.

Pulled Toward the Fun Stuff

Things didn’t go as planned.

Got hooked on building with Claude Code → noticed the Rust code → started reading a Rust book → memory management concepts kept coming up → “How do computers actually work?” → Nand2Tetris.

Before I knew it, my exam prep time had been completely absorbed by Nand2Tetris.

Honest confession: I’m shelving the FE exam for now.

I’ll take it eventually. But not now. Right now, there’s something I need to immerse myself in.

Extrinsic motivation (studying for exams) vs intrinsic motivation (curiosity-driven learning)

Studying for Exams vs. Following Your Curiosity

As a teacher, I know the difference between these two intimately.

Students who study for tests versus students who study because it’s interesting. The former get good scores. The latter go beyond scores.

Extrinsic motivation — “I have to pass,” “I need the certification.” Powerful in the short term. Deadlines keep you moving.

Intrinsic motivation — “I want to know because it’s fun,” “I can’t stop thinking about what comes next.” The staying power is on a completely different level. No one’s forcing you, yet hours pass without you noticing.

I’m firmly in the latter camp right now. I can’t wait to turn to the next page of Nand2Tetris. I read the appendix cover to cover. I go to bed excited that “tomorrow’s the ALU chapter.” I never once felt this way while studying for the exam.

And precisely because I’m experiencing this myself, I feel a little more credibility when I tell my students, “Don’t study for the test — study because it’s interesting.”

Rust Led to Low-Level, Low-Level Led Back to Rust

The fascinating part is that Rust was the gateway to Nand2Tetris.

As I wrote in my previous post, my app Tannin Techo has a Rust backend, and I bought a Rust book to understand that code. Reading about Rust inevitably means encountering memory management — heap and stack, pointers, ownership.

“What even is a heap?” “How is memory actually structured?”

Those questions became the entry point to Nand2Tetris.

And once I started reading Nand2Tetris, understanding flowed in the reverse direction. “Oh, so this is how memory is built. No wonder Rust is so strict about memory handling.” Understanding memory at the hardware level makes Rust’s ownership system click: “Ah, that’s why it works this way.”

Rust sparked my interest in low-level computing. Low-level knowledge deepened my understanding of Rust. This wasn’t a planned parallel study — but it turned out to be the best synergy I could have stumbled into.

Understanding the “Insides” in the Age of AI

If You Ask Whether It’s Practical

“So, is Nand2Tetris actually useful?” If asked, I’ll answer honestly.

In 2026, with Claude Code, OpenAI’s Codex, and Google’s Gemini — in an era where AI writes code for you — will knowledge of NAND gates be directly practical? Probably not in most situations.

If pure practicality is the goal, there are more efficient ways to study. More “immediately useful” knowledge to acquire. The IT certification exam is far better ROI.

But as Someone Who Stands at the Podium

I’m a teacher.

“Teacher, why do computers work?”

Whether I can answer “Well, there’s this tiny component called a NAND gate…” when that question comes — that directly determines the depth of my toolkit as an educator.

Starting in 2025, “Information I” became a subject on Japan’s national university entrance exam. Programming, data science, information design — high school students now learn these as a matter of course. If I’m going to stand at the front of a classroom in this era, I want to be the teacher who can explain not just how to use technology, but why it works.

And as I wrote previously about navigating the AI age, judging whether AI-generated answers are actually good ultimately requires foundational understanding. NAND gate knowledge may not be directly useful, but the disposition to understand how things work becomes the foundation for every technical judgment.

”Fun” Is the Ultimate Engine

But honestly, all those arguments about “as a teacher” and “in the AI age” might be rationalizations after the fact.

The real reason is simpler. It’s fun.

The moment five gates collapse into one. The moment a circuit’s mechanics click into place. The moment “Oh, that’s why Rust does it this way” connects. With every page, the world’s resolution bumps up a notch.

Pure intellectual thrill, beyond any calculation of profit.

Even in just three years of teaching, I’ve watched enough students to know. From that experience, I can state one thing with certainty: Students who find something fun always grow. Not in test scores — from the moment their eyes light up with “this is interesting,” their learning accelerates. You couldn’t stop them if you tried.

That’s exactly where I am right now.

Conclusion: Can’t Help It — It’s Just Fun

In my previous post, I wrote about planting seeds through vibe coding and starting to water them.

Once I started watering, the roots grew in unexpected directions. From Rust to memory, from memory to NAND gates, from NAND gates to Boolean algebra. The roots are spreading in completely different directions than I’d planned.

I shelved the certification exam. I’ve strayed from the “efficient study path.”

But — can’t help it. It’s just too much fun.

See ya!

Share: 𝕏