Note: You weren't expected to complete these solutions within the problem class! As usual, the real point is the `Aha!' of getting the essentials correct, and the fine detail is time-consuming but necessary in the real world, but less important in class. I've given most of the fine detail here so that you can check your solutions against mine.
Now what? Well, we must scan left to pick up the rightmost digit [here 0] of the left operand. If there isn't one [we find X], then we've essentially finished, and just need to tidy up. If the digit is zero, then we replace it by +, to say we've used this digit, then scan right until we find the start of the answer [1, or X if this is the first digit], go back a place, replacing a or b by 0 or 1, and treating + as a [in case we've exhausted the right operand]; then start again. If the digit is one, then the scan right is the same, but the replacement is more complicated. We have to add one to the right operand; so we replace a by 1, but b by 0 and `carry one'.
So, there are three `phases'; convert to the initial `intermediate state', process all the digits [as above], and tidy up. Tidying up is left as an exercise, but we can expand the other phases:
State 0: [start, phase 1]
Scan right, until we find the + [state 1]
State 1:
Scan right, replacing 0, 1 by a
b, until we find X [state 2]
State 2: [phase 2, start of main loop]
Scan left.
If we find X, we're done [tidy up, state 8].
On finding 0, enter state 3;
or on finding 1 enter state 5
State 3:
Scan right, looking for 0, 1 or X
[state 4]
State 4: [add 0]
Replace letter by digit, as described above, then state 2
State 5:
As state 3, but then enter state 6
State 6: [add 1]
Replace a or + by 1 and enter state 2,
or replace b by 0 and enter state 7
State 7: [carry 1]
Go left, replacing a by b and enter state 2,
or replacing b by a [staying in state 7]
States 8, 9, ...: [tidy up, phase 3]
Left as an exercise!
Here is the set of matrices for the first two phases [? indicates an impossible or arbitrary entry]:
next state output symbol direction input 0 1 a b + X 0 1 a b + X 0 1 a b + X state 0 0 0 ? ? 1 ? 0 1 ? ? + ? R R ? ? R ? 1 1 1 ? ? ? 2 a b ? ? ? X R R ? ? ? L 2 3 5 2 2 2 8 + + a b + X R R L L L L 3 4 4 3 3 3 4 0 1 a b + X L L R R R L 4 ? ? 2 2 2 ? ? ? 0 1 0 ? ? ? L L L ? 5 6 6 5 5 5 6 0 1 a b + X L L R R R L 6 ? ? 2 7 2 ? ? ? 1 0 1 ? ? ? L L L ? 7 ? ? 2 7 2 ? ? ? b a b ? ? ? L L L ? 8 left as exercise!