What this Turing Machine does:
Each instruction of the Turing Machine program is of the form:
State Symbol NextState Action
For example,
2 B 3
D
If the
Statematches the Current State of the Turing Machine, and the
Symbolmatches the Symbol that is currently above the Tape Head, then the Turing
Machine changes its Current State to be
NextState,and performs the
Action.
If the Actionis "->", the tape head moves one cell to the right. If the
Actionis "<-", the tape head moves one cell to the left. Otherwise, the
Action is a Symbol, and that Symbol is printed in the tape cell above the Tape Head.
Try it out!
Click on the green
GO button. The first program will Test Two Strings to
see if they match. The second program will Multiply Two Numbers in tally notation.
How it works:
When this Turing Machine runs, you can see how it works! It's like a wristwatch with a
transparent case.
When you click on the green Go button, a Tester
appears.
Each digit in the Current State is actually a Character in Creator, and these digits move
down with the Tester so that they overlap the first instruction in the program. The Tester
tests whether these digits match the
Stateof the first instruction. If they don't,
the tester and the digits of the Current State move down to the next instruction. They
continue moving down until the Tester determines that the Current State matches the
Stateof an instruction. The Tester then checks whether the
Symbolof this
instruction matches the Symbol above the Tape Head. If so, the Tester duplicates all of
the digits in the
NextState,executes the
Action,and deletes the old State.
The new State now moves up to the top of the program and takes its place as the new Current
State.
Stagecast Creator and Stagecast Player are trademarks
of Stagecast Software, Inc.
Java is a registered trademark of Sun Microsystems, Inc.