There are a number of example programs which can be loaded in to illustrate how
Turing machines can be written and run using this application.
|
Add One
|
Adds 1 to the specified number.
- The machine is initially in state R
- The tape head moves right until it find a ▢
- It then enters state F and the tape head moves left
- The symbol 1 is changed to 0 and the tape head moves left
- The symbol 0 is changed to 1.
The halting state is entered and the machine stops
|
Odd Parity
|
Adds 0 or 1 to the number to made the parity odd
- The machine is initially in state L
- The tape head moves left until it find a ▢
- It then enters state E and the tape head moves right
- If the current symbol is 0, the tape head moves right
- If the current symbol is 1, the state changes between O and E and the tape head moves right
- When the symbol ▢ is found, it is replaced with 0 if the state is O and 1 if the state is E.
The halting state is entered and the machine stops
|
One's Complement'
|
Finds the one's complement of a number by switching 0 to 1 and 1 to 0.
- The machine is initially in state R
- The tape head moves right until it find a ▢
- It then enters state F and the tape head moves left
- The symbol 1 is changed to 0 and the tape head moves left
- The symbol 0 is changed to 1 and the tape head moves left
- When the symbol ▢ is found the halting state is entered and the machine stops
|
Two's Complement
|
Finds the two's complement of a number; the negative respresentation
- The machine is initially in state R
- The tape head moves right until it find a ▢
- It then enters state K and the tape head moves left
- If the current symbol is 0, the tape head moves left
- If the current symbol is 1, the state is changed to F and the tape head moves left
- The symbol 1 is changed to 0 and the tape head moves left
- The symbol 0 is changed to 1 and the tape head moves left
- When the symbol ▢ is found the halting state is entered and the machine stops
|
Shift Letters Right
|
Moves a string made up of the symbols X, Y and Z, one place to the right
- The machine is initially in state L
- The tape head moves left until it find a ▢
- It then enters state B and the tape head moves right
- In state B symbols X, Y and Z are changed to ▢, the state is changed to
the one matching the symbol and the tape head moves right
- In states X, Y and Z, the symbols X, Y and Z are changed to match the state value,
the state is changed to the one matching the symbol and the tape head moves right
- In states X, Y and Z, the symbol ▢ is changed to match the state value,
the halting state is entered and the machine stops
|
Copy
|
Makes a copy of a string made up of the symbols X, Y and Z
|
Reflect
|
Makes a reflection of a string made up of the symbols 0 and 1
|