Hi all!
I've got this code:
Code:
W1 = (W0 * 100) / (I / 1000)
let's suppose that I is 10000 and W0 is 900 we have this:
Code:
W1 = (900 * 100) / (10000 / 1000)
now 900 * 100 is executed and return a 32 bit number: 90000
10000/1000 is executed and return an 8 bit number: 10
as you can see, the result 90000/10 is obviously a 16bit number, but PBP will return the right number or i have to use DIV32?
and if i have to use DIV32, it can be done this way?:
Code:
W1 = (W0 * 100) DIV32 (I / 1000)
thank you!
Luca
Bookmarks