
Daniel Hillis offers an easy-to-follow explanation of how data is processed that makes the operation of a computer seem as straightforward as those of a bicycle. Hillis proceeds from an outline of basic logic to clear descriptions of programming languages, algorithms and memory. He then takes readers in simple steps up to the most exciting developments in computing today - quantum computing, parallel computing, neural networks, and self-organizing systems.
In a way I guess the instructions in nand2tetris are the microcode. The bits of the instructions directly control the hardware with the first bit choosing 2 instruction types, so there’s only 1 step of code per instruction, unlike with microcode where an instruction can have any number of microcode steps.
In Ben Eater’s series of videos building an 8-bit CPU on breadboards he has ROMs that are indexed by the opcode (4 bits of the instruction) + a step counter to determine the control word. The ROM stands in for what could be done with sufficiently complicated logic gates. I like it as a next step on the hardware side as you get hands on experience with electronics and having to troubleshoot it.
It’s disappointing how it only has 16 bytes of RAM so you can’t really build higher levels of abstraction like you can with nand2tetris. But at that point you could (I should) either redo it with a better design (and put it on PCBs) or move on to the 6502 project, and then since that puts together a timer, CPU, ROM, RAM, I/O, UART, etc. mentally group those together and move on to microcontrollers that already have them together.
Anyone interested in reading about how a CPU could be made out of logic gates could also read Code by Charles Petzold (moves slower, recently updated) and/or Pattern on the Stone by Danny Hillis (moves faster).
Edit: I just checked Code (2nd edition) and that uses a 4 bit cycle counter and hard logic gates to determine what to do each cycle. But then it uses an array of diodes for part of the logic. Would that be considered microcode?
[0] there were classes that covered more advanced (pipelined) CPUs in another CS class but not at quite a low level where you felt like you could make one yourself
The New Turing Omnibus, 66 Excursions in Computer Science[1]
Code Complete [2]
Debugging The 9 Indispensable Rules of Finding Even the Most Elusive Software and Hardware Problems [3]
The Pattern on the Stone [4]
The Tinkertoy Computer and Other Machinations ... [8]
-----
#5, #6 & #7 approach from different directions and "meet in middle":
Code: The Hidden Language of Computer Hardware and Software [5]
Nand2Tetris[6]
The Little Schemer and Understanding Computation [7]
--------?? Links to 'editor'/ide cheetsheets ??
--------
[1] : https://www.amazon.com/New-Turing-Omnibus-Sixty-Six-Excursio...
[2] : https://en.wikipedia.org/wiki/Code_Complete
[3] : https://www.amazon.com/Debugging-Indispensable-Software-Hard...
[4] : https://en.wikipedia.org/wiki/The_Pattern_on_the_Stone
[5] : https://www.amazon.com/Code-Language-Computer-Hardware-Softw...
[6] : https://www.nand2tetris.org/
[7] : https://vpb.smallyu.net/%5BType%5D%20books/The%20Little%20Sc...
[8] : https://www.amazon.com/Tinkertoy-Computer-Other-Machinations...
----
When semester of programming projects isn't enough / couldn't wait for the programming langauge of choice : https://exercism.org/
Start with Make It Stick (Brown et al.). Apply what this book teaches you to every one afterwards.
Next, read and work through Exercises for Programmers (Hogan) and A Common Sense Guide to Data Structures and Algorithms (Wengrow).
After you finish those two, read The Missing README (Riccomini et al.) and Extreme Programming Explained (Beck et al.). These two books provide very different viewpoints into the stuff that isn’t coding in a programming job.
Assuming you’re using an OO language, follow that up with Object-Oriented Analysis and Design with Applications (Booch et al.) and Object Thinking. They contrast each other quite a bit; having both perspectives is handy.
Once you’re through all those, I recommend Tidy First (Beck), Implementation Patterns (Beck), and Test-Driven Development By Example (Beck). These three books of his provide an incredibly accessible view into better ways to code.
If you’re anything like me you get bored reading one book for too long. I’ve found that having a second book going that I can switch to is great for that. A parallel track with The Pattern On the Stone (Hillis), The Pragmatic Programmer (Thomas & Hunt), The Mythical Man-Month (Brooks), and How Computers Really Work (Justice) provides a reprieve and some technical and cultural context.
Wow, I was not disappointed.
Also any relation to author of https://en.wikipedia.org/wiki/The_Pattern_on_the_Stone ? (one of my all time favorite books)
This book shocked me with the idea of a universal computer:-)
"..there is really only one kind of computer .. all kinds of computers are alike in what they can and cannot do"
".. any computing device, whether it’s built of transistors, sticks and strings, or neurons, can be simulated by a universal computer."
".. making a computer think like a brain is just a matter of programming it correctly."
[1] https://www.amazon.com/Pattern-Stone-Computers-Science-Maste...