TITLE: Why does the division algorithm work for converting between number bases?
QUESTION [13 upvotes]: 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.

REPLY [3 votes]: Because the base $b$ representation of a number is "invertible". Let a number be
$$n=\sum_{i=0}^dd_ib^i,$$
where $b$ is the base and the $d_i$ are the digits, such that $0\le d_i<b$.
For example,
$$443_5=4\cdot5^2+4\cdot 5+3=123.$$
By the remainder theorem, there is a unique quotient $q$ and a unique remainder $r$ such that
$$n=qb+r\text{, and }0\le r< b.$$
Like
$$123=24\cdot5+3\text{, and }0\le3<5.$$
Obviously the initial equation can be written as
$$n=\left(\sum_{i=0}^{d-1}d_{i+1}b^i\right)b+d_0,$$
so that the remainder is the last digit and the quotient is the initial number with the last digit dropped.
As you can check,
$$\color{green}{443}_5=123=24\cdot5+3=\color{green}{44}_5\cdot5+\color{green}{3}.$$
Iterating,
$$\color{green}{44}_5=24=4\cdot5+4=\color{green}{4}_5\cdot5+\color{green}{4}.$$