Revision Notes
OxfordAQA A-Level Computer Science (9645): Turing machines – Revision Notes
Recall notes for OxfordAQA 9645 sub-topic 3.13.3: Turing machine parts, transition functions and diagrams, hand-tracing, the UTM and a self-test.
- Subject
- Computer Science
- Level
- A LEVEL
- Topic
- Topic 13 – Theory of computation
- Author
- Marlbridge Academic Team
- Updated
- Reviewed by
- Harris Khan (what this means)
Aligned to OxfordAQA A Level Computer Science (9645), 2024-onwards. Official specification .
Syllabus page (what it covers and how it is assessed): OxfordAQA A Level Computer Science.
Syllabus points this page covers
9645 (A Level)
- 3.13.3 Turing machines
This page covers 1 of the 5 subtopics in topic 13, Theory of computation.
Found an error? Report a correction.
Need help with this topic? Request a free trial class for A Level Computer Science (9645).
These notes condense sub-topic 3.13.3 Turing machines of OxfordAQA International AS and A-level Computer Science (9645), Version 1.1 (International A-level content in topic 3.13, examined in Unit 4). For fully traced machines, see the Turing machines study guide, then practise with the Turing machines practice questions.
What the specification requires
- Know that a Turing machine is a computer with a single fixed program, made of a finite set of states, a finite alphabet, an infinite tape and a read-write head.
- Know the start state and halting states (no outgoing transitions).
- Represent rules as a transition function and as a state transition diagram.
- Hand-trace simple Turing machines.
- Understand the equivalence of the two representations.
- Explain the importance of Turing machines and the Universal Turing machine (UTM).
Exam questions use one tape, infinite in one direction, with no distinction between the input alphabet and the tape alphabet.
Key terms
| Term | Meaning |
|---|---|
| Tape | Infinite row of squares, each holding one symbol (□ is blank) |
| Read-write head | Senses the current square, writes a symbol and moves one square at a time |
| State | The machine’s current condition; a finite set of them exists |
| Start state | Where the machine begins |
| Halting state | A state with no outgoing transitions; the machine stops there |
| Transition function | A rule δ(state, symbol) = (new state, symbol to write, move) |
| UTM | A Turing machine that can simulate any other Turing machine |
Rules in two forms
| Transition function | Diagram arc | Meaning |
|---|---|---|
| δ(S0, 1) = (S0, 1, R) | S0 to S0 labelled 1 / 1, R |
read 1, write 1, move right, stay in S0 |
| δ(S0, □) = (SH, 1, R) | S0 to SH labelled □ / 1, R |
read blank, write 1, move right, halt |
| δ(S1, 1) = (S1, 0, L) | S1 to S1 labelled 1 / 0, L |
read 1, write 0, move left, stay in S1 |
One rule is one arc. The two forms are equivalent.
One step of a trace
- Read the symbol under the head.
- Find the rule for the current state and that symbol.
- Write the new symbol.
- Move the head one square.
- Change to the new state.
Worked reminder 1: unary increment
δ(S0, 1) = (S0, 1, R)
δ(S0, □) = (SH, 1, R)
Input 111 becomes 1111 in 4 steps. The machine passes over every 1, then writes a 1 on the first blank.
Worked reminder 2: flipping bits
δ(S0, 0) = (S0, 1, R)
δ(S0, 1) = (S0, 0, R)
δ(S0, □) = (SH, □, R)
| Input | Output | Steps |
|---|---|---|
1011 |
0100 |
5 |
0110 |
1001 |
5 |
1 |
0 |
2 |
The number of steps is the number of symbols plus one for the blank.
Worked reminder 3: binary increment
δ(S0, 0) = (S0, 0, R) δ(S1, 1) = (S1, 0, L)
δ(S0, 1) = (S0, 1, R) δ(S1, 0) = (SH, 1, L)
δ(S0, □) = (S1, □, L)
| Input | Output | Steps | Denary |
|---|---|---|---|
01011 |
01100 |
9 | 11 to 12 |
0111 |
1000 |
9 | 7 to 8 |
0101 |
0110 |
7 | 5 to 6 |
S0 runs right to the blank. S1 runs left, turning 1s into 0s until it finds a 0, which becomes 1. The leading 0 makes room for the carry.
Worked reminder 4: unary addition
δ(S0, 1) = (S0, 1, R) δ(S1, □) = (S2, □, L)
δ(S0, +) = (S1, 1, R) δ(S2, 1) = (SH, □, L)
δ(S1, 1) = (S1, 1, R)
11+111 becomes 11111 in 8 steps: the + becomes a 1, then the last 1 is erased.
Why Turing machines matter
- They are a general, formal model of computation.
- They give a definition of what is computable: a problem is computable if some Turing machine can solve it.
- The UTM simulates any other Turing machine. The description of that machine and its input are stored on the UTM’s tape.
- The UTM is the idea behind a general-purpose computer, where the program is data in memory.
Exam traps
- Order inside a step. Write first, then move, then change state.
- Argument order. δ(state, symbol), not δ(symbol, state).
- Halting. The machine stops only in a state with no outgoing transition.
- Blank squares. They can be read, overwritten and moved over.
- Position tracking. Number the squares and update the position every row.
- UTM wording. It has one program; it reads another machine’s description from its tape.
- Final answer. Give the final tape, not just the final state.
Quick self-test
- Name the four parts a Turing machine is expressed with.
- What is a halting state?
- Write the arc label for δ(S2, 0) = (S3, 1, L).
- Write the transition function for an arc from S1 to S1 labelled
0 / 0, R. - In which order do write, move and change state happen?
- A machine runs the bit-flip rules on
0110. What is the final tape? - How many steps does that take?
- Trace the unary increment rules on
11. What is the final tape? - What does the UTM store on its tape?
- Give one reason Turing machines are important.
- How many tapes do exam questions use?
- What name is given to the symbol for an empty square in these notes?
Answers
- A finite set of states, a finite alphabet, an infinite tape, and a read-write head.
- A state with no outgoing transitions; the machine stops when it enters one.
0 / 1, Lon the arc from S2 to S3.- δ(S1, 0) = (S1, 0, R)
- Write, then move, then change state.
1001- 5 steps (4 symbols plus the blank).
111- A description of the Turing machine to simulate, and that machine’s input.
- They provide a formal model of computation and a definition of what is computable.
- One tape, infinite in one direction.
- The blank, written □.
Official syllabus
OxfordAQA International AS and A-level Computer Science (9645) specification, Version 1.1, for International AS exams May/June 2025 onwards and International A-level exams May/June 2026 onwards: sub-topic 3.13.3 Turing machines.
Related resources
-
Study guides
OxfordAQA A-Level Computer Science (9645): Backus-Naur Form (BNF) and syntax diagrams
OxfordAQA 9645 sub-topic 3.13.4 in depth: BNF production rules, recursion, checking syntax, derivations, syntax diagrams, and what BNF can do that regular expressions cannot.
Computer Science · OxfordAQA · A Level
Read guide -
Practice questions
OxfordAQA A-Level Computer Science (9645): Backus-Naur Form (BNF) and syntax diagrams – Practice Questions
Ten original OxfordAQA 9645 questions on sub-topic 3.13.4 BNF and syntax diagrams: checking syntax, writing rules, derivations and BNF compared with regular expressions.
Computer Science · OxfordAQA · A Level
Try questions -
Revision notes
OxfordAQA A-Level Computer Science (9645): Backus-Naur Form (BNF) and syntax diagrams – Revision Notes
Recall notes for OxfordAQA 9645 sub-topic 3.13.4: BNF notation, recursion, checking syntax, syntax diagrams, palindromes and equal counts, with a self-test.
Computer Science · OxfordAQA · A Level
Revise topic
Get free revision emails (optional)
Occasional emails with practice questions, worked explanations and links to free resources for the qualification and subjects you choose. No spam, and you can unsubscribe from any email. The free tools on this site never need an email.