Create a Turing machine that does the following. Assume the
input is a string of 1's and 0's representing a binary number n. The
number is bounded on the left by a blank and terminated with a blank.
The purpose of the machine is to
calculate 2n-1. For example, suppose that the string stored on the tape
is
' 1010 '
^ (This mark shows the start position)
This represents the number 6. After the
turing machine halts in an accepting state, the tape should look like
' 10011 '
^
representing the number 11 (eleven). After completing the calculation,
the turing machine should reposition the head to point to the beginning
of the number.