Hacker Courses The online courses programmers keep recommending, ranked from 20 years of public forum comments.
i
The Elements of Computing Systems (Nand2Tetris)
Image: nand2tetris.org
#3 overallClassic

The Elements of Computing Systems (Nand2Tetris)

nand2tetris.org

87 recommenders · 83 threads · recommended in 16 years, 2010–2026 · score 136.1

Go to course ↗

The Elements of Computing Systems (Nand2Tetris) is a project-based course in which you build a working computer from NAND gates upward: logic gates, a CPU, memory, an assembler, a virtual machine, a high-level language compiler, and a simple operating system, ending with a game.

Commenters call it a fantastic, practical way to understand how computers work from first principles, with one saying it is probably the best course they have taken.

CS Fundamentals & Systemsintermediatefreeproject-based#computer architecture#assembler#compilers#operating systems#nand gates#schocken

Recommendations by year

20062026

What commenters said (95)

  1. Strongly recommendsporridgeraisin2023in “Why take a compiler course? (2010)”

    In lieu of this, Nand2Tetris [1] is an absolutely great online, free course where one can go through all of a computer's abstractions - logic gates to an assembler to a bytecode compiler to a stack based virtual machine with an interpreter and an operating system with display, I/O, etc, building everything along the way yourself.

    The hardware stuff is in a simulator of course, but that doesn't take away from the gold mine of revelations one gains from going through this course.

    The community is great as well, so many people did amazing things like build entire ray tracers in their own computer. Although I stopped at a sudoku game, seeing all of that is so good.

    [1] https://nand2tetris.org

  2. Strongly recommendsThe_Amp_Walrus2022in “Ask HN: Which MOOCs in Math/CS are worth still worth taking in 2022?”

    Nand 2 Tetris: https://www.nand2tetris.org/

    In which you, more or less, build a computer from scratch. The course takes you through 12 projects, about 1 week each, where you incrementally build:

    a CPU

    a RAM chip

    a full von Neumann computer

    an assembly language

    a virtual machine

    a high-level language

    an operating system

    ... using NAND gates. All of this is done on your computer using tools provided by the course. Once you've done these projects you will understand the building blocks of a computer from the RAM and CPU, to assembly up to the compiler that executes your programming language of choice. It's a powerful course that will unlock a whole new perspective on computer programming for you. I believe that bang-for-buck it's probably the best online course for someone who is a self-taught programmer. It's practical, fun and mostly oriented around building things.

    (from my blog @ https://mattsegal.dev/nand-to-tetris.html)

  3. Strongly recommendsalexgmcm2021in “Ask HN: What huge mistake did you make early in your career?”

    I've read both books and done the Nand2Tetris course.

    I think Code by Petzold is decent in that it's a book you can read in bed etc. but it spends a long time discussing mechanical relays as an analogue and later discusses various processors in depth.

    I think Nand2Tetris is slightly better in that it focuses on what I'd consider to be the most important stuff, but it's an actual course and requires significantly more effort.

    Nand2Tetris is probably the best course I've ever done though, including my university studies in Physics and ML. It's fun and you learn loads.

  4. Strongly recommendsChriky2018in “Introduction to reverse engineering and assembly”

    In a similar vein, I highly recommend the nand2tetris online course.

    You begin by combining electrical logic gates into gradually more complex chips, then assemble the components of a computer, write an assembler, then a compiler for a high level toy language a bit like Java. Finally you program a game (such as Tetris) in that high level language.

    It is available on Coursera, you can access it for free but have to pay to have your work marked, which is definitely worth it.

    It really demystified that magical bridge between hardware and software for me - "How does typing text on this keyboard physically alter the flow of an electrical circuit?"

  5. Strongly recommendsindigochill2017in “Ask HN: How do you manage multiple learning projects?”

    I used to go through one or two Coursera courses at a time. Just whatever seemed useful and/or interesting at the time. I had my employer pay for their certificate program on one course (the first part of the Nand to Tetris course, which might be my favorite course on there).

    Now I have them paying for an online MS and I have no time for any other projects, as much as I'd like to.

    Something I found when I did have time for side projects (and which I now employ for some schoolwork), is that it was immensely helpful to have milestones. I do this when I'm programming an intimidating program, too.

    I start by taking a tiny piece that can technically run on its own. Then I write and debug until that piece works and I can add on another piece. By seeing the thing actually working as I go, it keeps me motivated and focused on the next small step rather than getting overwhelmed by the overall project.

    Debugging as I go also keeps the defects at any given time at a manageable number, which probably has applications in other places as well (such as regularly practicing a language to weed out bad pronunciation habits early or what-have-you).

  6. Strongly recommendsxiaoma2017in “Build a Modern Computer from First Principles: Nand to Tetris Part II”

    This would be so good if it were available off of Coursera, which is essentially a shake-down for certificate fees at this point. Nand2Tetris is a fantastic course.

    Back in its heyday 3 years ago, I did a ton of courses on Coursera. They weren't perfect, of course. There was no higher-level coordination that could lead to covering an entire 4-year degree's worth of material and it was hard to match up courses from different institutions with different prereqs. It was hard to find advanced courses in general and the enforced speed at which content was expected to be completed sucked.

    But the automated graders were great. I went through parts of many, many courses before having to abandon them due to work pressures and I finished a few, like the scala course and the fantastic automata course and some stuff from Berkeley before they bailed and moved to edX. It wasn't ideal for adult independent learners, but Coursera used to provide real value, especially for introducing niche topics that wouldn't be available via OCW.

    It's a pity they never figured out a business model that would fit what its learners really wanted and just threw up a paywall instead.

  7. Strongly recommendsdb12016in “Show HN: Homemade 32-bit CPU and OS (2015) [video]”

    This reminds me of http://nand2tetris.org/ (and the accompanying Coursera course). It's a fantastic course to learn about computing from first principles.

    The course starts off with just a few logic gates and how you can combine these to make more complicated circuits. These are in turn combined to reach higher levels of abstraction, until you finally have a 16bit computer, with 16K of ram. It's a really cool course that helped me flesh out my understanding of what's going in my computer.

  8. Strongly recommends616c2014in “Dijkstra on Haskell and Java (2001)”

    Your idea about going from architecture to programming in the other way of traditional curricula, in my opinion, has a lot of merit. Other seem to agree.

    An Israeli professor, Noam Nisan, created a course specifically for this purpose, now branded even more popularly as Nand2Tetris course and book.[0]

    Why did he teach something obvious like this? From the site:

    "Why Bother? Because many CS students don't understand how computers work; because fewer and fewer students take compilation courses; because many computer architecture courses are too detailed and too dry; because nothing beats the thrill of creating something from almost nothing; because Nand2Tetris engages students in implementing some of the coolest algorithms, data structures and techniques in applied computer science, and because the typical student feedback in Nand2Tetris courses is 'the best course I ever took'."

    My first exposure to this was at a hackerspace in my area, where far more experienced programmers than I were wrestling with this "hardware and low-level OS layers were a black box" that ever more complex systems and programming environments have created.

    I remember being the first time in a while, as an IT guy who plays with open source a lot, I got real enthusiastic even though it was rough for me (I never had a chance to finish). I encourage everyone to look into, because it was designed by Nisan specifically to address the deficiencies you had mentioned, and I watched a lot of skilled hackers fall in love with computers again because of it.

    [0] http://www.nand2tetris.org/

  9. Recommendsmettamage2026in “80386 microcode disassembled”

    For me, this is peak Hacker News. I am happy I took the hard courses at uni to understand a post like this. I’m also happy that HN was there to stimulate this thinking at the time (2015). Even if I now don’t really do anything with my humble knowledge of low level programming, every time it feels consciousnesses enriching. And it’s an awesome feeling.

    For people that don’t have access to a uni, I recommend nand2tetris.org

  10. Recommendsquibono2026in “Coursera and Udemy are now one company”

    It's been a while since I took a Coursera course but I LOVED it at the beginning. Between Machine Learning, the (numerical) optimisation courses and NAND-To-Tetris (even for the platform alone) it had so many great courses to pick from.

  11. Recommendswartywhoa232026in “Want to write a compiler? Just read these two papers (2008)”

    I highly recommend nand2tetris to everyone. For me, nothing ever explained the whole domain from logic gates and inner workings of a CPU to compilers better than this course.

  12. Recommendstocs32026in “Computers Can Be Understood”

    https://www.nand2tetris.org/ has been my favorite "computers are not magic" course for a long time. It is a much more hardware oriented program than this post though.

  13. Recommendsspit2wind2025in “Ask HN: What skills do you want to develop or improve in 2026?”

    Do you have any particular resources lined up?

    Regarding how computers work under the hood, i can recommend Nand2Tetris.

    https://www.nand2tetris.org/

  14. Recommendsfauria2025

    In that same spirit, I can highly recommend the book "The Elements of Computing Systems: Building a Modern Computer from First Principles" and its associated course "From NAND to Tetris": https://www.nand2tetris.org/

  15. Recommendsbhasi2025in “The Joy of Nand2Tetris”

    I've been following the website and the course material provided therein: https://www.nand2tetris.org/course I did not sign up for the course on Coursera because I was able to make progress just fine with the free material on the website and I did not want to pay Coursera to get their certificates of completion.

    The first 6 projects do not require purchasing the textbook as the relevant chapters are provided along with the project material. The next projects do not have the textbook chapters provided, so I bought the textbook.

    I'm currently working on Project 8. I've been blogging about my progress here, if you want to take a look: https://gurudas.dev/tag/nand2tetris/

  16. Recommendsfalcor842025in “Show HN: Compile C to Not Gates”

    Or equivalently NAND, leading to the usual recommendation about NAND to Tetris - https://www.nand2tetris.org/

  17. Recommendsdeosjr2024in “Show HN: WIP NandToTetris Emulator in pure C – logic gates to ALU to CPU to PC”

    I did the same thing in Golang here: https://github.com/deosjr/nand2tetris

    Be sure to check out the lispmachine folder; its essentially a fork I made after finishing the course. It implements a Lisp on the nand-gate level :)

  18. Recommendspurple-leafy2024in “Show HN: WIP NandToTetris Emulator in pure C – logic gates to ALU to CPU to PC”

    I've read that one in the past, very good book! That looks at electrical circuits as the starting piece.

    You could definitely do the Nand2Tetris course alongside :)

  19. Recommendssourcepluck2024in “Show HN: WIP NandToTetris Emulator in pure C – logic gates to ALU to CPU to PC”

    I'm waiting on "Code" by Petzold to arrive, which I'm hoping will scratch a similar itch, but this seems like a really great way to do it! The nand2tetris course seems so very great. Emulating it all in C sounds fun.

  20. RecommendsJtsummers2024in “The Open Source Computer Science Degree”

    It is also mostly introductory courses. It’s equivalent to maybe 2-3 years worth of a CS degree program if you also don’t take any advanced courses or have a specialization.

    Nand2tetris, for instance, is a course I like and recommend to the curious. But it is at best equivalent to a survey course in computer engineering. It’s a motivator to go deeper, but not where a college student should stop. If it were given for credit at a university it would be intended for first year students.

  21. Recommendsnaikrovek2024in “Show HN: I made a programmable computer from NAND gates”

    This is a natural extension/expansion of the “NAND to Tetris” course on coursera, and is free if you don’t want to be graded.

    The course walks you through it all, and there is an accompanying book that you do not need to buy to finish the course.

    Anyone who wants to do this and can focus on it for enough time can complete it and extend it into whatever shape they like, like this person.

    It really is a good course.

  22. Recommends21432023in “16-year-old Looking For Guidance”

    A few resources which you may want to check out, in roughly increasing order of difficulty:

    - Free Code Camp: https://www.freecodecamp.org/

    - CS50: https://cs50.harvard.edu/x/2023/

    - How to Design Programs (HTDP): https://htdp.org/

    - Nand2Tetris: https://www.nand2tetris.org/

    These are geared towards making you a better programmer in general, though it won't necessarily bring you closer to an AI/ML career.

    Also, math is pretty important if you want to get into AI and similar things. Even otherwise math is important; don't listen to people who say you can get by without the math! So, try to get a head start on probability, calculus, linear algebra etc.

    Good luck!

    Gosh, I'm embarrassed about what I was up to when I was 16.

  23. Recommendsdatameta2023in “FPGAs and the renaissance of retro hardware”

    My recommendation is the NAND2Tetris coursera course. You start with a single NAND gate and put together more complex gates building upon the previous abstraction. Part 1 covers things like creating Muxes, RAM, and an ALU in a stripped down HDL. Part 2 covers the software stack picking up after having created an assembler but I haven't taken it yet. Perhaps this is isn't tailor-made for jumping into FPGA fast but it helped fill in a lot of blanks for me coming from mostly software world.

  24. Recommendsthesuperbigfrog2023in “Ask HN: What are the layers of computing from atoms to UI?”

    Check out "NAND to Tetris":

    https://www.nand2tetris.org/

  25. Recommends_4482023in “Ask HN: How to get into OS/systems programming in 2023?”

    * Start with C programming language. K&R book is still the best, even though outdated.

    * Take a course like Nand2Tetris (freely available online)

    * Read a good OS book, e.g. The Design of the UNIX Operating System by Maurice Bach or any Andrew Tanenbaum book on the subject.

    * Search for "unix systems programming" or "linux systems programming" and you will find some fantastic free books online.

    * Read the free Linux Device Driver book. It is outdated but will still provide enough information to help you self navigate Linux driver code.

    * Visit https://wiki.osdev.org/Expanded_Main_Page

    * And as they say, "Read the source, Luke"; read the Linux source code. First you will have to identify which subsystem you are interested in, and then start browsing that.

  26. Recommendsmikevin2023in “Ask HN: Why do many CS graduates lack foundational knowledge?”

    This might be a bit extreme but if you really want to learn bottom-up I would suggest nand2tetris https://www.nand2tetris.org/ It's not about networking but it's a good way to understand the picture from electrons wiggling to a basic computer. It involves all the layers below Linux basically and a little bit of overlap. I'm not sure how much it will help in your network programming goals but it's not that hard to do and helped me a lot with fundamentals and knowing which parts of a system are responsible for what.

    For more direct help I believe Beej's guide to network programming is greatly recommended https://beej.us/guide/bgnet/

  27. RecommendsPossiblyKyle2023in “How a CPU works: Bare metal C on my RISC-V toy CPU”

    This gets brought up every time the topic shows up but https://www.nand2tetris.org is a course that abstracts how a computer works, and is worth checking out

  28. Recommendsjacobjwebber2022in “Ask HN: How I get a job that uses C?”

    Hi!

    I got a job as an embedded C programmer after a MSc in "High Performance Computing". Weirdly the biggest supercomputers can use similar techniques to tiny microprocessors.

    First of all I get why you like C, I loved learning it, and think it is a really elegant language (with obvious flaws).

    I have some practical advice. Embedded is your best bet for getting to use C professionally. Are you into electronics at all? I would recommend getting some microprocessor/electronics kits, like the Arduino ones. If money is tight, Arduino clones are very cheap indeed. You could get going for < $20. You'll need a "bread board" some wires and a microcontroller. I remember getting a _very_ cheap oscilloscope kit too. You can make some cool stuff with sensors etc. I recommend any video by Ben Eater, if you want to know more about digital electronics. If you come up with a cool project idea you can write a blog post or even just talk about it in a cover letter. It would show you are very keen, even if you don't have professional experience.

    You could also learn more about low level computing stuff by doing the excellent "nand-to-tetris" course, which shows you how to build a CPU. This is quite a commitment, and not essential, but I enjoyed it a lot!

    Embedded Linux is also very widely used, so a project with a Raspberry Pi would look good too.

    Good luck with a child on the way! Perhaps any electronics kits you buy could have a second life in 10-15 years...

  29. Recommendshayst4ck2022in “Ask HN: What technology seems like magic to you?”

    I didn't do this, but I took a pretty similar class (I think):

    https://www.nand2tetris.org/

    It is truly enlightening to see both how incredibly simple and incredibly complex computers are. Of all the classes I ever took, nothing ever blew my mind like that. Building your own processor and taking an operating systems course really builds an appreciation for the giants shoulders we stand on.

  30. Recommendsneverartful2022in “I'm building an OS, and blogging about it. Here is Day 1”

    It would be awesome if the guys who did From Nand to Tetris [0] would do something similar for operating systems. For those who have never heard of Nand to Tetris, it's an informal course that takes you from low-level gates (NAND gates) to build up a processor/memory/computer, assembler, compiler, and then be able to program and run games like Tetris on it. It's outstanding and highly recommended.

    [0] https://www.nand2tetris.org

  31. Recommendsovergrownzygote2022in ““Code” 2nd Edition”

    Highly recommend Nand2Tetris. I completed it a few months ago as a relatively non-technical person (I had only taken CS50 as my first CS class ever in 2020) and learned a ton.

  32. Recommendslocalhost2022in ““Code” 2nd Edition”

    You program in HDL using the Nand2Tetris software suite [1]. Super fun - I went through the book on my vacation last year. Highly recommended.

    [1] https://www.nand2tetris.org/software

  33. Recommendsjljljl2022in ““Code” 2nd Edition”

    Love this book. Recommend pairing it with Nand2Tetris to get a good understanding of how Computers work:

    https://www.nand2tetris.org/

  34. Recommendsmikewarot2022in “Ask HN: What is one tech product you still can’t comprehend how it’s built?”

    For this, I recommend working through the simulation "game" NAND2Tetris, where you work from the basic building blocks up to an simulated CPU, and onward to programming a game of Tetris.

    I was in Chemistry class when the professor explained how using standard stoichiometric formulae, a transistor worked.... I was gob-smacked... and can NOT find a good equivalent to that using google right now.

  35. Recommendskimburgess2022in “A guide to getting started with embedded systems”

    For an excellent course that covers that full journey (and more): https://www.nand2tetris.org/.

  36. Recommendsacqbu2022in “Ask HN: It's 2022. Where should I direct the youths to learn about programming?”

    I think CS50 (edx) and Nand2Tetris (coursera) would be great courses to start with. Also, freeCodeCamp has some great introductory courses to Python (computing, data, ML etc) as well as web dev (js, react, html/css and even a bit of node).

  37. RecommendsJtsummers2022in “Ask HN: Best way to learn about computing history?”

    So your title and comment suggest two slightly different things. For "how computers work?" I recommend Code by Petzold (higher level, good book) and The Elements of Computing Systems by Nisan and Schocken (also available here: https://www.nand2tetris.org/). The latter is project based and has you develop a computer starting at NAND gates and working up. It can be run through at a good clip while still learning a lot if you're a moderately experienced developer.

    EDIT: Per Amazon there's a second edition of Code coming out at some point, but no date that I've been able to find.

    I've also got a copy of, but not yet read, Ideas That Created the Future: Classic Papers of Computer Science edited by Harry R. Lewis, the contents are in chronological order with the most recent in 1979. It has 46 different papers on computing, being largely historical this ought to be a decent starting point as well.

  38. Recommendsstrikelaserclaw2022in “Ask HN: Which are the best computer science MOOCs?”

    strang, sedgewick and nand2tetris are amazing courses.

  39. Recommendsschnitzelstoat2022in “Ask HN: I realise data science is not for me and feel depressed”

    For a basic intro to compilers/OS I'd recommend the Nand2Tetris course.

    It's the best course I've ever done tbh, and is actually interesting. I never felt like I was forcing my way through it.

  40. Recommendskriro2022in “Linux from Scratch”

    I can recommend The Elements of Computing Systems and the accompanying website https://www.nand2tetris.org/

    Not a game but a pretty good read/work through.

  41. Recommendszoenolan2022in “Ask HN: How to begin learning assembler for university course?”

    A little outside what you asked but https://www.nand2tetris.org/ is a good introduction to computer architecture and assembly.

    For something a little more complex you could have a look at a 68000 course https://www.youtube.com/watch?v=UpNS-IVsBew&list=PL-i3KPjyWo...

  42. Recommendsmikewarot2021in “Ask HN: "Know Your Hardware”: best books/resources to learn?”

    First of all, watch this, and learn that there's a whole stack of layers below what Linux can even touch these days.

    https://www.youtube.com/watch?v=36myc8wQhLo

    For a theoretical understanding, with a much simpler model, I suggest the Nand2Tetris course.

  43. Recommendsnivenkos2021in “Lisp in a Weekend”

    I'd also recommend the Nand2Tetris course / book if you haven't done it already.

  44. RecommendsWoberto2021

    And thus why the excellent course "NAND to Tetris"[1] is named as such.

    [1] https://www.nand2tetris.org/

  45. Recommendsbabelfish2021in “Ask HN: What huge mistake did you make early in your career?”

    Check out the online course Nand2Tetris. I took it my senior year of college as a business major (but had a SWE internship/full-time offer). It was an interesting course and definitely filled the gaps in my knowledge OP describes, but didn’t really make a difference for me as a SWE.

  46. Recommendscowanon222021in “Computer Science from the Bottom Up”

    If you truly want to learn computer science from the basics, I would recommend starting with Nand to Tetris https://www.nand2tetris.org/ and the corresponding book and labs (and Coursera courses), along with Code the hidden language... They cover how a computer is actually build from first principles. After this, Structure and Interoperation of Computer Programs and the Algorithm Design Manual.

  47. Recommendstemporama12021in “Ask HN: Can build CRUD apps, what now?”

    - Take CS50

    - Take Nand2Tetris

    - Take Casey Muratori's upcoming course StarCode Galaxy.

    - Get some inspiration from Jonathan Blow and Casey Muratori on YouTube, and start the rabbit hole there.

    - Be prepared to question a lot of the dogma that you have already absorbed.

  48. Recommendswrycoder2021in “What does any of this have to do with physics? (2016)”

    Late reply, but gdb wouldn’t be used in nand2tetris. Their online grading system accepts only a couple of high level languages. I used Python to write the assembler and compilers.

    What I was trying to say in my previous comment was that one would not want to be a raw beginner when starting nand2tetris. One would need to be thoroughly familiar with basic Python data structures. I used lists, dicts, and a class I wrote to handle the AST nodes.

    I’d recommend nand2tetris before taking a full compiler course.

    We’re agreed that low level understanding is very helpful. And, it’s interesting.

  49. Recommendsdidericis2020in “Become Shell Literate”

    Another book recommendation: "Elements of Computing Systems" by Noam Nisan and Shimon Schocken.

    It doesn't go all the way down to the physics of semiconductors, but it goes down to logic gates and all the way up to tetris (there's a related course/website called nand to tetris: https://www.nand2tetris.org/)

    If you want to go further down, check out Jeri Ellsworth's old videos where she built a transistor at home: https://www.youtube.com/watch?v=w_znRopGtbE

  50. Recommendscarls2020in “NandGame – Build a Computer from Scratch”

    I've done the Coursera course, Nand2Tetris, that inspired this website [1] and found it deeply intellectually satisfying and engaging.

    If anyone is interested in learning about the logical primitives that build up to a computer, and how they're implemented using logic gates, I would deeply recommend the course!

    -----------

    [1] https://www.nand2tetris.org/

  51. Recommendsdanellis2020in “Ask HN: Resources to encourage teen on becoming computer engineer?”

    Go through part one of the nand2tetris course on Coursera to learn what goes on inside a CPU, then build a physical computer using an old CPU like the 6502 or Z80. You'll find lots of inspiration for that on YouTube.

  52. Recommendsrrauenza2020in “Ask HN: Resources to encourage teen on becoming computer engineer?”

    They should definitely try the Nand2tetris online course!

  53. Recommendspizza2342020in “Implement an emulator for a fantasy CPU in JavaScript”

    It ultimately depends on the level of abstraction ("emulating a CPU" is ambiguous): emulating the logical gates of a CPU is an entirely different matter from emulating the instruction set; besides, generally one emulates an entire system, not just the CPU.

    If you're looking for the former, the canonical course is "NAND2Tetris". If you take the class on Coursera, the first (of two parts) covers the hardware.

    I've also seen two very interesting books, but I haven't read them - "The ZX Spectrum Ula: How to Design a Microcomputer", and "Designing Video Game Hardware in Verilog".

    Courses at this level are generally exactly defined.

    In the second case - emulating at the ISA level, the canonical entry is to emulate a CHIP-8, since it's simple and relatively well defined.

    At this level, targets are rarely exactly defined. CHIP-8 for example is well-defined in theory, however, for example, looking at the Wikipedia page won't suffice, because there are many extensions. Additionally, CHIP-8 has no standard clock speed. But it's easy to find the resources, and you can end with an exactly working system (the same can't be easily say, for example, of a NES or a C64 - you'll find conflicting information).

  54. Recommendsdbrueck2020in “Write Your Own Virtual Machine”

    Haha, I came here just to encourage people to check out www.nand2tetris.org too. It's extremely educational.

    It's also realllllly satisfying to play Tetris on something you "built" all the way up from basic logic gates.

    It's a great (and free) course during a pandemic lockdown or a fun project over a holiday break.

  55. Recommendsthatcodingdude2020in “Ask HN: Self-taught webdev with lots of free time. What should I learn?”

    Funny you should mention it, I'm 3 chapters deep in nand to tetris on coursera. It's a great course.

  56. Recommendsmelvinroest2020in “What do you follow to get deeper and diverse understanding of technology skills?”

    For me, one route I went was simply to go up and down the stack. So:

    machine code --> x86-64 --> C --> virtual machines --> JVM --> Java

    I've never gone into the JVM itself, but I followed a course computer systems which gave me an idea how a VM works.

    Another one:

    machine code --> x86-64 --> C --> browser --> JavaScript --> ES6 --> EmberJS (it uses a vm as its rendering engine)

    I've noticed that companies don't care though. They simply care about whether I have enough JavaScript experience. For me, personally though, it made me a lot calmer when solving bugs since lower level bugs are (usually for me) much more of a pain than bugs in JavaScript.

    If you want to figure this path out, I'd recommend https://www.nand2tetris.org/

  57. Recommendscatwind72020in “Let's make a Teeny Tiny compiler”

    nand2tetris is a great course that shows you how to design a computer from the chip level, build an assembler, and write a high level language + compiler that eventually produces the assembly code for the machine architecture _you_ built. I highly recommend it.

  58. Recommendsgitgud2020in “Ask HN: I'm an incoming freshman to college for a CS major, what should I know?”

    Don't feel bad, writing a game engine is one of the most ambitious projects you can do! As it involves many interdisciplinary skills; GUI, Graphics rendering, State management, Physics simulation, Coordinate systems, Sound systems, AI.

    For writing your own OS, I definitely recommend looking at https://www.nand2tetris.org/course it gives you a holistic view of a computer and it's operating system at every level of detail.

  59. Recommendsgitgud2020in “Ask HN: I'm an incoming freshman to college for a CS major, what should I know?”

    The best courses I took in Computer Science (3 years ago) were:

    - Computer Systems: Building a computer system from scratch (virtually) logic gates to applications https://www.nand2tetris.org/book

    - Computer Networks and Applications: An overview of network protocols and layers, basically how the internet works.

    - Event-Driven Computing: How to make GUI's, state-machines, event-driven systems are used everywhere.

    - Computer Graphics: Understanding how graphics pipelines and OpenGL shaders work. Building a game from scratch in C.

    They might not be interesting to everyone, but I felt these were the most fun and practical in learning how computers work and how to build software.

  60. Recommendsair72020in “Ask HN: What scientific phenomenon do you wish someone would explain better?”

    There's a great course called NAND to Tetris, which teaches, by example, at increasing levels of complexity starting from simple logic gates up to an actual program. It's very good. https://www.nand2tetris.org/

  61. RecommendsJoeSmithson2020in “How These Things Work – A book about CS from first principles (2016)”

    In a similar vein, I highly recommend the MOOC "nand2tetris" which progresses smoothly from simple logic circuits right up to a high level Java-like programming language.

  62. RecommendsKlinky2019in “ZedRipper: A 16-core Z80 laptop”

    You should check out https://eater.net/ and https://www.nand2tetris.org/. Both breakdown a lot of the complexity around building a homebrew computer using off the shelf components.

  63. Recommendsbamboozled2019in “YouTube is taking down educational hacking videos”

    With all due respect, the question was about more modern times. I feel like this was better advice in the 90s and early 2000s. It's not like knowing those things is bad, I just don't know how applicable it is now.

    Today the scope is far too big and there are far too many different hacking disciplines now. The advice above was probably more suited to a time when people used to be granted shell access to university computers. We live in a world where people don't even run web applications in on servers anymore, rather containers hosted in cloud platforms.

    That said, you really should develop a sound understanding of how computers work at a low level, it doesn't have to be perfect; but it helps you understand how even modern systems can be flawed (under all the shiny cloud marketing, they're computers after all). I would start with doing a course like: https://www.nand2tetris.org/.

    Once that foundational knowledge is understood, learn how computer networks work (IP, TCP, UDP), network stacks and then higher level protocols like HTTP, HTTP(s) and other layer 7 protocols. Learning about databases is good too, basic SQL skills are useful.

    By this stage you will probably bee having too much fun building new things using all the knowledge you've acquired rather than breaking other peoples stuff; Then again I guess it can still be fun to experiment with that too.

  64. Recommendsbschne2019in “Collapse OS”

    For people interested in this sort of thing, I can recommend the Nand2Tetris Courses[1] (also on Coursera).

    They basically walk you through assembling and programming a full CPU from nothing but NAND-gates in a hardware description language, and in the second part even adding a compiler and higher-level language to the stack.

    1. https://www.nand2tetris.org/

  65. RecommendsArtWomb2019in “Ask HN: Good MOOC/course on computer software/hardware performance engineering?”

    From NAND to Tetris is probably the most popular

    https://www.nand2tetris.org/

    You can also try searching for classes entitled "Advanced Computer Architecture" like so:

    http://www.sci.tamucc.edu/~sking/Courses/COSC5351/syllabus.p...

    I'd also check out Berkeley's FireSim tutorials and community

    https://fires.im/

    Best of luck! There is no down side to mastery of these dark arts ;)

  66. Recommendscweagans2019in “I don't know how CPUs work so I simulated one in code”

    https://www.nand2tetris.org/ goes through the same process. Highly recommend!

  67. Recommendsultrasounder2019in “Ask HN: Getting into lower-level microcontroller coding”

    Upvoting this as I just started following this course myself (archived but all the material Is still available). The kit is self sufficient and with some basic C programming skills one gets cut their teeth on all relevant real world embedded design methodologies. I am also taking the NAND2TETRIS course in parallel and can now start appreciating the hardware/software interface. Highly recommend that course and the accompanying book.

  68. Recommendslancefisher2019in “Ask HN: Best book for understanding hardware-software interface”

    I also highly recommended working through The Elements of Computing Systems by Noam Nisam. There’s more info available at the website https://www.nand2tetris.org/

  69. Recommendspkilgore2019in “Anatomy of a Hack assembly program”

    Oh man, this made me remember how much I loved this course. I highly recommend the Coursera version to anyone who didnt come from CS and wants to truly understand how a bunch of on and off switches become a computer.

    That reminds me I should probably take part two... (Although once you write a compiler its easier to see the road ahead than when you've only got a NAND gate).

  70. Recommendsioseph2018in “Ask HN: How to get started developing with FPGA?”

    I'd actually recommend learning digital design first. Go through a course like nand2tetris. If you are writing HDL without a solid idea of what RTL logic you expect to get back you're in for a hard time.

  71. Recommendsagentultra2018in “Should you learn C to “learn how the computer works”?”

    Good article.

    If your goal is to learn how computers work I think an education in C will follow a long, twisting pedagogy. It is more likely you will encounter subjects that will teach you how computers work by using C. However you can also happily program in C without understanding how memory is managed beyond developing an intuition for using malloc, free, and pointers.

    If you want to be more direct why not build a computer from scratch [0]? Or take a course on operating systems [1]?

    [0] https://www.nand2tetris.org/ [1] https://wiki.osdev.org/Getting_Started

  72. Recommendsdagw2018in “Ask HN: Computer architecture focussed on students”

    Nand2Tetris is one of the most fun online courses I've done. I'd also highly recommended just as a purely intellectual exercise even to someone who had no interest in working with any of the concepts taught.

  73. Recommendsshacharz2018in “A2Z: A computer designed and built from scratch. Custom CPU on FPGA (2017)”

    There's the great nand2tetris course [1] - teaches step by step how to build a computer from the simplest logical gates, using hdl, to building your own ALU, computer, and later on operating system, etc'.

    [1] https://www.nand2tetris.org/

  74. Recommendsdevilsbabe2018in “Ask HN: What are you working on this weekend?”

    Continuing the amazing course on https://www.nand2tetris.org/. I also received an HP microserver gen8 a few days ago and will be setting up a plex server with sonarr/radarr/ombi/etc...

  75. RecommendsKagerjay2018in “Teach Yourself Computer Science”

    I quickly audited all the courses a few months ago, I find OSSU to be much easier to grasp than teachyourselfcs.com because it doesn't always use modern day MOOC's which makes learning things way quicker

    You can learn things by a book sure. But if you go on a udemy or coursea or whatever course, there's always Q/A comments with other people working on the same course and that insight is extremely invaluable so this is why I prefer OSSU over teachyourselfcs.com. I prefer MOOC's because there's also some level of accountability as well, you can go for the certificates too but I don't really care too much about them.

    OSSU does have way too many topics just pick 80% of them and you should be okay, depending on what your weaknesses are.

    Some course overlap in both so you should focus on those first and foremost. These include things like nand2tetris, 3blue1brown's linear algebra, data structures & algorithms (various choices, sedgewick, skienna, etc).

    Do your homework on reddit threads as well before picking one or the other.

    I like OSSU because it also tells you what the prereqs are clearly as well.

    Currently doing nand2tetris because I have a lack of hardware knowledge and the course is fantastic. Also doing a lot of math courses so I can do mathmatical proofs much easier to understand why one algorithm is better than another, or how to derive it based on whoever invented it etc. I prefer a traditional book for math though, but everything else I prefer MOOC's.

  76. Recommendsiooi2018in “Ask HN: What are the best MOOCs you've taken?”
    Nand2Tetris was my favorite.

    Yes! Nand2Tetris came about before "MOOC" was even coined. It's a great course where you start building simple circuits in a hardware simulator, and eventually build a working Tetris game -- on hardware you built (running in a simulator), in an OS you wrote.

    Highly, highly recommend it.

  77. Recommendsteacpde2018in “Why Raspberry Pi Isn't Vulnerable to Spectre or Meltdown”

    I highly recommend http://www.nand2tetris.org/ and the The Elements of Computing Systems book https://www.amazon.com/Elements-Computing-Systems-Building-P...

  78. Recommendsmonaghanboy2017

    i'm self-taught, ph.d. dropout in math. i work for a unicorn in silicon valley; i've done full-stack development and lately devops and cloud infrastructure. learn enough python/java to go through the entirety of http://nand2tetris.org/; this will help you understand basic computer architecture. from there, you can pick and choose from among the courses in https://teachyourselfcs.com, but i'd recommend taking at least computer networking and operating systems. ds&a is good and a prerequisite for interviewing at most companies.

    it would help to do this in parallel with some form of employment, as working will teach you practical software engineering skills that you'll never get from reading books. but you'll be more time-constrained, so you'll have to have really good time-management skills.

    also, being around good engineers is a form of education. good co-workers can help expose gaps in your knowledge and skills, which you should strive to amend.

  79. Recommendsmarkshead2017in “The underground story of Cobra, the 1980s’ illicit handmade computer”

    If the idea of building a computer and understanding what every part does sounds interesting, I'd highly recommend checking this out:

    http://nand2tetris.org/

  80. RecommendsSonOfLilit2017in “Making a virtual machine in Google Sheets”

    Not that hard. Allow me to recommend NAND2Tetris, one of the best courses I've ever tried, that has a great practical lesson on exactly that.

  81. Recommendsnyxtom2017in “Ask HN: Teaching Code to Someone That Asked Me for a Job”

    Make sure you set project oriented goals, this might help eliminate the issue of him asking you to fix things for him all the time and also create some foundational skills. Also, there are some wonderful classes online that go from basic logic to coding skills all the way up the stack. Check out http://www.nand2tetris.org/

  82. Recommendsphaemon2017in “Ask HN: What are some books where the reader learns by building one project?”

    You're fooling no-one, Shimon... ;)

    Just a joke: the course is by Noam Nisan & Shimon Schocken

    The accompanying book is "The Elements of Computing Systems" and Part 1 is available as a course on Coursera. I highly recommend it; just finishing the Coursera course myself and I'll definitely be doing Part 2.

  83. Recommendse192930012015in “Megaprocessor”

    I just finished the course from coursera https://www.coursera.org/course/nand2tetris1. It is a very good start learning from the course or from the book for those who are interested to build something like this. I highly recommend it.

  84. Recommendsgalaktor2015in “Nand to Tetris 1”

    There is a course [1] where you learn from basic circuits design through writing a programming language until you use that language to write tetris. It is called nand2tetris. I can only assume the author will describe that course or its contents.

    A friend of mine took the course, said it was great.

    [1 ]http://www.nand2tetris.org

  85. RecommendsSwinx432014in “Writing a simple operating system from scratch (2010) [pdf]”

    This looks really interesting. Another course / book that I have used in the past which was great for getting to grips with the ideas of an entire system from scratch was http://www.nand2tetris.org/

  86. Recommendsjweather2013in “Ask HN: did you ever implement a toy processor?”

    TKGate (http://www.tkgate.org/) is an awesome visual tool for discrete logic simulation, and comes with a toy processor as an example circuit. I implemented a simple 32-bit MIPS-like processor in TKGate as well as the DLX architecture from Hennessey and Patterson. I also designed and implemented my own microcoded 8-bit processor for variety. That project eventually included bootstrapped assemblers and disassemblers, and an emulator in C for faster simulations. Here's some of my TKGate work: http://xidus.xidus.net/mips

    Check out TECS/NAND2Tetris to get started with VHDL and processor architecture: http://www.nand2tetris.org/ If you want a more academic approach, try Hennessey and Patterson's Computer Architecture: A Quantitative Approach.

  87. Recommendssanoli2013in “Where to begin when learning C? Start by making lots of errors”

    This book and its companion (free) online course are great: http://mitpress.mit.edu/books/elements-computing-systems http://www.nand2tetris.org

  88. Recommendsacc002013in “Microcode: the place where hardware and software meet”

    I highly recommend the book, and the course, http://www.nand2tetris.org/ (previously known as The Elements of Computing Systems or TECS).

    This starts with discussion on NAND gates and goes through building CPU components, to a complete computer, to implementing a high-level language for it.

    (All the chapters from the book revevant to your question are available as free PDFs).

  89. Recommendsamccollum2011in “Online course: Build your own simulated computer, assembler, lang, OS, & game”

    I actually took this course in person when Professor Schocken visited Harvard. It is a fantastic course that is extremely valuable for everyone from those who only have basic programming skills to advanced CS students (I took it as a senior after already having taken classes on operating system design and programming languages). In the class we did jump around a bit in the later chapters, and so I feel like one could probably approach the material in many different ways.

    The exercises are very straight-forward and will not be extremely time-consuming for those who are already skilled at CS, but the course is best treated like a tour through CS rather than an in-depth study of any particular area.

  90. Recommendsolavk2010in “What should a self-taught programmer with no degree learn/read?”

    I recommended The Elements of Computing Systems: Building a Modern Computer from First Principles http://www1.idc.ac.il/tecs/ It's a great book/course which takes you through all the abstraction layers from chip architecture to OO-programming.

    After that, I recommend SICP.

    When you are self-taught you easily end up with big holes in your knowledge, because you typically focus on what you need to know in your current project. These two books are great because they cover a lot of ground (different abstraction levels, different paradigms) while still remaining practical.

  91. Mentionsbrailsafe2024in “Kernel developer write a USB driver in 3h for Apple Xserve front-panel [video]”
    Additionally I find it hard to resist learning new technologies that are not as widely used / changing quickly do to their ease of use (Svelte, Tauri, V lang, etc).

    One thing I'd suggest is to be somewhat critical of what it means to be learning something, and find a way to apply whatever that is multiple times, without spreading yourself too thin.

    When I was getting started around the same age, I never bothered repping things out like at a gym or going deeper into how things worked and piecing them back together manually from scratch (such as the micro-gpt project), but those are two ways you can keep things interesting long term, and develop useful/practical knowledge. Instead, what I did was read a book or follow a tutorial and figured that was enough to learn, but it's often just what was possible to teach, or a good jumping-off point, and that's basically what I've been getting from GPT lately. Nothing really gets learned imo unless there's an input and output to the process, such as watching the video and writing all the code from scratch or on paper, and then hopefully building something with it where you'll be forced to push yourself mentally. Very little of the depth might apply in a job, but you'll be better at troubleshooting and understanding what's happening, and repping out gradually more abstract and complex projects using the same technology will make you more efficient. Especially with ADHD that I didn't realize I had earlier, it would have really helped to rep things out more, because only through repetition and expanding complexity do you understand the gritty bits that aren't complete, or areas where you're likely to need another tool, or useful shortcuts and edge cases etc..

    Incidentally, NAND2TETRIS is a great example of an end to end course that is totally worth trying and slowly grinding through.

  92. Mentionsjamestimmins2023in “Can we create a thread for some of the best materials on CS available online?”

    The book (and course, IIRC) is split across two books. The first one focuses on the lower level systems, and I believe the seconds one deals with the bootloader, language implementation, screen animation, and building the game.

    It doesn't look like there are multiple versions of the books, unless I'm missing something. I did the two versions of the course without the book, and really enjoyed both. Although the writers of https://teachyourselfcs.com/ only recommend the first one, so it depends what you want to get out of it and whether the approach resonates.

  93. Mentionspstoll2022in “NandGame – Build a Computer from Scratch”

    This seems similar, but perhaps less ambitious, than the very well done Nand-To-Tetris (https://www.nand2tetris.org/) - anyone know both?

    Nand2Tetris has open source simulators, great docs, lectures / help via coursera. I’ve used it with kids.

    Admitted bias as EE who used circuits & assembly back in the day in addition to CS, but I do think knowing the underlying “machine” of compute helps inform good systems thinking / trade offs. Plus it’s fun for people who are engaged by this type of logic puzzles / problem solving, which I think is a large set of folks who like software.

  94. Mentionsnetmonk2019in “My Favorite Programming Problem to Teach: Digit Length”

    I understand what you say, but i think you are wrong. Assembly is closest to what a cpu actually does for REAL, so you are programming. When using Python or whatever any advanced language, you are less programming CPU and more relying and tons of layers from other's works which are basically created to never let you understand how to program a CPU. So peoples feels they are programming, while they are just integrating tons of library and set them to do something usefull (which is good too).

    But if you want to teach programming, i would follow my path, and provide a deeper understanding at how to control a cpu and how it really works. In order to demystify computer and gives student a real experience of all the hidden works that are done with a 4 lines python code.

    and for the fun side, guess why assembly is the second searched language on Stack overflow during weekend : https://stackoverflow.blog/2017/02/07/what-programming-langu...

    i guess people are trying to have more fun on weekend than on boring office project during work days :)

    And those numbers show a real interest about Assembly which is usually greatly discarded in any common CS teaching anywere. So teachers decides it's not interesting, while in fact most peoples search about it on weekend...I mean it illustrates a real issue here. May be understanding how to program a cpu at low level is something natural, that only scholar peoples cannot understand, therefore neglecting natural tendency of normal peoples to try to understand how things really work...

    And for those really wanting to even dig deeper and understand what is a CPU, i strongly suggest looking for "from nand to tetris" https://www.nand2tetris.org/ wich basically start at nand logical gate, to the extent to create a full working cpu and programming it to play tetris.

  95. Mentionsindigochill2017in “Petya: “I Want to Believe””

    I'll take a stab at a newb-friendly explanation, bearing in mind I'm only slightly less of a newb, but have at least studied this stuff to some extent and have played with https://microcorruption.com, which is a game about maliciously editing machine instructions. Onwards!

    CPUs have a fixed instruction set. Add, subtract, increment by 1, and so on. These instructions in turn are represented in machine language as a binary string, which represents signals that get sent to the CPU's processing center, the ALU (Arithmetic Logic Unit). The ALU has a number of input ports, with each one corresponding to a different fundamental operation.

    There are a number of programs capable of taking an executable and providing a step-by-step breakdown in machine language (which makes sense intuitively because the machine has to do this for itself anyway in order to execute the program). So once you have the machine language instructions, you then study it to see what different sets of instructions are doing. This is made somewhat easier by the fact that computers run through instructions linearly (with the exception of jumps, but you also know that jumps represent some sort of logic operating on input, so those are informative as well).

    Although this would take forever to do manually, there are programs that aid in breaking machine language into easier-to-understand chunks, like IDA.

    Anyway, once you understand what different chunks of instructions are doing, then you can decide how you want to alter the program. You can use a hex editor for the actual editing (I assume professionals use something different, but some game modders use hex editors), which simply lets you change the individual bits on your drive (if this sounds impressive, realize that every time you save a file or something, that's what's going on at a large scale).

    If you want a gentle, newbie-friendly introduction to CPUs which will make a lot of this stuff click better, I highly recommend the NAND to Tetris course, which has a video series on Coursera: https://www.coursera.org/learn/build-a-computer

Related courses

Keyboard

In the course grid
←↑→↓
Move between courses
Home End
Start / end of row (with Ctrl: first / last)
PgUp PgDn
Jump several rows
Enter
Open course
S
Save / unsave course
1–5
Best, Trending, Hidden gems, Evergreen, Saved
[ ]
Previous / next topic
On a course page
← →
Previous / next course in your list
S
Save / unsave
O
Open the course website
Esc
Back to the grid
Everywhere
/
Search
T
Light / dark theme
?
This help