From Transistor to Browser

Introduction

Updated Oct 12, 2026
Summarize

A computer is the most layered object most of us will ever use. Press a key and a voltage changes on a wire; somewhere far above, a letter appears in a browser. In between sit a dozen or so layers, each built on the one below it and hiding that one almost completely. We spend our lives at the top of the tower and rarely see down it.

This book climbs the tower from the bottom. The full manuscript follows a single switch through gates, arithmetic, memory, a processor, software, networking, and eventually a small browser. Some programs directly reuse earlier implementations; others isolate the next idea in a separate model. At each boundary, the chapter explains what carries forward and what is simplified.

This edition is a preview of Parts I to III. It follows the switch up to a CPU that runs a stored program, with optional readings on division, circuit descriptions, pipelines, caches, and configurable chips. It then gives that CPU software: an assembler, a linker, a lexer and a compiler, and models of how an operating system shares time, memory, files, and services. Last, it connects machines: bits across a wire, addresses, routes, reliable delivery, a request and its response, and a toy key exchange. The browser part is still in preparation and is not included in this edition.

Theory carries each chapter, but theory alone is easy to half-understand. So every idea here is anchored to a single small program that actually does the thing: a NAND gate built from a switch, a processor that runs a stored program, a router that finds a path, a browser that lays out a page. The programs are written in Python, kept small, and tested against stated examples and invariants. Tests help find mistakes; they do not prove correctness for every possible input. Finite gate truth tables can be checked exhaustively. Each program is a teaching model. Where a model is too small to be the real thing, the chapter says so plainly: the toy processor has sixteen words of memory, and the secure channel uses numbers small enough to break by hand. The shape is real even when the scale is not.

And one language carries all of it. The same Python that models a single gate also models the processor, the assembler, the network, and the browser, so you never stop to learn a new syntax at each floor; the idea stays in view instead of the machinery. Python earns that job by reading almost like the prose around it: a few dozen lines with no ceremony, no memory to manage and no types to satisfy, little between you and the thing being shown. The cost is paid honestly. A real gate is silicon, a real processor is described in a hardware language like Verilog, a real browser is a large native-code application; the Python here is never the material a layer is truly built from, only the clearest lens on what that layer does. The idea is the subject, and the language is only how it is held up to the light.

Each chapter asks one question in its title and answers it, in a few pages of prose, a figure or two, and the program itself. A small diagram at the head of each chapter marks how far up the tower you have come. You do not have to run the programs to follow the book. The printed snippets show the relevant pieces of each program; the web edition also has interactive demonstrations that run those models.

The planned climb has four parts. Part I, The Machine, builds a computer from a switch up to a processor that runs programs. Part II, The Software, turns that bare machine into something programmable, with assemblers, languages, and an operating system. Part III, The Network, connects one machine to another, from a single wire up to a private conversation across the world. Part IV, The Browser, uses the earlier ideas to explain opening a page and combines the interpreter, a small request/response client, and a renderer in one demonstration.

I should say where this book comes from. For years I used computers, and wrote programs for them, without ever seeing how the whole tower fit together; each layer I learned floated free of the ones beneath it, and no single account carried me all the way down. That the entire span could be crossed in one climb is an idea I owe to George Hotz, whose course outline From the Transistor to the Web Browser (github.com/geohot/fromthetransistor) first convinced me it was possible. This book is my own version of that climb, taken slowly and written down.

You need no prior knowledge of how computers work; supplying that is the whole point of the book. A little familiarity with Python will help you read the programs, but the prose stands on its own. Start at the switch, and climb.