Load one of the example programs, or write your own in the TM Program area below.
Enter something in the 'Input' area - this will be initially written on the tape.
Click on 'Run' to start the Turing machine and run it until it halts (if ever).
Click on 'Stop' to interrupt the Turing machine while it is running.
Alternately, click 'Step' to run a single step of the Turing machine.
Click 'Reset' to restore the Turing machine to its initial state so it can be run again.
Choose a program and click Run!
Run at full speed:
Turing machine program:
Each line should contain one tuple of the form '<current state> <current symbol> <new symbol> <direction> <new state>'.
You can use any number or word for <current state> and <new state>, eg 0, a, state1. State labels are case-sensitive.
halt is the halting state. The machine starts in state 0.
You can use any character for <current symbol> and <new symbol>, or '_' to represent blank (space). Symbols are case-sensitive.
<direction> should be 'l', 'r' or '*', denoting 'move left', 'move right' or 'do not move', respectively.
Anything after a ';' is a comment and is ignored.
'*' can be used in <current symbol> or <current state> to match any character or state.
'*' can be used in <new symbol> or <new state> to mean 'no change'.