Hacker News new | ask | show | jobs
by jgauth 480 days ago
Do you have a recommendation for a book or course that teaches these things better? In particular FSMs.
5 comments

Structure and interpretation of computer programs is a better nand2tertis. The issue is that it contains about 10x the information, assumes what an undergrad science student in 1980 would have known, has problems that are entire chapters of nand2tertis and uses scheme.

And it's not until the end of the last chapter that you build a stack machine in about 40 pages from memory.

I can't see how SICP is better than Nand2Tetris. To be clear: none of them are better than the other simply because these are two completely different books, both in their approach style how explain things and their contents. You are basically comparing apples to oranges. If you know nothing about computers Nand2Tetris and Code by Charles Petzold are two books that will make you clearly understand how a computer works in a constructively way. SICP starts with an already running Scheme, so the computer and the language are already there.
Read chapter 5 of SICP.

Whenever I talk to people who rave about SICP I get the feeling they never made it to chapter 4 and beyond.

> In this chapter we will describe processes in terms of the step-by-step operation of a traditional computer. Such a computer, or register machine, sequentially executes instructions that manipulate the contents of a fixed set of storage elements called registers. A typical register-machine instruction applies a primitive operation to the contents of some registers and assigns the result to another register. Our descriptions of processes executed by register machines will look very much like ``machine-language'' programs for traditional computers.

https://mitp-content-server.mit.edu/books/content/sectbyfn/b...

The transistor level simulation happens in 3.3.4 "A Simulator for Digital Circuits".

Soo, maybe go nand2tetris and then SICP?
I really liked this book https://www.goodreads.com/en/book/show/2558730.Digital_Desig...

It teaches the basics and then how to build a MIPS processor.

I know that's only part of what nand 2 tetris aims for. But still good.

I would really recommend Digital Design and Computer Architecture, I’ve got the ARM edition. I believe it covers everything OP mentioned, and I know it covers FSMs. It’s a great read if you want the tools to design your own architectures.
This Youtube channel has amazing explanations, starting with:

How Transistors Run Code?

https://www.youtube.com/watch?v=HjneAhCy2N4

there is “switching theory and finite automata” by zvi-kohavi, one of my prized possessions from an era long past.