# Demonstrate the method used to convert decimal to any other base

binarydecimal-expansionnumber-systems

Let's say we have an arbitrary number in base $$b$$, $$(x_3x_2x_1x_0)_b$$.

We can write the equivalent of this number in base $$10$$ as follows:

$$(x_3x_2x_1x_0)_b = x_3*b^3+x_2*b^2+x_1*b^1+x_0*b^0$$

So, let $$N = x_3*b^3+x_2*b^2+x_1*b^1+x_0*b^0$$

If we want to convert decimal to any other base we just need to remove the
bases $$b^3, b^2, b^1, b^0$$.

To remove the bases we need to divide by $$b$$.

$$\frac{N}{b} = x_3*b^2+x_2*b^1+x_1*b^0+x_0*b^{-1}$$

BUT the result suppose to be:

$$\frac{N}{b} = x_3*b^2+x_2*b^1+x_1*b^0+x_0$$

and $$x_0$$ would be the least digit that we are looking for.

I just don't get it!

I've seen it in this video:

In the minute 0:28

$$\frac{N}{b} = x_3*b^2+x_2*b^1+x_1*b^0$$
with a remainder of $$x_0.$$
To take a simpler example, consider dividing $$14$$ by $$3$$.
Then $$\frac{14}{3} = 4$$, with a remainder of $$2$$.
This implies that $$14 = (3 \times 4) + 2.$$