# Add two numbers, according the the Boolos, et al., conventions. # Erase a one and move to the right (state 0). If the first square is # blank, move to the right and halt (state 1). Else, keep moving to # the right until you find a blank (state 2). Write 1 there (state # 2), move to the left until you find a blank (state 3). When you do, # move back right (state 3) and erase a 1 and move right again (state # 4). Halt. # St R W M New 0 1 _ r 1 # In state 0, if I see a 1, # write a blank and move right and goto state 1. # State 0: start state -- erase a one 1 _ _ r 99 # The first number was 0, so I'm okay. 1 1 1 r 2 # State 1: 2 _ 1 l 3 # Put a 1 in the first blank. 2 1 1 r 2 3 _ _ r 4 # Look for first blank 3 1 1 l 3 4 1 _ r 99 # Erase first 1 and halt