1. print 0
2. move right
3. if 1 is scanned goto 2
4. print 1
5. move left
6. if 1 is scanned goto 5
7. move left
8. if 0 is scanned goto 7
9. print 0
10. move left
11. if 1 is scanned goto 10
12. print 1
13. move right
14. if 1 is scanned goto 13
15. move right
16. if 0 is scanned goto 15
17. if 1 is scanned goto 1
18. stop
(end marker)
Initial ...0001100011000...
tape: |
| 000
011
110 11 0
001
010
110 11111 0
010
101 0000000 1
000
010
110 1111111111 0
001
011
110 1111111111111 0
011
101 000000000000000 1
110 1 0
100
111
|