A:\BOOKS

Code: The Hidden Language of Computer Hardware and Software

Charles Petzold · 2000

A patient, ground-up explanation of how a computer works, starting from flashlights and Morse code.

Charles Petzold wrote this book for readers who use computers every day and have never been shown what is inside one. It has been a favorite of programmers since it appeared, and a revised second edition appeared in 2022.

What it’s about

The book begins with ideas that need no technology at all: codes that carry messages, such as Morse code and Braille, and simple circuits that you could build with a battery, a switch, and a light bulb. From there it builds step by step, from switches to logic gates, from gates to arithmetic, and from arithmetic to a working memory and a simple processor.

By the final chapters it has reached software: machine code, assembly language, operating systems, and the displays and interfaces of real computers. The method is the point. Each step rests on the one before it, so by the end the machine no longer feels like magic. You can see how a handful of simple parts, repeated and combined, produce everything a computer does.

Why it belongs on coldboot

Everything on this site sits on top of the ideas in this book. If the articles make you curious about what these machines were actually doing at the lowest level, this is the gentlest and most patient way to find out. Because it explains principles and not products, it doesn’t go out of date.

Keep in mind

It is an explainer and not a history, so you won’t find stories about companies or people here. It rewards slow reading, and the later chapters get harder, but nothing in it requires prior knowledge.

Edition linked: second edition (Microsoft Press, 2022).