How to convert base 7 to base 19 directly

618 Views Asked by At

Is it possible to convert base 7 to base 19 directly without first converting to base 10 ?

If so, what is the algorithm ?

1

There are 1 best solutions below

0
On BEST ANSWER

You have two options:

  1. Work in base nineteen. Calculate the powers of $7$ in base nineteen, multiply them by the base-7 digits of the original number, add together.

  2. Work in base seven. Start with your original number, successively divide by nineteen (that is, $25_7$), and remember the remainders; these become your base-nineteen digits.

The first method has the advantage that you don't need to do long division; on the other hand you need a nineteen-by-nineteen multiplication table. And long division by a two-digit number is not that cumbersome.