| ??? 12/23/02 15:56 Read: times |
#34900 - RE: 32-bit Divide with Fixed Divisor |
HI Drew
If I'm not wrong, the highest result could be 7158,27. This means that 600000 fits 7158,27 times in 32 bits ( of course ). So one simple way is to add 600000 so many times as you reach the dividend. You must have a counter that will increment each time you add 600000. This counter will have the result and is very easy to get the rest of the operation. The problem of this procedure is that in the worst case you will need to do 7158 additions. If you need, for i.e. 50 usec for each addition/comparator then the total time will be 0,36 sec aprox. ( worst case). Good luck Daniel |



