Oh wow I think I found my intellectual doppelganger! I run into this problem a lot, where I try to learn something simple but it quickly balloons to the point where the answer is in a hundred pieces due to missing context and bad assumptions about the reader. I went through this same process but for Bitcoin, culminating in writing the Understanding Bitcoin book[1].
I also saw this dynamic in the cryptopals challenges, where I thought the hardest problems were "look up this off-the-shelf cryptosystem and implement it", not "find a flaw in that system you reimplemented with only a few hints.[2]
Like others, I recommend nand2tetris as having answered a lot of the questions I had. It has you implement the hardware of a computer that can execute the program loaded in its memory, from the logic gates and flip-flops up. Then, you implement a compiler that can translate high-level Java-like code into binary. (First to a virtual machine, then assembly, then binary.)
Of course, even then it leaves caps: it's a deliberately toy system, it can't handle programs longer than its memory, the machine does only one-shot programs (and thus can't handle a programmer creating a program live and having it be executed). But it answered a lot of my questions, like how to make memory work, and how function call/return work.
I also saw this dynamic in the cryptopals challenges, where I thought the hardest problems were "look up this off-the-shelf cryptosystem and implement it", not "find a flaw in that system you reimplemented with only a few hints.[2]
Like others, I recommend nand2tetris as having answered a lot of the questions I had. It has you implement the hardware of a computer that can execute the program loaded in its memory, from the logic gates and flip-flops up. Then, you implement a compiler that can translate high-level Java-like code into binary. (First to a virtual machine, then assembly, then binary.)
Of course, even then it leaves caps: it's a deliberately toy system, it can't handle programs longer than its memory, the machine does only one-shot programs (and thus can't handle a programmer creating a program live and having it be executed). But it answered a lot of my questions, like how to make memory work, and how function call/return work.
[1] http://understandingbitcoin.us.
[2] Previous comment about it: https://news.ycombinator.com/item?id=36398627