Skip to content
Cover of Code: The Hidden Language of Computer Hardware and Software by Charles Petzold

Code: The Hidden Language of Computer Hardware and Software

by Charles Petzold

The book that turns a light switch into a CPU — and makes you believe it the whole way.

4.7 my rating
4.40 public avg
Status
Read · July 2023
Bought
July 21, 2023
For
Self-taught engineers with gaps below the language runtime · Anyone who has never built up from a relay to a CPU · CS students who want intuition, not just exam answers

The one-paragraph verdict

What makes this book hold up is that it builds, not lectures: Morse code becomes binary becomes logic gates becomes an adder becomes memory becomes a processor, each step earned from the last. The recurring praise is right — it’s clear and genuinely fun, and the relay-by-relay construction gives you intuition no abstraction lecture ever did. The recurring criticism is also right: the back third accelerates hard, and the chapters on assembly and beyond pack in far more, far faster, than the gentle opening promised. The original edition also showed its age in places; the 2022 second edition smooths some of that. Worth pushing through the steep part.

Who should read it

Anyone whose mental model of a computer bottoms out at “the language runtime does it” should read this — it fills the layer most self-taught engineers skip. CS students will get intuition their courses assume. Skip it only if you’ve already built a CPU from gates and remember why carry propagation matters.

Where it earned its place

No platform tie-in here — this one is pure foundation. It gave me a habit more than a fact: when something feels like magic, drop a layer and rebuild it from parts I trust. That instinct has paid off in debugging far above the hardware it describes.

Skip it if…

Pass if you want a practical guide to writing code today — this is about how machines compute, not how to ship software. And if hardware genuinely bores you, the relay chapters will be a slog no enthusiasm survives.

[Code on Goodreads]
#computer-architecture#fundamentals#history-of-computing#low-level