How to draw Turing machine for multiplying a number by 2 in base 10 I'm trying to design a turing machine that given a number in base 10 multiplies it by 2.
The problem seems trivial if the number is represented in binary so what I've thought is try to convert it from base 10 to base 2, multiply it by 2 and convert it again.
But I'm not quite sure if I'm taking the wrong path or not. Maybe there is a simpler way. Any hints or suggestions?
To elaborate on the method described by Yuval in the comment, first, construct a DFA with output as follows: Let the state space be $Q=\{q_i \mid 0 \le i \le 9\}$, and input and output alphabet be $\Sigma = \{i \mid 0 \le i \le 9\}$. The initial state would be $q_0$. Let the DFA read the decimal number in reverse. For any state $q_i$, on reading $d$, you move to state $q_j \in Q$ and output $k \in \Sigma$ if $10j + k = 2d + i$ (Why can you always find such $j,k$?).
Basically, you are trying to store the carry while outputting the least significant digit of the multiplication of the current digit by 2 after adding the last carry, just as the grade-school multiplication.
Then, you can readily create a TM using this DFA with output that does the required multiplication.