Conversion from Decimal
i=0;
while N > 0 do
bi = N % 2; // bi = remainder; N mod 2
N = N / 2; // N becomes quotient of division
i++;
end while
Replace 2 by A and you have an algorithm that computes the base A representation for N
Previous slide
Next slide
Back to first slide
View graphic version