|
|
|
|
|
by knowknow
489 days ago
|
|
Having done nand2tetris before doing various digital logic courses, I feel like the first portion falls a little short of its tagline of making a computer from modern first principles. It focuses too much on the specific implementation of its own architecture rather than giving the tools needed to create the architecture from scratch. It doesn’t teach things such as product of sums and kmaps which allows you to methodically find the Boolean equation for any arbitrary output. I spent most of my time during the architecture implementation finding the correct expressions, while it becomes trivial if you learn how to do it systematically. It’s lacking in teaching how state works, mostly because it passes over flipflops and their applications. It also doesn’t teach finite state machines (FSM), which was the single most important thing for me in understanding how to actually implement an architecture. This is because the concept of FSMs abstracts most of the logic and focuses on the behavior, and once you design the behavior you can then methodically implement the logic with the previously mentioned techniques. |
|
This is useful beyond low-level work. Every now and then I review code where the author has a complicated boolean condition (often in combination with auth and caching) and there's a much simpler way to write it -- that also has a more intuitive interpretation!
The same thing goes for finite state machines, of course, but the refactorings suggested are often trickier to apply in a late-stage code review.