1 - 2 - -1 1 * 1 * 1 2 0 3 - -1 2 1 4 - -1 2 + 8 - -1 3 + 5 + -1 3 * 3 * -1 5 - 7 A 1 5 0 7 A 1 5 1 7 B 1 5 * 5 * -1 4 + 6 + -1 4 * 4 * -1 6 - 7 B 1 6 0 7 B 1 6 1 7 C 1 6 * 6 * -1 7 - 2 - -1 7 * 7 * 1 8 - 0 - 1 8 0 8 0 -1 8 1 8 1 -1 8 A 8 0 -1 8 B 8 1 -1 8 C 9 0 -1 9 - 0 1 0 9 0 8 1 -1 9 1 9 0 -1 9 A 8 1 -1 9 B 9 0 -1 9 C 9 1 -1 0 A Turing Machine for adding integers in binary notation Specification: Input + where M and N are binary numerals Output their sum 9 non-halting states Tape alphabet = {-,1,0,+,A,B,C} How does it do it? It "overlays" the second number onto the first, using the code A=0+0, B=0+1=1+0, C=1+1. It then runs backwards through the string converting into bits as follows: -------------------------------------------------------- A B C -------------------------------------------------------- No carry 0, no carry 1, no carry 0, carry (state 8) Carry 1, no carry 0, carry 1, carry (state 9) --------------------------------------------------------