"The Elements of Computing Systems" and the accompanying course Nand2Tetris on Coursera. It's a course that starts with just nand gates, and leads you through the development of higher level logic gates, then an ALU, then a CPU, the an assembler, then a high level language compiler, and finally an operating system.
I've seen the "dragon book" mentioned several times, and I think it (and similar books) are good if you really do plan to (re-)invent a real world, large scale, programming language. If you really just want to get a feel for what's going on under the hood, the language presented in Nand2Tetris is specifically designed to have the necessary complexity to cover most of the details, but not so many special cases that you end up "chasing dragons". And the course is modular enough that you can jump right in and just implement the compiler if you want.
I've seen the "dragon book" mentioned several times, and I think it (and similar books) are good if you really do plan to (re-)invent a real world, large scale, programming language. If you really just want to get a feel for what's going on under the hood, the language presented in Nand2Tetris is specifically designed to have the necessary complexity to cover most of the details, but not so many special cases that you end up "chasing dragons". And the course is modular enough that you can jump right in and just implement the compiler if you want.