Solution to Turing Machine Adder
- State 1.
- If blank, then write blank, don't move, and goto state 0.
- If 0, then write 1, move right, and goto state 2.
- If 1, then write 0, move right, and goto state 3.
- State 2.
- If blank, then write blank, move left, and goto state 4.
- If 0, then write 1, move right, and goto state 2.
- If 1, then write 0, move right, and goto state 3.
- State 3.
- If blank, then write blank, move right, and goto state 5.
- If 0, then write 0, move right, and goto state 3.
- If 1, then write 1, move right, and goto state 3.
- State 4.
- If blank, then write blank, don't move, and goto state 0.
- If 0, then write blank, move left, and goto state 4.
- If 1, then write 1, don't move, and goto state 0. (error!)
- State 5.
- If blank, then write 1, don't move, and goto state 6.
- If 0, then write 1, don't move, and goto state 6.
- If 1, then write 0, move right, and goto state 5.
- State 6.
- If blank, then write blank, move left, and goto state 7.
- If 0, then write 0, move left, and goto state 6.
- If 1, then write 1, move left, and goto state 6.
- State 7.
- If blank, then write blank, move right, and goto state 1.
- If 0, then write 0, move left, and goto state 7.
- If 1, then write 1, move left, and goto state 7.
Next Slide