---
contents: bits, machine, isa, memory, processor, programs, os, virtual-memory, storage, concurrency, networks, limits
---

# Software Fundamentals

How a computer actually runs a program, from the bit to the network, for people who will direct the software rather than type it.

Most people who build software today work many layers above the machine. A line of Python stands on an interpreter, which stands on a compiler's output, which stands on an operating system, which stands on a processor that is itself an elaborate fiction kept up by billions of switches. Each layer promises something simple and hides something costly. That is what makes them useful, and it is also why so much software is slower, stranger or more fragile than its authors expected.

This book goes through those layers from the bottom up. It starts with what a bit is and how a pattern of them comes to mean a number or a letter, builds a processor out of switches, and then climbs: the instructions a processor understands, the memory that cannot keep up with it, the tricks a modern core plays to run fast anyway, the programs that turn source code into something it can run, the operating system that shares the machine out, the files that outlive a power cut, the threads that run at once, and the network that carries bytes between machines. It ends with the limits: what can be computed at all, what can be computed fast, and how to estimate a design's cost before anyone builds it.

One small program goes with the reader all the way: *wc*, which counts the words in a file and sends the count to another machine. Each chapter asks what one layer does to it.

The reader this book has in mind will spend more time judging code than writing it, increasingly code written by an agent. Judging well needs a working model of the machine underneath: what is cheap, what is expensive, what is impossible, and why. That model is what the book is for. It assumes no programming beyond being able to read a short Python function, and it defines every term where it first appears.
