What would be the best method to divide a 16-bit number by an 8 bit number to get a 16 bit result? I've seen a lot about dividing 8 bit values by 8 bit numbers...and I have successfully worked on division of an 8 bit value that returns a 16 bit result (with the high byte being the integer and the low byte being the fraction) thanks to the forums. But what would be the best method for dividing a 16 bit number by an 8 bit number? I've been trying to modify my division code (from previous post) to no avail.
A very simple example:
I have a low and high byte for strength. I wanted to get, say, a fourth of it, and output the low and high byte result.
In that case I would expect, for instance, an input value of 02 00 to output 00 80.
Thanks!
A very simple example:
I have a low and high byte for strength. I wanted to get, say, a fourth of it, and output the low and high byte result.
In that case I would expect, for instance, an input value of 02 00 to output 00 80.
Thanks!