Andrew Milmoe of Make:SF recommended Charles Petzold’s book Code to me several months ago to help me refresh my knowledge of computer architecture as I dive into embedded systems development. I finally finished reading it this week and thoroughly enjoyed it. Code is both a history of the computer as well as a tutorial illustrating how to build one from the ground up using switches and gates. Some chapters are slow reading due to the complicated subject matter, but the way he brings everything together at the end makes it a great read. Although the book is in some ways dated (written in 1999, it talks about 128MB of memory being novel and Apple having problems in the desktop market) I found that it is still relevant. This is particularly true for microcontrollers and embedded systems which have more in common with the 8 bit computer that is the subject of the book than a Pentium 4 in today’s desktop PC’s.
Charles Petzold’s latest book, Code: The Hidden Language of Computer Hardware and Software, crosses over into general-interest nonfiction from his usual programming genre. It’s a carefully written, carefully researched gem that will appeal to anyone who wants to understand computer technology at its essence. Readers learn about number systems (decimal, octal, binary, and all that) through Petzold’s patient (and frequently entertaining) prose and then discover the logical systems that are used to process them. There’s loads of historical information too. From Louis Braille’s development of his eponymous raised-dot code to Intel Corporation’s release of its early microprocessors, Petzold presents stories of people trying to communicate with (and by means of) mechanical and electrical devices. It’s a fascinating progression of technologies, and Petzold presents a clear statement of how they fit together.
The real value of Code is in its explanation of technologies that have been obscured for years behind fancy user interfaces and programming environments, which, in the name of rapid application development, insulate the programmer from the machine. In a section on machine language, Petzold dissects the instruction sets of the genre-defining Intel 8080 and Motorola 6800 processors. He walks the reader through the process of performing various operations with each chip, explaining which opcodes poke which values into which registers along the way. Petzold knows that the hidden language of computers exhibits real beauty. In Code, he helps readers appreciate it. –David Wall