15 ms·
From Nand to Tetris (2017)
- dang 3y agoRelated. Others? Ask HN: What books or courses do you know similar to "From Nand to Tetris"? - https://news.ycombinator.com/item?id=36853931 https://news.ycombinator.com/item?id=36853931 - July 2023 (29 comments) From Nand to Tetris (Building a Modern Computer From First Principles) - https://news.ycombinator.com/item?id=27030046 https://news.ycombinator.com/item?id=27030046 - May 2021 (1 comment) The Elements of Computing Systems, Second Edition - https://news.ycombinator.com/item?id=26036790 https://news.ycombinator.com/item?id=26036790 - Feb 2021 (97 comments) July 2021: 2nd edition of The Elements of Computing Systems - https://news.ycombinator.com/item?id=25329763 https://news.ycombinator.com/item?id=25329763 - Dec 2020 (1 comment) From Nand to Tetris: Building a Modern Computer from First Principles - https://news.ycombinator.com/item?id=18519883 https://news.ycombinator.com/item?id=18519883 - Nov 2018 (47 comments) Build a Modern Computer from First Principles: Nand to Tetris Part II - https://news.ycombinator.com/item?id=14526344 https://news.ycombinator.com/item?id=14526344 - June 2017 (35 comments) Build a Modern Computer from First Principles: From Nand to Tetris - https://news.ycombinator.com/item?id=13209452 https://news.ycombinator.com/item?id=13209452 - Dec 2016 (17 comments) Building a Modern Computer from First Principles - https://news.ycombinator.com/item?id=12333508 https://news.ycombinator.com/item?id=12333508 - Aug 2016 (26 comments) Nand2Tetris: Building a Modern Computer from First Principles - https://news.ycombinator.com/item?id=10369795 https://news.ycombinator.com/item?id=10369795 - Oct 2015 (1 comment) VHDL implementation of Hack computer from “Nand to Tetris” - https://news.ycombinator.com/item?id=10021275 https://news.ycombinator.com/item?id=10021275 - Aug 2015 (4 comments) Nand to Tetris 1 - https://news.ycombinator.com/item?id=9593114 https://news.ycombinator.com/item?id=9593114 - May 2015 (24 comments) From NAND to Tetris: The Elements of Computing Systems [repost] - https://news.ycombinator.com/item?id=6963338 https://news.ycombinator.com/item?id=6963338 - Dec 2013 (3 comments) Building a Modern Computer from First Principles - https://news.ycombinator.com/item?id=5888705 https://news.ycombinator.com/item?id=5888705 - June 2013 (83 comments) Building a Modern Computer from First Principles - https://news.ycombinator.com/item?id=4643836 https://news.ycombinator.com/item?id=4643836 - Oct 2012 (1 comment) Online course: Build your own simulated computer, assembler, lang, OS, & game - https://news.ycombinator.com/item?id=2928973 https://news.ycombinator.com/item?id=2928973 - Aug 2011 (29 comments) Elements of Computing Systems - Building a Modern Computer from 1st Principles - https://news.ycombinator.com/item?id=2273098 https://news.ycombinator.com/item?id=2273098 - Feb 2011 (2 comments) The Elements of Computing Systems ("From NAND to Tetris") - https://news.ycombinator.com/item?id=1834864 https://news.ycombinator.com/item?id=1834864 - Oct 2010 (2 comments) From Nand to Tetris in 12 steps - https://news.ycombinator.com/item?id=399141 https://news.ycombinator.com/item?id=399141 - Dec 2008 (3 comments) Building a Modern Computer from First Principles - https://news.ycombinator.com/item?id=205322 https://news.ycombinator.com/item?id=205322 - May 2008 (9 comments)
- AlecSchueler 3y agoGreat 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'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. 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. 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. Eventually we got stumped, but I'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. Can'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't seem so appealing, but the read was still fantastic.
- mitsu_at 3y agoReminded of the Code Golf challenge to build a working game of Tetris in Conway's Game of Life: https://codegolf.stackexchange.com/questions/11880/build-a-working-game-of-tetris-in-conways-game-of-life https://codegolf.stackexchange.com/questions/11880/build-a-w...
- yeswecatan 3y agoThose who have completed this, do you recommend the book or MOOC?
- weiliddat 3y agoI found the book more accessible, if you just want to flip through it, or have it open while completing some of the projects. I'm at the last chapter of the book, while a few years back doing the course, I only completed 3 projects. But of course, if you've completed many other MOOCs and like that format, go for it. Just start and see where that takes you.
- nyxtom 3y agoLoved 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
- alabhyajindal 3y agoMy initial interest in the computer'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. I completed the first two projects a few months ago. Hoping to come back to it to complete the rest!
- aronhegedus 3y agoI did this over a summer and really recommend it! The pacing was just right for me
- syntacticbs 3y agoI completed both parts of this on Coursera. It can be a very challenging course at times but it'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.
- mikpanko 3y agoHere is a fun Nand game inspired by the course: https://nandgame.com/ https://nandgame.com/
- AlchemistCamp 3y agoHere’s an even more fun one with overwhelmingly positive Steam reviews! https://store.steampowered.com/app/1444480/Turing_Complete/ https://store.steampowered.com/app/1444480/Turing_Complete/
- geoelectric 3y agoTuring Complete is a great game. Finishing it was a major sense of accomplishment for me, particularly since I rarely complete games (though Zachlikes are a common exception). This is from my Steam review (one of two ever, I liked it so much): > Man, what a trip. I’ve played the NAND game and MRHD, among others, but never quite got to the “build a computer” endgame. I did with this one. At this point I’ve built a 256-byte RAM system that does six math instructions, six conditional jumps, and subroutine calls using its own stack—then developed my own assembly language for it which I'm now using in the endgame to solve more traditional programming puzzles. > And I designed and built the entire architecture for it myself. The initial levels are mostly "one solution only" problems that each results in you designing a component. But by the time you're at midgame, all the decisions are yours as long as the output is correct. Previous problems tend to hint towards partial solutions of later problems, but very little is given to you outright. That gives you an incredible sense of accomplishment for what you put together. That said, unless they improved the bit where wiring tends to merge together and virtually short out during edits, it can be a little frustrating once things get very complex. It's not enough for me to not recommend it, but there was a point where I felt like I was having to master the tricky interface quirks as much or more than the logic. Shenzen IO did that part much better.
- SilasX 3y agoI've completed both nand2tetris and Turing Complete. A note about differences: - TC only goes up to the level of writing programs in assembly, while nand2tetris has you build layers of abstraction on top of that so you can program in a Java-like language. In fact, TC doesn't give you "assembly code" at all, you just implement binary instructions, and they leave it to you to decide your own mnemonics for each byte of the 4-byte instructions (on the second computer you implement). - TC lets you make more of the decisions yourself regarding architecture, like how to address memory. One thing I didn't like about TC is that, when doing the projects to build the (second) computer, it doesn't regression test. When you implement new opcodes, you can be credited for completing the level, even though you broke the previous ones you implemented, and you might not realize it until several projects later, when your computer doesn't work.
- 2OEH8eoCRo0 3y agoThis project helped me get my first job after college.
- ess3 3y agoCannot recommend this course enough
- yoyohello13 3y agoI 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've got the time.
- hnthrowaway0328 3y agoCongratulations! Did you switch to a lower level programming career path?
- yoyohello13 3y agoI'm making apps for a local company now. Still valuable info though. I use the text parsing knowledge I gained from this course quite a bit.
- hnthrowaway0328 3y agoThat's pretty good. I'm glad that you made the switch you wanted.
- Semitangent 3y agoI found nand2tetris a very natural progression for me after finishing Ben Eater's great 8bit computer series (https://eater.net/8bit/ https://eater.net/8bit/). 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!
- Night_Thastus 3y agoSecond recommending Ben Eater. I love his videos. Two of my favorites are the introduction of loops, and the introduction of interrupts. Seeing the code he wrote re-written using these to be so much more elegant was very satisfying.
- jameshart 3y agoFor me the 'aha' moment was the microcode section of the 8-bit computer project. Just the physical understanding of how it can take a different number of clock cycles to execute an 'instruction' - and how (in this architecture) every instruction cycle has to start with the memory address switching to the current program counter, and the data from that address being loaded into a register. I haven't gone as far as actually building a breadboard CPU, but I was able to apply what Ben teaches to build several functional microprocessors in https://www.falstad.com/circuit/circuitjs.html https://www.falstad.com/circuit/circuitjs.html, starting with basically reimplementing the breadboard model he built out.. but then after watching the 6502 series, going back and being able to see and even implement some of the things that implies about the internals of a 6502 processor.
- captn3m0 3y agoI did nand2tetris during my time at Recurse, and I spent a lot of time watching Ben Eater those days. They paired nicely.
- JKCalhoun 3y agoDid Ben Eaters 6502 computer this past summer. Can also recommend. Guess I'll have to look into NAND to Tetris now.
- grendelt 3y agoThe book is great - so, so cool seeing the layer upon layer of logic (and abstractions) that build up.
- pythops 3y agoThere is also this repo from george hotz, very interesting ! https://github.com/geohot/fromthetransistor https://github.com/geohot/fromthetransistor
- jpcfl 3y agoI wasn't sure what I was looking at at first, since there's no material, just a rough outline of a hypothetical course. The initial commit makes it a little clearer: > Wrote this a few years ago, wanted to put it online. Hiring is hard, a lot of modern CS education is really bad, and it's so hard to find people who understand the modern computer stack from first principles. Maybe if I ever get 12 free weeks again I'll offer this as a play at home course. I want to play too.
- slalomskiing 3y agoIt’s funny he says a lot of modern CS education is bad I did Computer Engineering rather than CS for undergrad and we covered like 80% of the topics in that list Had multiple courses in Verilog/OS and worked a lot with microcontrollers/FPGAs. Building a CPU in verilog then writing an assembler/compiler was definitely the highlight. Was a hard program but I felt like I had a really good understanding of the full stack coming out of it. Maybe he just isn’t familiar with CE?
- throwaway17_17 3y agoWhere I’m did you do undergrad. My son is not having much success finding a college to shoot for in terms of having a goal. I think a curriculum like you describe would at least show him some options that exist.
- deleted 3y ago[deleted]
- meter 3y agoI 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. 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. 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. 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. Highly recommended.
- shostack 3y agoThis and books like Code give me such deep respect for the people who originally figured these things out.
- Lamad1234 3y agoI've read Code and most of Computer Systems, a Programmer's perspective, but doing something by hand would've still been better!!
- superfunny 3y agoWe did the whole project as part of a class; it was one of the best classes I took in my CompSci program. It was excellent.
- MichaelZuo 3y agoHow did you learn the prerequisite solid state physics knowledge in order to fully understand the background behind the first two chapters? e.g. The actual mechanism by which an integrated circuit transforms input into useful output. I've never been able to find a solid explanation on how even the simplest real world integrated circuit, such as a TI SN7400, actually does that.
- jon-wood 3y agoThe course explicitly states that it’s not a physics, or even really an electronics, course. It doesn’t go into the gritty details of how all this stuff works in the real world, just how once it does work you can string it all together to build a computer and then a virtual machine to run on it.
- datameta 3y agoI 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.
- pkilgore 3y agoI graduated from this and I cannot recommend it highly enough. If you don't have a computer science or EE background, it completely de-mystifies the fundamentals of your machine in a deeply engaging way.
- elevaet 3y agoI wonder if the prequel "sand2nand" would be possible as a DIY project?
- samvher 3y agoSure: http://sam.zeloof.xyz/first-ic/ http://sam.zeloof.xyz/first-ic/
- elevaet 3y agoAre you the same Sam? Either way, nice project wow!
- Two9A 3y agoOh goodness, this is the kind of thing I've been trying to find for years now: some method of making a computer from scratch, as in from raw materials. Will have to look into your progress, thanks.
- partomniscient 3y agoThe Great Tinkertoy Computer [1] is made from raw materials, although its specific rather than a general purpose computer, and had computer aided design although back in the day it was via a PDP-10. [1] https://www.computerhistory.org/collections/catalog/X39.81 https://www.computerhistory.org/collections/catalog/X39.81
- samvher 3y agoJust to clarify, not my project! :)
- jackphilson 3y agoIf I'm into web development, how practically useful is learning low level stuff like this, factoring in opportunity cost?
- frakt0x90 3y agoIn my opinion, learning anything in your field is useful because it helps you form a better mental representation of what you're doing. Will building electronics directly help with mundane web dev? Maybe not. But if you think it's cool, do it! Have fun! Broaden your horizons!
- gorjusborg 3y agoI see this question as analogous to 'how useful is building a car from scratch?' The person building a cat from scratch will undoubtedly understand more than others, and may be able to fix that home brew car. They may, with some difficulty be able to apply that understanding to other cars. But, you definitely don't need to build a car from scratch to be a race car driver.
- kjs3 3y agobuilding a cat from scratch That would be an interesting project.
- aleph_minus_one 3y ago> building a cat from scratch > That would be an interesting project. Here is the source code of the OpenBSD implementation of cat: > https://github.com/openbsd/src/blob/master/bin/cat/cat.c https://github.com/openbsd/src/blob/master/bin/cat/cat.c and here of the GNU coreutils implementation: > https://github.com/coreutils/coreutils/blob/master/src/cat.c https://github.com/coreutils/coreutils/blob/master/src/cat.c Thus: I don't think building a cat from scratch or creating a tutorial about that topic is particularly hard (even though the HN audience would likely be interested in it). :-)
- 3y ago
- huytersd 3y agoNothing is going to beat the SAP-1 computer and original textbook by Malvino for this experience.
- bmitc 3y agoIs the book you're referring to Digital Computer Electronics by Albert Paul Malvino?
- huytersd 3y agoYes, that’s the one. I built one of those about 7 years ago.
- bmitc 3y agoThank you! You built it in hardware?
- huytersd 3y agoYes, there is a component list at the back of the book that lists everything you need. The whole book is about building the simple as possible computer while explaining each part of it. It was a fantastic experience. Pretty sure that’s the same one that Ben Eater built based off of this book.
- bmitc 3y agoOh, nice. Thanks for the reference. I'll check it out.
- porridgeraisin 3y agoCannot recommend it enough.
- charcircuit 3y ago[flagged]
- lebean 3y agoThink more along the lines of von Neumann machines, rather than a M2 Macbook Pro. The 40s rather than right now. "Modern" can denote a specific era in the past, or the current time, depending on the context in which the word is used.
- charcircuit 3y ago>"Modern" can denote a specific era in the past No, it can't. Modern can not refer to a previous era.
- msla 3y agoMan, there's not only postmodern, there's post-contemporary. Where do you even go from there? https://en.wikipedia.org/wiki/Post-contemporary https://en.wikipedia.org/wiki/Post-contemporary
- lebean 3y agoThat's it. We're nearing the end of time. I'm sorry to be the bearer of bad news, but this is it. I had a good time, thanks everyone! Good bye.
- pvg 3y agoThis is a silly argument but it very much can. https://en.wikipedia.org/wiki/Modern_era https://en.wikipedia.org/wiki/Modern_era https://en.wikipedia.org/wiki/Early_modern_period https://en.wikipedia.org/wiki/Early_modern_period
- charcircuit 3y ago>The modern era[a] is the period of human history that succeeds the Middle Ages (which ended around 1500 AD) up to the present. This was coined in around 1500 AD to refer to the current era. If the present is the modern era, then that backs up my position that modern refers to the current time.
- emschwartz 3y agoI loved this course and would strongly recommend it to anyone who works with computers that hasn't taken low-level CS classes. 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. Really can'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.
- CWIZO 3y agoIs the online course and the book the same material? Trying to figure out if I need both or either.
- aleph_minus_one 3y agoThe two online courses at Coursera are based on the First Edition of "The Elements of Computing Systems: Building a Modern Computer from First Principles": https://www.amazon.com/Elements-Computing-Systems-Building-Principles/dp/0262640686/ https://www.amazon.com/Elements-Computing-Systems-Building-P... The most recent edition of this book is the Second Edition: https://www.amazon.com/dp/0262539802/ https://www.amazon.com/dp/0262539802/ To quote from the Preface concerning what the difference between these two editions is: "The Second Edition Although Nand to Tetris was always structured around two themes, the second edition makes this structure explicit: The book is now divided into two distinct and standalone parts, Part I: Hardware and Part II: Software. Each part consists of six chapters and six projects and begins with a newly written introduction that sets the stage for the part’s chapters. Importantly, the two parts are independent of each other. Thus, the new book structure lends itself well to quarter-long as well as semester-long courses. In addition to the two new introduction chapters, the second edition features four new appendices. Following the requests of many learners, these new appendices give focused presentations of various technical topics that, in the first edition, were scattered across the chapters. Another new appendix provides a formal proof that any Boolean function can be built from Nand operators, adding a theoretical perspective to the applied hardware construction projects. Many new sections, figures, and examples were added. All the chapters and project materials were rewritten with an emphasis on separating abstraction from implementation—a major theme in Nand to Tetris. We took special care to add examples and sections that address the thousands of questions that were posted over the years in Nand to Tetris Q&A forums."
- mnsc 3y agoIs the estimated hours realistic? 43 hours for part 1 and 89 for part.
- jobs_throwaway 3y agoSounds about right from my experience. I did this in a 10-week academic quarter spending ~10-15 hours a week on the projects. Might be a bit more time if you have little background or lack someone to explain things to you if/when you get stuck. The compiler and OS are by far the most arduous parts.
- brailsafe 3y agoMuch like any software, it depends on how quickly you get the hang of it, how many blocks of good time you can allocate, and what your existing exposure is to digital logic and circuits. I'm on the final chapter of the hardware section after probably 5 months, where the last 2 months haven't been nearly as focused and it showed immediately in my progress, and overall I feel like my success rate looks like a bell curve; confusing at first and slow, then not confusing and more productive, and then the CPU took me like a month of taking periodic goes at it. Now at the assembler, I feel like this the easier part of any sequential programming involved in the latter half of the course, and it'll ramp up significantly. 89 seems plausible, if you get lucky, have good combinatorial logic exposure already, and can really dedicate a decent portion of most days to it, but I'd probably say that's a generous minimum.
- dbrueck 3y agoIt'll vary a lot by your background and how much you play around along the way. If you're pretty familiar with most of the concepts and stick to the requirements, you can do the whole thing in 40-50h. OTOH, if you're encountering new concepts and really want to internalize them and/or if you take fun detours then I'd plan on 100-150h or more.
- bmitc 3y agoIt also varies by how professional you provide your solutions. If you start wanting to test things, give proper errors, etc., it will start increasing the time needed by quite a lot.
- j_m_b 3y agoI loved and completed this course, just wish I could actually be working on this in my day job!
- atulvi 3y agoI want sand2tetris next.
- JKCalhoun 3y agoSand2NAND is the only thing missing. I'm reminded though of the late Dave Gingery's series of books, Shop From Scrap [1] where he tries to take you from building a foundry up to machine tools: [1] https://gingerybookstore.com/MetalWorkingShopFromScrapSeries.html https://gingerybookstore.com/MetalWorkingShopFromScrapSeries...
- shpx 3y agoStill waiting for Quantum Mechanics to Tetris
- cadr 3y agoMy favorite thing about the book is that each section builds on things, but you don'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.
- cushychicken 3y agoDoes this still use a custom hardware description language? The curriculum here is very solid - my only critique is that it uses a custom HDL instead of Verilog, VHDL, or SystemVerilog. 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.
- bmitc 3y agoI don't think there's anything to be gained by switching to VHDL or Verilog. Their custom HDL is a fine HDL for the uses of the course. There's so much commonality that they're effectively interchangeable syntactically. If the idea was to use VHDL or Verilog such that one could actually make the CPU on silicon or an FPGA, then that opens up a whole can of worms that is well beyond the scope of the course. I do think it would be awesome if they had a sequel that did this, but I think it doesn't make sense in the context of the existing course.
- sweetjuly 3y agoThis was my experience with the course as well. It was fun but not useful. Learning Verilog later really opened the world of digital design for me and has let me build actually useful things. It's probably a non-goal though for this coarse to turn people into digital designers, this seems more aimed at people with a passing interest in HW as opposed to those who really want to go deep.
- warkanlock 3y agoKnowing Verilog, I must disagree. Although it would be more beneficial if the book focused on hardware, its primary goal is to teach something other than hardware-specific definitions. HDL serves as a bridge to illustrate communication with predefined logic gates. The book should include a mention or an appendix to clarify its real-world applications. By the end of chapter five, I was dissatisfied, feeling a lack of control over the crucial aspects of the hardware I just built. However, a book can only do justice to some of the missing pieces of information we have.
- 3y ago
- bannisterjw 3y agoVery cool article
- skripp 3y agoI highly recommend you play the game “Turing complete” alongside this course. Will give you an additional visual way of looking at the problems.
- kebsup 3y agoWhat 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.
- artsi0m 3y agoSo, here the question I want to ask someone who dealt with this course: How much of the topic of compilers is covered in this course? Have you built an optimizing compiler that creates binaries from a [relatively] high-level language such as C? Or you have just created an assembly for a specific architecture?
- rmshin 3y agoWithout too much experience in writing compilers beyond this course, I'd say that the course focuses on grounding your conceptual/intuitive knowledge of how compilers work rather than any serious exposition into modern-day production-grade compilers. You write the assembler for the course's own hardware architecture called Hack, then a compiler backend that converts a stack-based VM intermediate representation (IR) to assembly, and finally a compiler frontend that does syntax analysis and code generation to translate the book's high-level language Jack to the IR.
- CatchSwitch 3y agoIt mimics Java, so your compiler compiles to a bytecode IR. The compiler as described by the book is a bare-bones recursive descent compiler that doesn't do any AST analysis. The compiler is for a toy language called Jack (fake Java) that was intentionally designed to be easy to write a compiler for. L(1) grammar I believe. They don't really talk about error handling or more complex compiler topics. No optimization methods are covered. N2Tetris is like doing the 20% to get the 80% of every layer of abstraction. It really scopes down each project so you can cover every layer between logic gates and a high level language with built in OS APIs. I think it's a fantastic course but if you're looking to learn specifically about compilers I'm not sure if it'll meet your needs.
- Kortaggio 3y agoThis was an amazing course and is one of the most rewarding computer science courses I've taken! I loved that there was nothing left to "magic" and it was the first time I felt like I understood the "full stack" of the Java-like code I was writing right down to the transistors. Self-plug for a full-blown minesweeper game I made for the final project: https://github.com/billmei/nand2minesweeper https://github.com/billmei/nand2minesweeper It's a complete game with a tutorial, custom RNG, and unit tests, using their hardware simulator.
- mentos 3y agoHow many hours/weeks would you estimate it took you to complete the course?
- Kortaggio 3y agoPart 1 was significantly easier than Part 2; Part 1 (the hardware part) only took 2 weekends for me, but every assignment on Part 2 took several weekends each. Granted, this was also because I was learning about operating systems and compilers at the same time; if you're already familiar you could considering skipping Part 2 altogether, or otherwise you might have an easier time than I did.
- westurner 3y agoSimilar: "Show HN: Tetris, but the blocks are ARM instructions that execute in the browser" https://news.ycombinator.com/item?id=37086102 https://news.ycombinator.com/item?id=37086102
- cubefox 3y agoI wish there was something like that for computability theory. 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. 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? My guess is that they don'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). For example, Turing machines have two kinds of states: Objects called "states", 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't distinguish two different kinds of states in such a way. It's all just circuits. 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 "potentially infinite" in the same way finite-state machines are merely potentially infinite. But that doesn't make them similar to each other. The relevant difference seems to be that circuits with delay allow for "memory" (like flip-flops), while finite-state automata don't. I would like to see a course or book on theoretical computer science that tackles this issue: "From NAND to Turing Machines".
- aleph_minus_one 3y ago> 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? Simple: logic circuits for propositional logic are not Turing-complete, and in a lecture about theoretical computer science one wants to teach such more sophisticated, mathematical models of computation. On the other hand, in basically every beginner lecture about computer engineering (in German: "technische Informatik"), they will teach you how how the transition function of a finite-state machine can be implemented via combinational logic (https://en.wikipedia.org/wiki/Combinational_logic https://en.wikipedia.org/wiki/Combinational_logic), which can be transformed into logic gates for implementing a Mealy machine (https://en.wikipedia.org/wiki/Mealy_machine https://en.wikipedia.org/wiki/Mealy_machine) or Moore machine (https://en.wikipedia.org/wiki/Moore_machine https://en.wikipedia.org/wiki/Moore_machine) in hardware.
- shpx 3y agoI can also recommend the Digital Design and Computer Architecture lectures from ETH Zürich if you're trying to understand computers at a lower level: https://www.youtube.com/playlist?list=PL5Q2soXY2Zi-EImKxYYY1SZuGiOAOBKaf https://www.youtube.com/playlist?list=PL5Q2soXY2Zi-EImKxYYY1...
- naitgacem 3y agothis is a gold mine! I've taken an introductory course on computer architecture, unfortunately we didn't get far and definitely didn't touch on anything about out-of-order execution or the similar magic CPUs do nowadays. this'll playlist will be my holidays theme thanks for sharing!
- agentultra 3y agoThis is a great course, well put together, and very fun. I did the second part in Haskell too! I wasn't sure what their container environment is like so I stuck with only the `base` library and it worked out well enough.
- firesofmay 3y agoI highly recommend this course/book. It's extremely rewarding once you go through it.
- deleted 3y ago[deleted]
- deleted 3y ago[deleted]
- deleted 3y ago[deleted]