# Adds two numbers given in binary and returns the result in binary. # Input: $+= # Output: $+= Q = {start, left, null, zero, one, zero1, one1, sumz, sumo, sumt, shuntz, shunto, sleq, exit, tidy, halt} I = start F = halt G = {0, 1, +, =, $, c, A, B, b} S = {0, 1, +, =, $} D = {(start, ?, start, ?, R), (start, =, left, =, L), (left, ?, left, ?, L), (left, +, null, +, L), (left, 0, zero, A, L), (left, 1, one, B, L), (null, ?, null, ?, L), (null, $, exit, $, R), (null, 0, sumz, A, R), (null, 1, sumo, B, R), (zero, ?, zero, ?, L), (zero, +, zero1, +, L), (zero1, ?, zero1, ?, L), (zero1, 0, sumz, A, R), (zero1, 1, sumo, B, R), (zero1, $, sumz, $, R), (one, ?, one, ?, L), (one, +, one1, +, L), (one1, ?, one1, ?, L), (one1, 0, sumo, A, R), (one1, 1, sumt, B, R), (one1, $, sumo, $, R), (sumz, ?, sumz, ?, R), (sumz, =, shuntz, =, R), (sumz, c, shunto, =, R), (sumo, ?, sumo, ?, R), (sumo, =, shunto, =, R), (sumo, c, shuntz, c, R), (sumt, ?, sumt, ?, R), (sumt, =, shuntz, c, R), (sumt, c, shunto, c, R), (shuntz, 0, shuntz, 0, R), (shuntz, 1, shunto, 0, R), (shuntz, b, sleq, 0, L), (shunto, 0, shuntz, 1, R), (shunto, 1, shunto, 1, R), (shunto, b, sleq, 1, L), (sleq, ?, sleq, ?, L), (sleq, =, left, =, L), (sleq, c, left, c, L), (exit, ?, exit, ?, R), (exit, c, shunto, =, R), (exit, =, tidy, =, L), (tidy, A, tidy, 0, L), (tidy, B, tidy, 1, L), (tidy, +, tidy, +, L), (tidy, $, halt, $, R)}