Converting from base $x$ to base $y$

2.5k Views Asked by At

I'm trying to convert from base $x$ to base $y$, but am having trouble understanding why the following method only works when converting to base $10$.

Take for instance the number $2132$ (base $4$). I can convert it to base $10$ the following way:

$2*4^3 + 1*4^2 + 3*4^1 + 2*4^0 = 158$

So that means $2132$ (base $4$) = $158$ (base $10$).

Now what if I want to convert the same number, $2132$ (base $4$) to base $6$? Why can't I do the same method? Example: $2*4^3 + 1*4^2 + 3*4^1 + 2*4^0 = 158$

Why is this method specific to base $10$ only?

I know that I can use a different method to convert from base $4$ to base $6$, but I'm not sure why base $10$ has this method that no other base can use?

2

There are 2 best solutions below

0
On

You got the number to decimal, which is good.

Now just take it into base $6$.

$6^3 = 216$ is greater than $158$ so we need just three digits.

$6^2 \times 4$ is $144$, leaving $14$. $6 \times 2$ is $12$, leaving $2$, and we're done:

$$2132_4 = 158_{10} = 422_6.$$

Now, if you wanted to work in base $6$, you could, but then you're just converting each number along the way (which, by the way, is what you do when you convert to base $10$ first!):

$$1000_4 = 144_6, 100_4 = 24_6, 10_4 = 4_6, 1_4 = 1_6$$

Then, have at it!

$$2 \times 144_6 = 332_6, 1 \times 24_6 = 24_6, 3 \times 4_6 = 20_6, 2 \times 1_6 = 2_6$$ $$332_6 + 24_6 + 20_6 + 2_6 = 422_6.$$

There's really no difference. We're all just so familiar with decimal that it seems different.

0
On

Take for instance the number $2132$ (base $4$). I can convert it to base $10$ the following way:

$2*4^3 + 1*4^2 + 3*4^1 + 2*4^0 = 158$

So that means $2132$ (base $4$) = $158$ (base $10$).

Now what if I want to convert the same number, $2132$ (base $4$) to base $6$? Why can't I do the same method? Example: $2*4^3 + 1*4^2 + 3*4^1 + 2*4^0 = 158$

Why is this method specific to base $10$ only?

Because the basic mathematics for arithmetic you have learned in school (addition table, multiplication table etc.) is the maths for base $10$.

E.g. $3 \cdot 4^1 = 3 \cdot 4 = (12)_{10} = (C)_{16} = (1100)_2$ etc.

Your method is not general purpose, it is only valid to convert to a base $10$ (decimal) representation.