I know and have observed that the the division algorithm can be used to convert any number in the decimal system to the binary system. However, I have tried searching for an intuition of why this method works, and I just can't seem to see anything, although I know what type of intuition I am trying to make out.
So, my question is why we can use the division algorithm to convert between the decimal bases and any other number bases?
An example from the decimal system to binary would be appreciated.
Choose any integer $b$ such that $b\geq 2$.
Choose some integers $d_k,d_{k-1},\ldots,d_1,d_0$, each of which satisfies $0\leq d_i<b$, and define $n$ to be $$n=d_k\cdot b^k\;+\;d_{k-1}\cdot b^{k-1}\;+\;\cdots\;+\;d_1\cdot b\;+\;d_0$$ (In other words, define $n$ to be the base-$b$ number $(d_k\ldots,d_1d_0)_b\;$.)
Recall what the division algorithm says:
Then by the division algorithm, there exists a unique choice of integers $q$ and $r$ such that $$n=q\cdot b^k+r,\qquad 0\leq r<b^k$$ Since we know that $$n=d_k\cdot b^k\;+\;\underbrace{d_{k-1}\cdot b^{k-1}\;+\;\cdots\;+\;d_1\cdot b\;+\;d_0}_{\Large0\leq\textsf{THIS} <b^k}$$ it must be that $q=d_k$ and $r=n-(d_k\cdot b^k)$. We can repeat this process, dividing by a power of $b$ and taking the remainder, dividing that remainder by the next lower power of $b$, etc., to get quotients (the numbers $q$) that are exactly the integers $d_i$ we started with, in the order $$d_k,\quad d_{k-1},\quad\ldots,\quad d_1,\quad d_0$$
What is the purpose of this? It shows that if we instead started with an integer $n$, and wanted to find out its digits when represented in base $b$, we should divide $n$ by the largest power $b^k$ for which we still have $n\geq b^k$, and then divide the successive remainders by successive powers of $b$ until we get to dividing by $b^0=1$.
To find the digits in the other order, we can still apply the division algorithm.
By the division algorithm, there exists a unique choice of integers $q$ and $r$ such that $$n=q\cdot b+r,\qquad 0\leq r<b$$ Since we know that $$n=\Bigl(d_k\cdot b^{k-1}\;+\;d_{k-1}\cdot b^{k-2}\;+\;\cdots\;+\;d_1\Bigr)\cdot b\;+\;d_0$$ it must be that $r=d_0$ and $q=\frac{n-d_0}{b}$. We can repeat this process, dividing by $b$ and taking the remainder, dividing the quotient by $b$ again and taking that remainder, to get remainders (the numbers $r$) that are exactly the integers $d_i$ we started with, in the order $$d_0,\quad d_1,\quad\ldots,\quad d_{k-1},\quad d_k$$