Division Assembly in MSP430 - Electrical Engineering Stack Exchange
Fixed point is easy : if you decide you want 8 fractional bits, just divide 2^8 * remainder / denominator, and use the size of that operation's remainder to determine rounding. In your example, that would give. (256 * 1) / 2 = 128 as your fractional part, i.e. 128 / 256 = 0.5. Or for 3 fractional (decimal) digits, just compute 10^3 * remainder ...