Binary add one

Example 01

The head reads one cell. The tape continues in both directions.

Instruction Table

StateReadWriteMoveNext state
Find the end00RightFind the end
Find the end11RightFind the end
Find the endLeftCarry
Carry10LeftCarry
Carry01StayHalt
Carry1StayHalt

The outlined rule is the one the machine will use next.

State Machine

0 steps
Binary increment: Find the end, Carry, Halt Scan right to the blank, then carry left. Change each trailing one to zero. Change the first zero or blank to one and halt. Start Read 0 or 1 · keep itRight Read □ · write □Left Read 1 · write 0Left Read 0 or □ · write 1Stay Findthe end Carry Halt