Code: The Hidden Language of Computer Hardware and Software
Published on Updated on 3 min read
Book review of Code by Charles Petzold, The Hidden Language of Computer Hardware and Software, from Morse code and binary logic to circuits and Assembly.
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.
Who is Charles Petzold
Charles Petzold is an American programmer and technical writer, born in 1953 in New Jersey. He made his name with Programming Windows, published by Microsoft Press in 1988, which became the reference for writing Windows programs in C. Microsoft named him one of its seven “Windows Pioneers”. After Code he wrote The Annotated Turing (2008), which walks through Alan Turing’s 1936 paper on computable numbers with commentary on each passage.
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.
Is Code worth reading?
It was for me, for the reason I gave at the top. I’d recommend it to anyone who writes high-level code and has never looked at what happens between that code and the processor, and to anyone teaching an intro to computing course who wants a way into binary that doesn’t start with a conversion table.
You don’t need to know programming or electronics going in. Each circuit is built from the previous one, starting with a battery, a bulb, and a switch. The chapters on adders, flip-flops, and memory are where it gets demanding: they take a slow read, and sometimes paper to follow the diagrams. If you only want the big picture, you can move faster through those without losing the thread.
If you’re buying it, get the second edition from 2022. It comes with a companion site that animates the book’s circuits.
Book details
| Item | Detail |
|---|---|
| Title | Code: The Hidden Language of Computer Hardware and Software |
| Author | Charles Petzold |
| Editions | 1st edition in 1999 (Microsoft Press), 2nd edition in 2022 |
| Topic | How a computer works, from Morse code and Boolean logic to relays, transistors, memory, the processor, and Assembly |
| Level | Introductory, no programming or electronics background needed |
| Extras | codehiddenlanguage.com, with interactive circuits for the 2nd edition |