Nisan and Schocken’s The Elements of Computing Systems (a.k.a. NAND2Tetris) walks through building a full computer stack from logic gates up to a compiler.