The Elements of Computing Systems: Building a Modern Computer from First Principles by Noam Nisan and Shimon Schocken, from MIT Press. Paperback available for pre-order, only $25, with an extra 5% off all books preorders from Amazon. The original hardback came out in 2005. The author's book web site includes the book's software suite, with hardware simulators and emulators, the compiler, the OS, and more.
For years I've fantasized about getting rich, retiring early, then writing this book. Seriously. I have weird fantasies. Not that I'm particularly qualified to write such a book, I've just had a fascination with this approach. I might still do a crazy-person-writes-a-book-in-a-vacuum-and-puts-it-on-his-web-site version when I'm 50. (Will there still be NAND gates in 2028?)