Here is a different method for performing the conversion, without having to know all the powers of 3. This method becomes far more efficient than the above method as the number of digits becomes larger.
Starting at the left, multiply each digit by the base and add the next digit; repeat until there are no more digits. For this example: