# The Universal Machine

> Alan Turing answered a question about the limits of mathematical proof by describing the simplest possible machine — a tape, a head and a table of rules — and in doing so specified every computer since. Three years later he was at Bletchley Park attacking a cipher with 1.59 × 10²⁰ settings. Step his machine, press the keys of an Enigma, and run the Bombe.

Interactive film: https://www.planetpast.com/stories/scientist-turing/  
Publisher: PlanetPast (https://www.planetpast.com/) · Published 2026-10-13 · Technology, Math, History

## Prologue

### The universal machine
*A tape, a war, a conviction*

He invented the computer while proving what computing cannot do.

In 1936 a twenty-three-year-old Cambridge mathematician answered a question about the foundations of logic, and in the process described a machine. It has an endless paper tape, a head that reads and writes one symbol at a time, and a table of rules. That is all. Every computer you have ever used is a version of it. Three years later he was applying the same mind to a cipher with a hundred and fifty-nine million million million possible settings. Sixteen years after that, his own government prosecuted him for being gay.

![The computer was invented as a thought experiment about what proof cannot do.](https://www.planetpast.com/stories/scientist-turing/img/c00.jpg)

- **1936**: the machine, on paper
- **1.59 × 10²⁰**: Enigma settings
- **41**: years he lived

> We can only see a short distance ahead, but we can see plenty there that needs to be done. (Alan Turing, 1950)

Prologue · Why he matters

#### The universal machine

Turing described the computer in **1936** as a device for settling a question in logic. The same person then broke **Enigma**, asked whether machines can think, and was destroyed by a law against who he was.

- **Born**: London, 1912 23 June

- **Died**: Wilmslow, 1954 7 June, aged 41

- **Pardoned**: 2013 apology 2009; the Turing law 2017

How to use: pick a chapter below or press ← → to change step · ▶ plays the step · drag to rotate · three steps have buttons you can press.

Sources: [Wikipedia: Alan Turing](https://en.wikipedia.org/wiki/Alan_Turing); [Wikipedia: the Turing machine](https://en.wikipedia.org/wiki/Turing_machine)

## Chapter I · A question about proof

### Is there a procedure for everything?
*Chapter I · 1928*

To prove there is not, you first have to define “procedure”.

In 1928 David Hilbert asked whether there is a definite procedure that could take any mathematical statement and decide whether it follows from the axioms. It sounds like a question about mathematics. It is really a question about machinery: is there a method, a set of mechanical steps, that always terminates with the right answer? To prove that no such method exists, you first have to say exactly what a method is. Nobody had. Turing’s answer was to invent the simplest possible machine that could carry out any method at all, and then show that there are things it cannot do.

- Hilbert, 1928: is there a procedure that decides any mathematical statement?
- Feed it a statement, turn the handle, get true or false
- Gödel had already shown some truths are unprovable
- But could a machine at least decide which?

- **1928**: Hilbert asks the question
- **1936**: Turing and Church answer it: no

Chapter I · Step 1

#### Is there a procedure for everything?

**Hilbert’s Entscheidungsproblem** (1928) asked for a procedure that decides any mathematical statement. Answering it required a precise definition of “procedure” — which is what Turing supplied.

Sources: [Wikipedia: On Computable Numbers (1936)](https://en.wikipedia.org/wiki/Turing%27s_proof); [Wikipedia: the Turing machine](https://en.wikipedia.org/wiki/Turing_machine)

### A runner who did logic
*Chapter I · The man*

Fellow of King’s College at twenty-two.

Turing was born in London in 1912 and educated at a school that disapproved of his interest in science. He went to King’s College, Cambridge, and was elected a Fellow at twenty-two on the strength of a dissertation in probability theory. He was a serious athlete, running marathon distances at close to Olympic standard, and used to run the sixty-odd kilometres to London for meetings rather than take the train. He was also gay, which under British law at the time was a criminal offence punishable by imprisonment.

![At school he was told he was wasting his time on science. He kept doing it.](https://www.planetpast.com/stories/scientist-turing/img/s2-turing.jpg)

- 1912: Born in London
- 1931: King’s College, Cambridge
- 1935: Fellow of King’s at 22
- 1938: PhD at Princeton under Alonzo Church

- A serious long-distance runner
- Nearly made the 1948 Olympic marathon team
- Awkward, direct, and not interested in rank
- Gay, at a time when that was a crime

Chapter I · Step 2

#### A runner who did logic

Fellow of King’s College, Cambridge at **22**; PhD at Princeton under **Alonzo Church**; a marathon runner close to Olympic standard. And gay, which British law then made a crime.

Sources: [Wikipedia: Alan Turing](https://en.wikipedia.org/wiki/Alan_Turing)

## Chapter II · A machine made of paper

### Four things and a tape
*Chapter II · 1936*

Read a symbol, write a symbol, move, change state. That is a computer.

Here is the machine. A tape divided into squares, a head sitting over one square, and a table of instructions. At each tick the head reads the symbol under it. Depending on that symbol and the machine’s current state, it writes a symbol, moves one square left or right, and switches to a new state. That is the whole specification. There is nothing else in it. Turing argued that anything a human being could do by following a fixed procedure, this machine can do too. Press the buttons and run one.

- An endless tape divided into squares
- A head that reads and writes one symbol
- A small table of rules, and a state
- Read, write, move left or right, change state

- **4**: things it can do
- **any**: computation at all

![The tape is infinite only in the sense that you never run out. In practice: enough.](https://www.planetpast.com/stories/scientist-turing/img/c00.jpg)

Chapter II · Step 3 · **Interactive**

#### Four things and a tape

A tape of squares, a head, a state, and a table of rules: **read, write, move, change state**. Turing argued that anything doable by a fixed procedure is doable by this.

Press **Step** to advance one tick, or **Run**. The machine loaded here adds one to a binary number, then halts.

Sources: [Wikipedia: the Turing machine](https://en.wikipedia.org/wiki/Turing_machine); [Wikipedia: On Computable Numbers (1936)](https://en.wikipedia.org/wiki/Turing%27s_proof)

### One machine for all of them
*Chapter II · The consequences*

Software exists because of a proof about what cannot be proved.

Two things follow, and they are the foundations of computing. First: you can write a machine’s rule table onto a tape as data, and build a single machine that reads that description and behaves exactly like the machine described. One machine that can be any machine. That is a computer, and the description is software. Second: there is no machine that can look at any program and say whether it will eventually stop. Suppose there were. Then you could build a program that asks the oracle about itself and does the opposite: halts if told it loops, loops if told it halts. It cannot exist. And that answers Hilbert. No procedure decides every mathematical question.

- Encode a machine’s rule table as symbols on a tape
- Build one machine that reads that description and imitates it
- That machine can be any machine
- It is called universal, and it is your laptop

- Ask: will this machine ever stop?
- Assume a machine that can always answer
- Build one that does the opposite of its own answer
- Contradiction. No such machine exists

Chapter II · Step 4

#### One machine for all of them

A machine’s rules can be written on the tape as **data** — so one **universal machine** can imitate any other. That is software. And no machine can decide whether an arbitrary program **halts**, which answers Hilbert: no.

Sources: [Wikipedia: the halting problem](https://en.wikipedia.org/wiki/Halting_problem); [Wikipedia: On Computable Numbers (1936)](https://en.wikipedia.org/wiki/Turing%27s_proof)

## Chapter III · Enigma

### Press a key, light a lamp
*Chapter III · 1939*

A machine designed so that the same letter never means the same thing twice.

Turing reported to Bletchley Park the day after Britain declared war. Enigma looks like a typewriter. Press a key and current runs through a plugboard, three rotating wheels and a reflector, and back out to light a lamp with a different letter. After every single keystroke a rotor steps, so pressing the same key twice gives two different letters. That is what makes it strong. But the reflector that makes decryption easy also guarantees that no letter is ever enciphered as itself. Press the keys and watch. That one guarantee is the crack the whole attack goes through.

![Press a key, current runs through the plugboard, three rotors and a reflector, and lights one lamp.](https://www.planetpast.com/stories/scientist-turing/img/s4-enigma.jpg)

- A rotor steps after every letter
- So the same letter encrypts differently each time
- The wiring is reciprocal: A→G means G→A
- Which means no letter can ever encrypt to itself

- **0**: letters that map to themselves

Chapter III · Step 5 · **Interactive**

#### Press a key, light a lamp

Enigma’s rotors step after every keystroke, so the same letter enciphers differently each time. The reflector that makes it self-reciprocal also guarantees **no letter is ever enciphered as itself**.

Press letters and watch the lamp and the rotor positions. The simulation uses a simplified three-rotor wiring.

Sources: [Wikipedia: the Enigma machine](https://en.wikipedia.org/wiki/Enigma_machine); [Wikipedia: Bletchley Park](https://en.wikipedia.org/wiki/Bletchley_Park)

### A hundred and fifty-nine million million million
*Chapter III · The numbers*

And the Germans changed the key every midnight.

Count the settings. Three rotors chosen from five and placed in order: sixty ways. Each rotor can start at any of twenty-six positions: seventeen and a half thousand combinations. And the plugboard, which swaps ten pairs of letters before and after the rotors, has about a hundred and fifty million million arrangements. Multiply: roughly one and a half times ten to the twenty. Trying them all is not an option, and the settings changed every midnight. It is also worth saying clearly that Britain did not start from nothing. Polish cryptanalysts, led by Marian Rejewski, had been breaking Enigma since 1932 and handed over everything they had in July 1939.

- **60**: orders of three rotors chosen from five
- **17,576**: starting positions
- **1.5 × 10¹⁴**: plugboard wirings with ten cables

$$60 \times 17{,}576 \times 150{,}738{,}274{,}937{,}250 \approx 1.59\times10^{20}$$

About a hundred and fifty-nine million million million settings, changed every day at midnight.

- Brute force was hopeless then and would be slow now
- Polish cryptanalysts had broken earlier Enigma
- Rejewski’s bomba came first and gave the name
- In July 1939 Poland handed everything to Britain and France

Chapter III · Step 6

#### A hundred and fifty-nine million million million

60 rotor orders × 17,576 start positions × ~1.5 × 10¹⁴ plugboard wirings ≈ **1.59 × 10²⁰** settings, changed daily. Brute force was never the answer.

Poland’s **Marian Rejewski** had broken earlier Enigma from 1932 and built the **bomba** that gave the British machine its name. Everything they had was handed over in July 1939.

Sources: [Wikipedia: the Enigma machine](https://en.wikipedia.org/wiki/Enigma_machine); [Wikipedia: Marian Rejewski and the Polish Cipher Bureau](https://en.wikipedia.org/wiki/Marian_Rejewski)

## Chapter IV · The Bombe

### Guess, then look for a contradiction
*Chapter IV · The attack*

The Bombe does not find the answer. It destroys the wrong ones.

The attack starts with a guess. German operators were disciplined and predictable: weather reports, formulaic greetings, the same opening words. So you assume a stretch of known text, a crib, sits at a particular place in the message. Because no letter can encipher to itself, most alignments are instantly impossible — that alone eliminates a lot. Then you follow the chain. If this letter maps to that one at this rotor position, then the plugboard must connect those two, which forces another connection, which forces another. Go round a loop in the chain and you often arrive back at a contradiction. The Bombe is a machine for spinning through rotor positions and detecting those contradictions electrically — about twenty settings a second, per drum bank. Run it and watch the possibilities collapse.

![Not a computer. A machine for testing an assumption against itself until it contradicts.](https://www.planetpast.com/stories/scientist-turing/img/s5-bombe.jpg)

- Guess a crib: a phrase likely in the message
- Weather reports always said the same things
- Line the crib against the cipher text
- No letter may match itself — that fixes the position

- **~200**: Bombes running by the end of the war

Chapter IV · Step 7 · **Interactive**

#### Guess, then look for a contradiction

Assume a **crib**, use the no-letter-maps-to-itself rule to place it, then chase the implied plugboard connections round a loop. Most rotor settings produce a **contradiction** and are eliminated electrically.

Press **Run the Bombe** and watch the surviving settings fall. By 1945 about 200 Bombes were running day and night.

Sources: [Wikipedia: the Bombe](https://en.wikipedia.org/wiki/Bombe)

### Hut 8
*Chapter IV · The work*

He ran the naval section, and nobody could be told.

Turing led Hut 8, the section attacking naval Enigma — the hardest variant, used by the U-boats that were sinking the convoys keeping Britain fed. Alongside the Bombe he invented Banburismus, a statistical method for ranking which rotor orders were worth testing, which saved an enormous amount of machine time. Thousands of people worked at Bletchley, the majority of them women operating the machines and processing the traffic, and every one of them was bound to silence. Estimates of how much the work shortened the war vary, with two to four years commonly cited. It stayed secret until the 1970s, so Turing got no public credit while he was alive.

![Wooden huts, shift work, and nobody allowed to say what they did — for thirty years.](https://www.planetpast.com/stories/scientist-turing/img/c02.jpg)

- Turing ran Hut 8: naval Enigma
- The hardest version, and the one sinking convoys
- He invented Banburismus, a statistical shortcut
- Thousands worked there; most were women

- Estimates of the war shortened by Bletchley vary
- Commonly cited: two to four years
- The work stayed secret until the 1970s
- So he received no public credit in his lifetime

Chapter IV · Step 8

#### Hut 8

Turing led the section on **naval Enigma** and invented **Banburismus** to cut the search. Thousands worked at Bletchley, most of them women; the whole operation stayed secret into the **1970s**, so he was never publicly credited in his lifetime.

Sources: [Wikipedia: Bletchley Park](https://en.wikipedia.org/wiki/Bletchley_Park); [Wikipedia: Alan Turing](https://en.wikipedia.org/wiki/Alan_Turing)

## Chapter V · Can machines think?

### Building it for real
*Chapter V · After the war*

The machine on paper became a machine made of valves.

After the war Turing designed the Automatic Computing Engine, one of the first complete designs for a stored-program computer — the universal machine, in hardware. The project moved slowly, and he left for Manchester, where one of the first working stored-program machines was running by 1948. He wrote some of the earliest programs, worked on a chess-playing routine before there was a machine fast enough to run it, and started asking a question that nobody had asked carefully. If a machine can imitate any machine, can it imitate a mind?

![After the war he designed one of the first stored-program computers and then went to Manchester.](https://www.planetpast.com/stories/scientist-turing/img/c06.jpg)

- 1945: designs the ACE at the National Physical Laboratory
- Full stored-program design, ahead of its time
- Progress was slow; he left for Manchester
- Wrote programs and thought about chess

- **1936 → 1948**: from the paper machine to a working one

Chapter V · Step 9

#### Building it for real

Turing designed the **ACE** in 1945, one of the first full stored-program computer designs, then moved to **Manchester**, where a working machine ran from 1948 and he wrote some of the first programs.

Sources: [Wikipedia: Alan Turing](https://en.wikipedia.org/wiki/Alan_Turing)

### Change the question
*Chapter V · 1950*

Not “can it think” but “can you tell the difference”.

In 1950 Turing published a paper asking whether machines can think, and then refused to answer it, on the grounds that the question is too vague to be useful. He replaced it with a game. A judge holds a typed conversation with two hidden participants, one human and one machine, and has to say which is which. If the machine is not reliably identified, then arguing about whether it really thinks is a matter of definition. He also predicted that by the end of the century people would casually talk about machines thinking without expecting to be contradicted. He was right about that, and the paper is still where the argument starts.

- “Can machines think?” is too vague to answer
- Replace it with a test you can actually run
- A judge types to a human and a machine
- If the judge cannot tell, the question has been answered in practice

> I believe that at the end of the century the use of words and general educated opinion will have altered so much that one will be able to speak of machines thinking without expecting to be contradicted. (Alan Turing, Computing Machinery and Intelligence, 1950)

- He predicted objections and answered them in advance
- Including the theological one, and the one from consciousness
- The paper is still the starting point for the argument

Chapter V · Step 10

#### Change the question

**Computing Machinery and Intelligence** (1950) replaced “can machines think?” with a test: a judge types to a hidden human and a hidden machine and tries to tell them apart. Seventy-five years on, the paper is still where the argument starts.

Sources: [Wikipedia: the Turing test](https://en.wikipedia.org/wiki/Turing_test)

## Chapter VI · 1952

### The state destroys him
*Chapter VI · 1952*

He reported a burglary, and that is how it started.

In January 1952 Turing’s house was burgled. He reported it, and in the course of the investigation told the police, straightforwardly, that he had been in a relationship with a man. He was charged with gross indecency under an 1885 statute, convicted, and given a choice between prison and hormone treatment designed to suppress libido. He took the treatment. He lost his security clearance and his consultancy with the government, and was barred from the United States. In the same year he published a paper showing how two reacting, diffusing chemicals can spontaneously generate spots and stripes — a founding document of mathematical biology. On the eighth of June 1954 he was found dead at home. The inquest recorded suicide by cyanide poisoning. He was forty-one.

- Jan 1952: Reports a burglary; the police learn he is gay
- Mar 1952: Convicted of gross indecency
- 1952–53: Hormone treatment as a condition of probation
- Jun 1954: Found dead at home, aged 41

- He reported a burglary and told the police the truth
- He was prosecuted under an 1885 law
- Chose hormone treatment over prison
- Lost his security clearance and his consultancy

- **1952**: he also published the morphogenesis paper

Chapter VI · Step 11

#### The state destroys him

Convicted of **gross indecency** in March 1952, Turing chose **hormone treatment** over prison, lost his clearance, and died on **7 June 1954**; the inquest recorded suicide. In the same year he published **The Chemical Basis of Morphogenesis**, which founded mathematical biology.

Sources: [Wikipedia: Alan Turing](https://en.wikipedia.org/wiki/Alan_Turing); [Wikipedia: The Chemical Basis of Morphogenesis (1952)](https://en.wikipedia.org/wiki/The_Chemical_Basis_of_Morphogenesis)

## Epilogue

### What is still true
*Epilogue*

Every part of the 1936 paper is still in use.

Almost everything in the 1936 paper is still load-bearing. Your phone is a universal machine. The apps are machine descriptions written as data. The halting problem is why no tool can perfectly tell you whether your program will hang, and it generalises to a wide class of questions about software that cannot be answered in general. His last paper, on how reacting chemicals generate patterns, is now used to explain the spots on a leopard and the spacing of fingers. In 2009 the British government apologised. In 2013 he received a royal pardon. In 2017 the law that pardoned tens of thousands of other men was named after him.

- Every computer is a universal Turing machine
- Software is a machine written as data
- Some problems are provably undecidable
- Chemistry alone can make a leopard’s spots

- **2009**: government apology
- **2013**: royal pardon
- **2017**: the Alan Turing law

![Everything in a data centre is still doing what the tape machine does, faster.](https://www.planetpast.com/stories/scientist-turing/img/c09.jpg)

Epilogue · Step 12

#### What is still true

Phones are universal machines; apps are machine descriptions stored as data; the **halting problem** is why no tool can decide in general whether a program hangs; and his **morphogenesis** paper explains animal patterns. Apology **2009**, pardon **2013**, the **Alan Turing law 2017**.

Sources: [Wikipedia: the Turing machine](https://en.wikipedia.org/wiki/Turing_machine); [Wikipedia: the halting problem](https://en.wikipedia.org/wiki/Halting_problem); [Wikipedia: The Chemical Basis of Morphogenesis (1952)](https://en.wikipedia.org/wiki/The_Chemical_Basis_of_Morphogenesis); [Wikipedia: the Alan Turing law](https://en.wikipedia.org/wiki/Alan_Turing_law)

### Forty-one years
*Epilogue*

He was not allowed to say what he had done, and then punished for who he was.

Turing worked for about eighteen years and changed the shape of the twentieth century twice: once in logic, once in a wooden hut nobody could talk about. The secrecy meant he could not be publicly credited for the war work. The law meant that the same state he had served prosecuted him for his private life, and the treatment he accepted to avoid prison was a chemical punishment. He died at forty-one. The chapter stills in this film are AI-generated. The photograph of Turing, the Enigma machine and the rebuilt Bombe are real. Sources are listed below.

- 1936: the universal machine and the halting problem
- 1939–45: Bletchley Park and the Bombe
- 1950: the imitation game
- 1952: convicted; morphogenesis published
- 1954: dies at 41

- He answered a question about the limits of proof
- And accidentally specified every computer since
- The country he had served prosecuted him
- It took fifty-nine years to apologise

Epilogue · Step 13

#### Forty-one years

Eighteen working years, two transformations of the century, no public credit for either at the time — and a prosecution by the state he had served.

- 1936 the universal machine; the halting problem

- 1939–45 Hut 8 and the Bombe

- 1950 the imitation game

- 1952–54 convicted; morphogenesis; dead at 41

Chapter stills in this film are AI-generated illustrations. The 1928 photograph of Turing, the Enigma machine and the rebuilt Bombe at Bletchley Park are real, credited where they appear.

Sources: [Wikipedia: Alan Turing](https://en.wikipedia.org/wiki/Alan_Turing); [Wikipedia: the Turing machine](https://en.wikipedia.org/wiki/Turing_machine); [Wikipedia: On Computable Numbers (1936)](https://en.wikipedia.org/wiki/Turing%27s_proof); [Wikipedia: the halting problem](https://en.wikipedia.org/wiki/Halting_problem); [Wikipedia: the Enigma machine](https://en.wikipedia.org/wiki/Enigma_machine); [Wikipedia: the Bombe](https://en.wikipedia.org/wiki/Bombe); [Wikipedia: Bletchley Park](https://en.wikipedia.org/wiki/Bletchley_Park); [Wikipedia: Marian Rejewski and the Polish Cipher Bureau](https://en.wikipedia.org/wiki/Marian_Rejewski); [Wikipedia: the Turing test](https://en.wikipedia.org/wiki/Turing_test); [Wikipedia: The Chemical Basis of Morphogenesis (1952)](https://en.wikipedia.org/wiki/The_Chemical_Basis_of_Morphogenesis); [Wikipedia: the Alan Turing law](https://en.wikipedia.org/wiki/Alan_Turing_law)

