TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

From Nand to Tetris (2017)

667 pointsby mikpankoover 1 year ago

37 comments

meterover 1 year ago
I first attempted this 7 years ago, after I graduated college. I got through the first 2 chapters. It was extremely rewarding. But regrettably, I abandoned it for other side projects.<p>I picked it up again 3 months ago, and it’s been a blast. I’m on chapter 8, having completed the logic gates, ALU, CPU, assembler, and half of the virtual machine.<p>Every chapter is overwhelming — in a good way. I keep thinking to myself, “how the hell is this going to work?” And when it does, it’s so satisfying.<p>As a side project, purely for educational purposes, it’s the most rewarding thing I’ve done. I’ve learned so much. It’s a damn good project. And I’m damn proud of myself for sticking with it.<p>Highly recommended.
评论 #38737466 未加载
评论 #38740062 未加载
评论 #38736658 未加载
评论 #38736034 未加载
emschwartzover 1 year ago
I loved this course and would strongly recommend it to anyone who works with computers that hasn&#x27;t taken low-level CS classes.<p>This course does an exceptional job of giving you an intuitive understanding of some critical parts of how a computer works that affect higher-level programs and programming languages (for me the biggest aha! was grokking the difference between the stack and the heap). It is also incredibly fun to appreciate how magical it is that these complicated machines we use are just built from these simple circuits that you keep building up and building up through the course. Finally, the teachers did a fantastic job of simplifying what could be multiple semesters worth of material to quickly give you the gist of things like assembly languages, without oversimplifying.<p>Really can&#x27;t recommend this enough if you have the time to do it. FWIW, the first part of the course (from NAND gates to building a CPU) is very fun and fairly easy. The second part (going from a computer to a full operating system) is quite a bit more work.
评论 #38737957 未加载
firesofmayover 1 year ago
I highly recommend this course&#x2F;book. It&#x27;s extremely rewarding once you go through it.
Semitangentover 1 year ago
I found nand2tetris a very natural progression for me after finishing Ben Eater&#x27;s great 8bit computer series (<a href="https:&#x2F;&#x2F;eater.net&#x2F;8bit&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;eater.net&#x2F;8bit&#x2F;</a>). It just makes you grok so many basic concepts of computer design which are quite often glossed over. A perfect project to start over the holidays!
评论 #38736157 未加载
评论 #38736415 未加载
评论 #38736280 未加载
mikpankoover 1 year ago
Here is a fun Nand game inspired by the course: <a href="https:&#x2F;&#x2F;nandgame.com&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;nandgame.com&#x2F;</a>
评论 #38735325 未加载
评论 #38736167 未加载
shpxover 1 year ago
I can also recommend the Digital Design and Computer Architecture lectures from ETH Zürich if you&#x27;re trying to understand computers at a lower level:<p><a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;playlist?list=PL5Q2soXY2Zi-EImKxYYY1SZuGiOAOBKaf" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.youtube.com&#x2F;playlist?list=PL5Q2soXY2Zi-EImKxYYY1...</a>
评论 #38740091 未加载
AlecSchuelerover 1 year ago
Great memories of this book, and of the period of my life I picked it up in. I was at coffee with my girlfriend saying I&#x27;d read you could make all the logic gates using only NANDs, so we got curious and wrote NAND on a bunch of napkins to see if we could figure them all out.<p>We did and it was great fun. For each gate we figured it with NANDs we would write the name of the new gate on a napkin.<p>We took the napkins and the joy of it home and sheet a few days we started combining those gates up as well, trying to eventually figure out an entire ALU. And so along came multiplexors and a bunch of other fascinating stuff.<p>Eventually we got stumped, but I&#x27;d heard about this book and we decided to order it. The rest of the chapters really did help us get an understanding of the low level that had always been mysterious to me as someone with software experience only.<p>Can&#x27;t say I ever did make it all the way through in terms of building around, though. Once it got more into the low software levels I felt I already had enough of an understanding that the work didn&#x27;t seem so appealing, but the read was still fantastic.
pythopsover 1 year ago
There is also this repo from george hotz, very interesting ! <a href="https:&#x2F;&#x2F;github.com&#x2F;geohot&#x2F;fromthetransistor">https:&#x2F;&#x2F;github.com&#x2F;geohot&#x2F;fromthetransistor</a>
评论 #38736011 未加载
评论 #38736455 未加载
elevaetover 1 year ago
I wonder if the prequel &quot;sand2nand&quot; would be possible as a DIY project?
评论 #38736043 未加载
yoyohello13over 1 year ago
I took this course on a lark when I was working as a data analyst. It inspired me to change careers. Absolutely excellent course. Definitely do it if you&#x27;ve got the time.
评论 #38735426 未加载
cushychickenover 1 year ago
Does this still use a custom hardware description language?<p>The curriculum here is very solid - my only critique is that it uses a custom HDL instead of Verilog, VHDL, or SystemVerilog.<p>It wouldn’t have been a huge stretch to do that, and make the skills taught that much more real as a result. Without the practical aspect of exposure to real HDLs, it seems more like a toy than a tool.
评论 #38739320 未加载
评论 #38736841 未加载
评论 #38739422 未加载
Kortaggioover 1 year ago
This was an amazing course and is one of the most rewarding computer science courses I&#x27;ve taken! I loved that there was nothing left to &quot;magic&quot; and it was the first time I felt like I understood the &quot;full stack&quot; of the Java-like code I was writing right down to the transistors.<p>Self-plug for a full-blown minesweeper game I made for the final project: <a href="https:&#x2F;&#x2F;github.com&#x2F;billmei&#x2F;nand2minesweeper">https:&#x2F;&#x2F;github.com&#x2F;billmei&#x2F;nand2minesweeper</a> It&#x27;s a complete game with a tutorial, custom RNG, and unit tests, using their hardware simulator.
评论 #38740767 未加载
kebsupover 1 year ago
What I remember from this course is that the first few homeworks can be done in a few hours in one evening, and then you suddenly spend your weekend building a compiler.
评论 #38737840 未加载
skrippover 1 year ago
I highly recommend you play the game “Turing complete” alongside this course. Will give you an additional visual way of looking at the problems.
alabhyajindalover 1 year ago
My initial interest in the computer&#x27;s underlying operations were piqued when I read Code by Charles Petzold. I found myself wanting a more hands on experience and decided to try this. I loved it and learned so much.<p>I completed the first two projects a few months ago. Hoping to come back to it to complete the rest!
syntacticbsover 1 year ago
I completed both parts of this on Coursera. It can be a very challenging course at times but it&#x27;s thoroughly rewarding. One of the key takeaways was a working mental model of how the hardware and low level software that underpins your code works.
cubefoxover 1 year ago
I wish there was something like that for computability theory.<p>Presumably for historical reasons, professors of theoretical computer science love to talk about abstract machines like finite-state machines, pushdown automata, Turing machines etc. Not about logical circuits.<p>But arguably, logical gates are much more conceptually primitive than most of those automata above! They are basically an implementation of propositional logic, albeit potentially with a dimension of time and delay. And they are nonetheless somewhat close to how actual computers work. So why do they ignore them as a model of computation?<p>My guess is that they don&#x27;t talk about them because they only awkwardly harmonize with the classical models of computation: FSMs, TMs and the like, and the neat hierarchy of computability they place them (what languages in the Chomsky hierarchy they recognize).<p>For example, Turing machines have two kinds of states: Objects called &quot;states&quot;, and the states of the tape cells. The former are finite and the latter are infinite. Pushdown automata make a similar distinction into two types of states. Logical circuits, on the other hand, don&#x27;t distinguish two different kinds of states in such a way. It&#x27;s all just circuits.<p>The classical abstract machines have other problems as well: Arguably, among abstract machines, a real CPU is most similar to a universal Turing machine, because it can execute arbitrary programs. But according to the theory of computation, CPUs are merely equivalent to finite-state machines! Because they lack an equivalent of an infinite tape. Infinity is a strange detail to emphasize here, as logical circuits are merely &quot;potentially infinite&quot; in the same way finite-state machines are merely potentially infinite. But that doesn&#x27;t make them similar to each other. The relevant difference seems to be that circuits with delay allow for &quot;memory&quot; (like flip-flops), while finite-state automata don&#x27;t.<p>I would like to see a course or book on theoretical computer science that tackles this issue: &quot;From NAND to Turing Machines&quot;.
评论 #38738796 未加载
评论 #38737932 未加载
评论 #38737914 未加载
grendeltover 1 year ago
The book is great - so, so cool seeing the layer upon layer of logic (and abstractions) that build up.
ess3over 1 year ago
Cannot recommend this course enough
cadrover 1 year ago
My favorite thing about the book is that each section builds on things, but you don&#x27;t have to go through the whole thing to get there. So, for example, if you did a lot of hardware in the past but never got around to writing a compiler, you could in theory start there. Or if you did a lot of software before but never actually built an ALU, etc, you can get a lot out of just doing the hardware sections.
2OEH8eoCRo0over 1 year ago
This project helped me get my first job after college.
mitsu_atover 1 year ago
Reminded of the Code Golf challenge to build a working game of Tetris in Conway&#x27;s Game of Life: <a href="https:&#x2F;&#x2F;codegolf.stackexchange.com&#x2F;questions&#x2F;11880&#x2F;build-a-working-game-of-tetris-in-conways-game-of-life" rel="nofollow noreferrer">https:&#x2F;&#x2F;codegolf.stackexchange.com&#x2F;questions&#x2F;11880&#x2F;build-a-w...</a>
jackphilsonover 1 year ago
If I&#x27;m into web development, how practically useful is learning low level stuff like this, factoring in opportunity cost?
评论 #38736086 未加载
评论 #38736579 未加载
评论 #38736025 未加载
评论 #38736211 未加载
评论 #38737606 未加载
评论 #38736413 未加载
评论 #38736897 未加载
评论 #38737884 未加载
huytersdover 1 year ago
Nothing is going to beat the SAP-1 computer and original textbook by Malvino for this experience.
评论 #38739374 未加载
westurnerover 1 year ago
Similar: &quot;Show HN: Tetris, but the blocks are ARM instructions that execute in the browser&quot; <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=37086102">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=37086102</a>
agentultraover 1 year ago
This is a great course, well put together, and very fun.<p>I did the second part in Haskell too! I wasn&#x27;t sure what their container environment is like so I stuck with only the `base` library and it worked out well enough.
datametaover 1 year ago
I intend to pick back up from where I left off about a year and a half ago, I believe chapter 6. Super interesting project where I learned a lot about using an HDL, computer architecture, and gates in general.
pkilgoreover 1 year ago
I graduated from this and I cannot recommend it highly enough.<p>If you don&#x27;t have a computer science or EE background, it completely de-mystifies the fundamentals of your machine in a deeply engaging way.
mnscover 1 year ago
Is the estimated hours realistic? 43 hours for part 1 and 89 for part.
评论 #38736540 未加载
评论 #38736406 未加载
评论 #38737110 未加载
评论 #38736396 未加载
aronhegedusover 1 year ago
I did this over a summer and really recommend it!<p>The pacing was just right for me
atulviover 1 year ago
I want sand2tetris next.
评论 #38736457 未加载
评论 #38738371 未加载
nyxtomover 1 year ago
Loved this course, seriously one of my all time favorites end to end. Have yet to find a course that had the same level of fluid journey
dangover 1 year ago
Related. Others?<p><i>Ask HN: What books or courses do you know similar to &quot;From Nand to Tetris&quot;?</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=36853931">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=36853931</a> - July 2023 (29 comments)<p><i>From Nand to Tetris (Building a Modern Computer From First Principles)</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=27030046">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=27030046</a> - May 2021 (1 comment)<p><i>The Elements of Computing Systems, Second Edition</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26036790">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26036790</a> - Feb 2021 (97 comments)<p><i>July 2021: 2nd edition of The Elements of Computing Systems</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=25329763">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=25329763</a> - Dec 2020 (1 comment)<p><i>From Nand to Tetris: Building a Modern Computer from First Principles</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=18519883">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=18519883</a> - Nov 2018 (47 comments)<p><i>Build a Modern Computer from First Principles: Nand to Tetris Part II</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=14526344">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=14526344</a> - June 2017 (35 comments)<p><i>Build a Modern Computer from First Principles: From Nand to Tetris</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=13209452">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=13209452</a> - Dec 2016 (17 comments)<p><i>Building a Modern Computer from First Principles</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=12333508">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=12333508</a> - Aug 2016 (26 comments)<p><i>Nand2Tetris: Building a Modern Computer from First Principles</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=10369795">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=10369795</a> - Oct 2015 (1 comment)<p><i>VHDL implementation of Hack computer from “Nand to Tetris”</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=10021275">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=10021275</a> - Aug 2015 (4 comments)<p><i>Nand to Tetris 1</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=9593114">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=9593114</a> - May 2015 (24 comments)<p><i>From NAND to Tetris: The Elements of Computing Systems [repost]</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=6963338">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=6963338</a> - Dec 2013 (3 comments)<p><i>Building a Modern Computer from First Principles</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=5888705">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=5888705</a> - June 2013 (83 comments)<p><i>Building a Modern Computer from First Principles</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=4643836">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=4643836</a> - Oct 2012 (1 comment)<p><i>Online course: Build your own simulated computer, assembler, lang, OS, &amp; game</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=2928973">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=2928973</a> - Aug 2011 (29 comments)<p><i>Elements of Computing Systems - Building a Modern Computer from 1st Principles</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=2273098">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=2273098</a> - Feb 2011 (2 comments)<p><i>The Elements of Computing Systems (&quot;From NAND to Tetris&quot;)</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=1834864">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=1834864</a> - Oct 2010 (2 comments)<p><i>From Nand to Tetris in 12 steps</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=399141">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=399141</a> - Dec 2008 (3 comments)<p><i>Building a Modern Computer from First Principles</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=205322">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=205322</a> - May 2008 (9 comments)
j_m_bover 1 year ago
I loved and completed this course, just wish I could actually be working on this in my day job!
porridgeraisinover 1 year ago
Cannot recommend it enough.
yeswecatanover 1 year ago
Those who have completed this, do you recommend the book or MOOC?
评论 #38745286 未加载
bannisterjwover 1 year ago
Very cool article