translating from base 10 to base X: an easy method

2.5k Views Asked by At

I've studied binary-- a number represented by $1$'s and $0$'s. (like $1010_2=10_{10}$) i know you can represent numbers in other bases(base 3, base 16, base 36) I was wondering--is there an easy way to convert between bases? as an example, convert 12045732 to base-37 (i used a random number generator)

1

There are 1 best solutions below

0
On BEST ANSWER

To convert $12045732$ to base $37$:

  1. Compute the remainder of $12045732$ divided by $37$. The remainder is $12$. This is your ones element.

  2. Subtract the remainder of $12$ from $12045732$ and divide by $37$. The result is $325560$.

  3. Go back to $1$. with this new number and continue to get the $37$'s digit, and so on.

In this case, you get $(6)(15)(29)(34)(12)$. In other words, $$ 12045732=6\cdot 37^4+15\cdot37^3+29\cdot37^2+34\cdot 37+12. $$