So, all of my arithmetic operations work (using basic textbook long multiplication and division). However, I am starting to get tired of thinking in binary. I would like to output my numbers in decimal digits. For integers, I have just implemented the naive approach.
str = "";
num = x;
do {
digit = num%base;
num = num/base;
str = to_char(digit) + str;
} while (num>0);
Edit: Uhm, not sure where the rest of this went. Basically, my question was how to do the same for fixed point decimal numbers. I described an overly complicated solution and Álvaro whipped up the right answer straight away.