In each state the current letter is read from the tape and the instruction to be executed is identified. The output is written back to the tape, the cursor is moved in the direction and the next state is executed.
Empty fields on the tape are represented with an '_'.
The program is finished when the final state is reached.
if input equals
then output should be
the tape should move to the
and the next state should be
Instructions for new state
if input equals {{ instruction.precondition }} then return {{ instruction.postcondition }} and move {{ instruction.direction }}; Next state is {{ instruction.successor }}
States
Index
Instructions
{{ index }}
if input equals {{ instruction.precondition }} then return {{ instruction.postcondition }} and move {{ instruction.direction }};
Next state is {{ instruction.successor }}