How a Computer Works
From Turing to Microseconds

An interactive journey in nine dashboards — from a 1936 thought experiment with an infinite paper tape, through the von Neumann blueprint, the cache hierarchy, the end of Moore's free lunch, multi-core coherence, the abstraction stack, compilers and the operating system — all the way to trading systems where a single microsecond is an eternity.

Start the journey See the learning path
The Learning Path
Nine dashboards, one story
1936
Turing Machine
computation defined
1945
Von Neumann
stored program
~1990s
Cache Hierarchy
the memory wall
1965–2005
Moore's Law
the power wall
2005
Multi-Core
MESI coherence
1957+
The Layer Stack
abstraction
1972
Compilers
source → silicon
1969
The OS
the illusionist
Today
Tick-to-Trade
µs is an eternity
q1 1 0 1 1 · · · READ · WRITE · MOVE · REPEAT
Part 1 · Theory

The Turing Machine

A tape, a head, and a table of rules — the 1936 thought experiment that defined computation. Run one interactively, meet the Bombe from The Imitation Game, and race a spinning disk against a CPU clock.

Infinite TapeState Machine The Imitation Game
Open dashboard
CPU MEMORY · program + data shared bus
Part 2 · Blueprint

The Von Neumann Machine

The 1945 EDVAC report: put the program in the same memory as the data, and software is born. Step a 3-instruction program through fetch–decode–execute and count every trip over the shared bus.

Stored ProgramFetch–Decode–Execute Bottleneck
Open dashboard
CPU L1 · 1 ns L2 · 4 ns L3 · 35 ns DRAM · 80 ns
Part 3 · One Core

CPU & Cache Hierarchy

The CPU got fast; memory didn't. Watch a request cascade L1 → L2 → L3 → DRAM on a cold miss, then hit L1 in one nanosecond once warm — plus the "if a cycle were a second" latency ladder.

Cache LevelsHit / Miss Memory Wall
Open dashboard
POWER WALL transistors ↑↑ clock speed → flat
Part 4 · The Free Lunch Ends

Moore's Law & The Power Wall

Transistors doubled every two years — but around 2005, heat stopped the GHz race dead (P ≈ C·V²·f). See the two curves diverge, and why thermodynamics — not choice — created the multi-core era.

Moore's LawDennard Scaling Heat Dissipation
Open dashboard
Core 0 Core 1 Core 2 RING BUS SHARED L3 M I S
Part 5 · Many Cores

Multi-Core & Coherence

Private caches must agree: watch the MESI protocol keep four cores coherent, see false sharing wreck performance, and learn why a contended spinlock floods the ring bus.

MESIFalse Sharing Lock Contention
Open dashboard
APPLICATION LIBRARIES · SYSCALLS OS KERNEL ISA · MICROARCH GATES · TRANSISTORS print("hi")↓
Part 6 · Abstraction

The Layer Stack

From electrons to applications: ten layers of abstraction, the user/kernel boundary, and the ISA contract. Follow print("hello") all the way down the stack and back up to photons.

AbstractionISA User vs Kernel
Open dashboard
C++ Java Py FINISH
Part 7 · Translation

Compilers & Interpreters

Three routes from source code to silicon: C++ compiles ahead of time, Java JIT-compiles the hot paths, Python interprets every iteration. Race the same loop in all three and see exactly why C/C++ is ~100× faster.

AOT vs JITBytecode Why C++ Wins
Open dashboard
READY RUNNING BLOCKED A C D context switch ≈ 2 µs · quantum ≈ 4 ms every program thinks it owns the machine
Part 8 · The Illusionist

What the OS Does

Three illusions: your own CPU (the scheduler), your own memory (page tables + MMU), and simple devices (syscalls + drivers). Step through time slices, a page fault, and a full read() syscall.

SchedulerVirtual Memory Syscalls
Open dashboard
EXCHANGE matching engine TRADER tick-to-trade 2.8 µs round trip kernel path: 18 µs — you lost the race
Part 9 · The Finale

Tick-to-Trade: When a Microsecond Is an Eternity

Inspired by Carl Cook's CppCon talk. Everything Parts 1–8 built — and how HFT bypasses half of it: kernel bypass, DDIO, warm caches, branch-free hot paths. 18 µs vs 2.8 µs.

Co-locationKernel Bypass Hot Path
Open dashboard