: : Simple Turing machine program that : simply adds a 1 to the trailing edge of : a series of 1s. All symbols on the tape : are assumed to be 0s and 1s. : : Adapted from Roger Penrose's book: : The Emperor's New Mind : : skip leading 0s 0:0:0::R : move to state 1 when first 1 is found 0:1:1::R : skip over 1s 1:1:1::R : add 1 at end of series of 1s and halt to right 1:0:halt:1:R : Use this for a test tape: : 000011110000, start at position 0