Earth 1

Library of human understanding

CPU

The universal machine at the heart of every computer.

A central processing unit (CPU) is a general-purpose processor that executes instructions in sequence, following the von Neumann architecture. Every personal computer, server, and embedded system uses a CPU to run its programs. CPUs execute billions of instructions per second, with each instruction manipulating data in registers and memory according to a precise instruction set.

The evolution of CPUs has followed Moore's Law: the number of transistors on a chip doubles roughly every two years, steadily increasing computing power. Modern CPUs use multiple cores to execute many instructions in parallel, pipelining to start the next instruction before the current one finishes, and caches to speed access to frequently used data. Despite their flexibility, CPUs are best at sequential, general-purpose computation.

The von Neumann Architecture

In 1945, John von Neumann described the stored-program computer: a machine with memory holding both data and the instructions that operate on it, a control unit that fetches and decodes instructions, and an arithmetic-logic unit (ALU) that carries out the operations. Before this, programmers rewired machines by hand for each new task. The stored program made the computer universal.

The cycle is simple: fetch the instruction from memory, decode it, execute it, and write back any result. By encoding the instruction as a number in memory, the same machine can run any program. This design is so fundamental that every CPU in the world, from the tiniest embedded processor to the fastest supercomputer, still follows it.

Instruction Sets and Architectures

An instruction set is the vocabulary of the machine: the list of operations it can perform. x86 and ARM are the dominant instruction set architectures. x86, created by Intel in 1978, powers most desktop and server computers. ARM, a simpler and more power-efficient design from 1985, dominates mobile phones and embedded systems.

Different architectures optimize for different goals. x86 prioritizes backward compatibility and raw performance. ARM emphasizes energy efficiency. MIPS and PowerPC serve specialized markets. A CPU implements one instruction set by providing circuits to decode each instruction and carry out the operation, so changing the set requires redesigning the chip.

Parallelism: Cores and Pipelining

A single-core CPU processes one instruction at a time, but modern CPUs contain multiple cores, each executing its own instruction stream in parallel. A quad-core CPU can run four independent instruction streams, quadrupling throughput for parallel workloads. The challenge is that not all programs parallelize easily: they must be written to divide work among cores.

Within a single core, pipelining overlaps instruction execution. While the ALU is computing the result of one instruction, the control unit is decoding the next, and memory is fetching the one after that. This keeps the hardware busy, but jumps and data dependencies can stall the pipeline. Speculative execution and branch prediction try to guess what comes next, but modern CPUs have learned that some predictions can leak secrets, a vulnerability that required hardware redesign.

Memory and the Cache Hierarchy

Main memory is large but slow; registers are tiny but fast. Caches bridge the gap. An L1 cache (a few dozen kilobytes per core) sits next to the ALU. If data is there, it arrives in one or two cycles. If not, the CPU stalls while waiting for the slower L2 cache, then the even slower L3 cache, then main memory, which can take hundreds of cycles. The job of cache design is to guess which data you will need next and have it ready.

Locality of reference is the key principle: programs tend to reuse the same data and instructions over short time periods. Cache designs exploit temporal locality (hold recently used data) and spatial locality (fetch nearby data too). This is why a program might run 100 times faster by rearranging its data layout: the cache hits more often.

The people

John von Neumann

1903 – 1957 · Computer Science, Mathematics, Physics

  • Described the stored-program architecture that all digital computers still follow: instructions and data in the same memory, with a control unit fetching and executing them in sequence.
  • Founded game theory and the theory of self-replicating automata.
  • Worked on the Manhattan Project and the design of EDVAC, the first practical stored-program computer.
“The only way to deal with an error is to go back to the source and fix it there. There is no way to remove an error that was made in the earlier stage: it will haunt you forever.”
Lecture on 'Computers and the Brain' at Yale University, 1956

Gordon Moore

1929 – 2023 · Electronics, Engineering

  • Co-founded Intel in 1968 and served as its CEO. Intel became the dominant CPU manufacturer, with x86 processors powering most of the world's computers.
  • Observed in 1965 that the number of transistors on a chip was doubling every year or two (later refined to every 18–24 months), a prediction known as Moore's Law that has held for six decades.
  • Pioneered the design and manufacture of silicon integrated circuits as a merchant semiconductor company.
“The future of integrated electronics is the future of electronics itself.”
Electronics magazine, April 1965

Sophie Wilson

born 1957 · Computer Science, Processor Design

  • Led the design of the ARM instruction set while at Acorn Computers in 1985, creating a simple, efficient architecture that became the standard for mobile and embedded processors.
  • ARM processors now power over 150 billion devices, from smartphones to IoT sensors.
  • An advocate for diversity in computing and the importance of elegant design.

Quotations appear only when we could check them against a named source. Sayings we could not trace are kept out.