What is the rationale behind the below algorithm :
Algorithm to Convert From Decimal To Another Base
Let n be the decimal number.
Let m be the number, initially empty, that we are converting to. We'll be composing it right to left.
Let b be the base of the number we are converting to.
Repeat until n becomes 0
Divide n by b, letting the result be d and the remainder be r.
Write the remainder, r, as the leftmost digit of b.
Let d be the new value of n.