
Patrick B. answered 06/04/19
Math and computer tutor/teacher
Already then.
Let's take a simple example.
123 changing to base 5.
THe powers of 5 are:
exponent x 5^x
0 1
1 5
2 25
3 125
4 625
since 125>123, we only need three digits in base 5.
123 divided by 25 is 4 with a remainder of 23. So the first digit is 4.
23 divided by 5 is 4 with a remainder of 3. So the second digit is 4.
Then 123 base 10 is the same as 443 base 5
TO check it, since it is a 3 digit , base 5 number, we have the highest exponent of 2.
so
4 * 5^2 + 4 * 5^1 + 3 * 5^0 =
4 * 25 + 4 * 5 + 3 * 1 =
100 + 20 + 3 = 123
As an added bonus:
4321 base 5 is
4*5^3 + 3* 5^2 + 2* 5^1 + 1*5^0 =
4 * 125 + 3 * 25 + 2 * 5 + 1*1 =
500 + 75 + 10 + 1 =
586