Free through lesson 3

How Computers Work for Beginners

From strings of bits to arm64 assembly, caches, paging, fork and exec, threads and locking, file descriptors and buffering. Over 30 lessons you'll get to the point where you can measure things yourself and track down why a program is slow, crashes, or gets the numbers wrong. Every address, timing, and line of assembly shown comes from output we actually ran.

Curriculum

The 30 lessons are split into 6 chapters. We recommend going in order from chapter 1, but feel free to jump to whatever interests you. * C, assembly, and shell commands can't run in the browser, so try them in your own terminal. The output shown was measured on an Apple M1 Max (arm64) with macOS and clang 21. The assembly is arm64; x86-64 uses different instruction names, but the ideas are the same. The lessons on bit operations and floating point also include Python you can run right in the browser.

Chapter 1 — Numbers and Representation (lessons 1–4)

See how strings of 0s and 1s become integers, decimals, and text by looking at actual bytes in memory. Endianness, overflow, floating point, and UTF-8, all checked against output from a real machine.

Chapter 2 — CPU (lessons 5–10)

Use clang -S to pull out the instructions your C code turns into, and read them. Registers, branches, function calls, optimization, branch prediction, and system calls, all on real arm64.

Chapter 3 — Memory (lessons 11–16)

Print addresses to draw a map of code, heap, and stack. Measure how caching and paging pay off, and finish by reading a file as memory with mmap.

Chapter 4 — Processes and Threads (lessons 17–22)

Run code to watch fork split one process into two and exec replace its contents. Measure what switching costs, cause a real race condition, and compare the cost of the ways to prevent it.

Chapter 5 — Files and I/O (lessons 23–27)

Start from the fact that a file descriptor is just a number, then measure the 25x difference buffering makes. Finish by building a shell pipeline yourself with dup2 and waiting on several things from a single thread.

Chapter 6 — Wrapping Up (lessons 28–30)

See what the kernel protects by being the one it stops. Sort out what containers actually separate, and finally connect all 30 lessons into a single thread.

To put these ideas to work in code, continue with C Intro Course. To work with servers from the command line, try Linux for Beginners. For a broad grounding in the terminology as a base for certification exams, see IT Fundamentals for Beginners. A membership unlocks every course.