# Turing Machine **An abstract machine that reads and writes symbols on or moves an infinite tape of discrete cells and is always in exactly one of a finite set of states.** ![[TuringMachine.svg]] *A simple representation of a Turing machine; $S$ denotes the current state and is shown in the head; $B$ is used as the blank symbol* A **Turing machine** is an abstract machine that mathematically models computation. It mechanically operates an *infinitely long* tape which consists of *discrete cells* of a finite set of *symbols* often called the alphabet. The alphabet includes a *blank symbol*. It is also commonly described as having a "head" pointing at the cell it is currently reading and writing to. Additionally, it is always in a "state" chosen from a finite set of states. In each step of its operation, it reads the cell its head is pointing to then writes to it according to the current symbol in the cell and its current state. The machine then *moves* the head forwards or backwards, or *halts* the operation. The manner by which the new symbol to be written to a cell according to the current symbol and state is determined by a *finite table* containing instructions for every combination of symbols and states. A Turing machine is capable of implementing any possible computer algorithm.