← All articles
technologyalan turingcomputing historycryptographySeptember 17, 20266 min read

Who Was Alan Turing? The Machine, the Code and the Prosecution

By the BrainSnail editorial team. How these articles are written and checked, and how to tell us when one is wrong.

In 1936, at twenty-three, he answered a question in mathematical logic by inventing an imaginary machine, and in doing so defined what a computer is. During the war he led the section that broke the German naval cipher, work credited with shortening the conflict substantially. In 1952 he was prosecuted for having a relationship with a man, accepted chemical castration as an alternative to prison, lost his security clearance, and died two years later. He was forty-one.

The machine that was never built

The problem he set out to answer was posed by David Hilbert: is there a definite procedure that can decide, for any mathematical statement, whether it is provable? Answering it required saying precisely what a definite procedure is, and Turing's approach was to imagine the simplest possible mechanical device: an infinite tape divided into squares, a head that can read and write one symbol at a time and move left or right, and a table of rules saying what to do for each combination of current state and symbol read. That is the whole specification. He then showed that such a machine can compute anything computable by any method, that a single universal machine can simulate any other if given its rule table as data, which is the concept of a stored program and therefore of software, and that no machine can decide in general whether another machine will ever halt, which answers Hilbert's question in the negative. Alonzo Church reached the same conclusion by different means at the same time, and the two results together define the limits of computation.

Bletchley Park

He joined the Government Code and Cypher School at the outbreak of war in 1939 and headed Hut 8, which attacked German naval Enigma, the hardest variant and the one that mattered most because it directed the submarines sinking the convoys keeping Britain supplied. The machine encrypted each letter through a set of rotors that stepped after every keystroke, giving an astronomically large number of settings that changed daily. Polish cryptanalysts had made the essential first breaks before the war and shared their work in 1939. Turing's contribution was a method and a machine:

  • The bombe, an electromechanical device he designed with Gordon Welchman, which tested settings at speed by exploiting the fact that Enigma never encrypts a letter as itself
  • The use of cribs, guessed fragments of plaintext such as standard weather reports and formulaic headings, which gave the bombe something to test against
  • Banburismus, a sequential statistical procedure he devised for narrowing rotor possibilities, using a measure of evidence closely related to what is now called the log-likelihood ratio and anticipating later work in sequential analysis
  • The organisation of Hut 8 as an industrial process rather than a puzzle-solving room, with hundreds of staff, most of them women operating the machines
  • The results fed a system that read a large proportion of German naval traffic from 1941, and the historian Harry Hinsley's estimate that the whole effort shortened the war by two to four years is the figure usually cited

Afterwards

The work was secret and remained so until the 1970s, so his wartime reputation existed only inside a small circle. He moved to the National Physical Laboratory and in 1946 produced a detailed design for a stored-program computer, more complete than anything else at the time, which was built in reduced form as the Pilot ACE. He went to Manchester, where he wrote software for one of the first working stored-program machines, and in 1950 published a paper asking whether machines can think. Rather than defining thinking, he proposed a test: a human interrogator holds text conversations with a person and a machine and tries to identify which is which, and if the machine cannot be reliably distinguished, the question of whether it thinks has no further content. The paper anticipates and answers nine objections, including the claim that a machine can only do what it is told, which he attributes to Ada Lovelace and rejects. His last work was on morphogenesis, a mathematical theory of how a chemical system can spontaneously produce patterns such as spots and stripes, published in 1952 and confirmed experimentally decades later.

The prosecution

In January 1952 his house was burgled by an acquaintance of a man he had been seeing. He reported it to the police, described the relationship in the course of the investigation, and was charged with gross indecency under an 1885 statute, the same provision used against Oscar Wilde. He pleaded guilty, was offered probation conditional on undergoing hormone treatment with synthetic oestrogen, and accepted it rather than go to prison. The treatment lasted a year and caused physical changes. He lost his security clearance and could no longer work on government cryptography, and was barred from entering the United States. On 8 June 1954 he was found dead at home with a partly eaten apple beside the bed and a level of cyanide in his body sufficient to kill; the inquest recorded suicide, and his mother maintained it was an accident from chemicals he used in home experiments, with some later writers agreeing that accident cannot be excluded. He received a posthumous royal pardon in 2013, and a 2017 act extending pardons to all men convicted under the repealed provisions is informally called Turing's law.

What he left

The machine is the theoretical foundation of computer science, the universal machine is the reason a single device can run any program, and the halting result marks a boundary that no engineering can cross. The test he proposed has framed sixty years of argument about artificial intelligence, has been passed in limited forms by systems nobody considers to be thinking, and is now generally regarded as a provocation rather than a benchmark, which is close to how he presented it. The morphogenesis work founded a field. The wartime intelligence, once declassified, changed the historical account of the Atlantic campaign. The highest award in computing carries his name, his portrait is on the Bank of England's fifty-pound note issued in 2021, and the gap between that and the sentence handed down in 1952 is the reason his biography is told as often as his mathematics.

The takeaway

In 1936 he specified an imaginary machine with a tape, a head and a rule table, showed that a universal version could simulate any other if given its rules as data, which is the stored-program idea, and proved that no machine can decide in general whether another will halt. At Bletchley Park he designed the bombe and the statistical method that broke German naval Enigma. He proposed the imitation test for machine intelligence in 1950, founded the mathematics of biological pattern formation, was prosecuted in 1952 for a relationship with a man, and died in 1954.

Practise this

Questions from What is Technology?

Reading about something is not the same as being able to recall it. These are real questions from the What is Technology? unit in our Technology track, answers and explanations included. The unit has 123 in total across 24 steps.

  • Type the answerLevel 3

    1. The know-how and tools people use to solve problems is called ____.

    Answer: technology

    Technology is the know-how and tools people use to solve problems.

  • True or falseLevel 2

    2. Technology stays exactly the same and never changes or improves.

    Answer: False

    Technology keeps changing and improving over time, like candles becoming electric lights.

  • Match the pairsLevel 2

    3. Match each tool to the job it helps with.

    Answer: Hammer = Hitting nails; Scissors = Cutting paper; Broom = Sweeping the floor; Spoon = Eating soup

    Each tool is designed for a special job, like a hammer for nails and a broom for sweeping.