Is it possible to convert base 7 to base 19 directly without first converting to base 10 ?
If so, what is the algorithm ?
Is it possible to convert base 7 to base 19 directly without first converting to base 10 ?
If so, what is the algorithm ?
Copyright © 2021 JogjaFile Inc.
You have two options:
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.
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.