I’ve previously worked through the first 6 chapters of nand2tetris, through writing an assembler and corresponding with part 1 of the course on Coursera.
My plan is to review Chapter 1-6, and then move on to the second half, hopefully at a rate of a chapter every ~2 weeks.
I’m also going to try and integrate this with my ongoing effort to learn emacs. This major mode looks promising.
I’ll try to post diagrams for those solutions soon (after I decipher the diagrams I scratched out for myself over the last week or so – hmm, they made sense at the time at least).
One thing of note: This is my second attempt at working through this book, and my solution for PC.hdl came out much nicer this time around. Last time I made the nested if-else part way too complicated. So, if anyone else is struggling with some of these exercises, it may be that coming back to them a little later on will shed new light on things.
A book that is often mentioned along with The Elements of Computing Systems is Code by Charles Petzold. I read it a couple years ago and enjoyed it quite a lot. There’s definitely some overlap between the two books, but they’re still quite different. For example, Code is more something to read through rather than work through. I still have a hard copy if anyone wants to take a look at it or borrow it. (The pdf is also pretty easy to find.)
I finally set up my “math table”* tonight so I’m going to focus on that for now. (plus slowly working through the nand2tetris book and Algorithms 4th ed.)
(*The table is just for math, since I’m behind on my goals in that area and want to make sure my books don’t get buried by other things. I have another table next to it for my computer and other study topics.)
“… want to make sure my books don’t get buried by other things.”
A big resolution for me this year is to focus on the things I’m reading/working on until they’re finished. In the past I’ve been way too easily distracted, and starting new books/projects has always been more fun than finishing current ones.
Ugh, I have completely stalled on this recently and better get back to it soon before I forget too much. I left off in the middle of Chapter 8.
I’ve only been working through the book, so I can’t compare that to doing the Coursera course. The latter might be worth a try, as I’ve found parts of the book fairly challenging, especially the recent parts. In Chapters 7 and 8 you use the language of your choice (Python for me) to write a translator to translate programs written in their virtual machine language into programs written in their assembly language. As you can guess, there’s a lot that can go wrong here, and the most common error message I get is “Test Comparison Failed.” I really need to soldier on though. If I can just finish up Chapter 8 I can at least be done with the assembly language stuff.
Haha, what a lot of whining I’m doing! I should add that I still think this book/course is worth working through. I’ve been learning a ton about things I’ve wanted to know about for many years.
(sigh) Nope, I still haven’t progressed any further. However, it’s interesting that you’re asking this now, because just in the last week or so I decided to take another stab at this book. So, I’ve been spending the last few days reviewing the chapters on assembly language and the virtual machine since I left off right in the middle of that stuff and have since forgotten the details. Looking back at this thread though I’m reminded that there are also lecture videos. So, I may watch some of those as well.
When/if you try this book/course, let me know. I’ve had rather a hard time working through it on my own, but having someone to compare notes with would probably help a lot. Even going back over the chapters I’ve already completed with someone else would be a good review for me.
Lo! This project yet lives!
I have FINALLY completed the Chapter 8 project, and sweet mother of Grace Hopper I’ve written my last line of assembly code. Now it’s on to writing everything in their stack-based virtual machine language. Oooh, fancy!