Here comes the first of exercises to be solved using Turing's Machine. Please
refer to that article for the syntax used. Click Turing
button below solution area to run your code. Submit
when you are satisfied.
The tape contains binary number, consisting of 0
s and 1
s (all remaining tape to the left and right is
filled with spaces).
Create a program which increments this value by 1
.
For example:
1000
becomes 1001
(simply set last bit to 1
)1001
becomes 1010
(we reset last bit to 0
and set to 1
the preceding one)10100111
becomes 10101000
(we reset all trailing ones to zeroes and toggle the zero before them)Robot starts at the leftmost digit.
Input below is given just for you to play with. Feel free to change it to any other. Your solution on the server will be tested against several different inputs. Answer is also ignored.