Code: The Hidden Language of Computer Hardware and Software
Updated at August 21, 2025
A review of Petzold's Code, which explains computers with flashlights, Morse code, relays and transistors and made me rethink how I introduced the subject.
Why the book hooked me
Another book that, after finishing, left me with the thought: I wish I had read this sooner.
In 2024 I was a web programming professor. The book’s approach made me rethink how I introduced the subject. I used Morse code in the first class to explain communication, but I never got close to the connection Petzold makes with binary numbers.
Flashlights, Morse code, and binary logic
The book starts with simple communication examples, like flashlights, then Morse code, Braille, and binary logic. Why do we count from 1 to 10? Ten fingers. A computer has two states, on and off, so it runs on binary.
The author walks through telegraph, relays, vacuum tubes, transistors, then modern computers. Each invention built on the one before it.
One of the parts that got me most was watching the author build programs with logic circuits (something I hadn’t done since college), then show how the same program would look in Assembly. I work almost exclusively with high-level languages these days, so it felt like meeting the fundamentals of computing again after years apart.
Collaboration everywhere
The reading made me think about how computing is an enormous network of patterns and collaboration. The chip manufacturer (Intel/AMD), the operating system developer (Microsoft/Apple), the kernel creator, the software developers: each piece depends on the last. That chain is long enough that we can write cross-platform software from a single codebase, iOS and Android with React Native or Flutter, desktop with Electron or Tauri.
Technology is communication
The book is about communication. We need to communicate, and technology is the tool we use for that. It shows how computers “talk” through 0s and 1s. Under the complexity sit simple principles. I closed it with more respect for what happens under the hood.