%% file ctm01.txt %% cTM incrementing binary numbers %% move to right end q0 0/0,R q0 q0 1/1,R q0 q0 #/#,L q1 %% scan for 0 or # to the left %% when found write 1 and halt %% replace 1 by 0 underway q1 0/1,R q2 q1 1/0,L q1 q1 #/1,R q2