Skip to content
State machine (FSM) templates

Turing machine — binary successor

Three-state Turing machine transition diagram for incrementing a binary numeral, with arrows labelled read / write, move and the machine's reachability and determinism checked on the figure.

Template previewState machine (FSM)
Turing machine: binary successor (B = blank)3 states · 6 transitions · 6 events0 / 0, R1 / 1, RB / B, L1 / 0, L0 / 1, LB / 1, Lq_scan: run rightq_carry: add carryq_halt: acceptAll 3 states are reachable and every transition names states that exist.OKAll 3 states are reachable from `Scan`.OKEvery run from `Scan` can reach the final state.OKAll 6 transitions name states that exist, so every arrow in the figure is drawn.

Make it your own.

title "Turing machine: binary successor (B = blank)"
state Scan  label "q_scan: run right"
state Carry label "q_carry: add carry"
state Halt  final label "q_halt: accept"
initial Scan
transition Scan -> Scan on "0 / 0, R"
transition Scan -> Scan on "1 / 1, R"
transition Scan -> Carry on "B / B, L"
transition Carry -> Carry on "1 / 0, L"
transition Carry -> Halt on "0 / 1, L"
transition Carry -> Halt on "B / 1, L"