Turing Machine Part 1 — Addition

This is the first part of the Turing Machine series. For your convenience you can find other parts using the links below:
Part 1 — Addition
Part 2 — Checking if a word is a repetition
Part 3 – Checking palindromes
Part 4 — Subtraction
Part 5 — Twice as many ones as zeroes

In this post I show very simple addition algorithm for Turing Machine.

For testing the algorithm I use this page.


The input looks like this:

a is a digit of first number, b is a digit of second number, $ indicates left side of the input, % indicates boundary between numbers, ^ indicates right side of the input. Numbers are written “left to right” which means that 2 is written as 01. The result will appear on the right side after ^

Transition table in the form of character on the tape, current state, new character for the tape, new state, direction (R/L):