compute x-y for x > y. Get 0 if x < y. Represent x-y by strings of 1's separated by -. Mark front of string with #. Move to the y string and repeat: mark the 1 at the front with a t, go back to x and remove a 1 at the tail (write blank on it), until you run out of 1's in y or until you hit #. If you hit #, remove #, remove - and remove all t's. If you ran out of 1's, remove t's, remove # and -. (0111l State 1: mark the leading # (1 #2r (2112r State 2: locate the y strin (2 2r (2--3r State 3: found the y string... mark a 1 with a t (3tt3r (31t4l State 4: marked a 1 in y. Now go back to x string (3 6l State 6: Ran out of 1's in y. Clean up and halt (4tt4l (4--5l State 5: found x string. Now remove any remaining 1's (5 5l (51 2r remove a 1 (5# 7r State 7: more y's than x's. Remove everything on the tape (6t 6l (6- 6l (6 6l (6116l (6# 9r State 9: final state (7 7r (7- 8r (8t 8r (81 8r (8 9r