摘要 |
A method for dividing a dividend by a divisor and finding a dividing quotient and a dividing remainder is provided. The dividend has a low byte part and a high byte part and the divisor has a low byte part and a maximum digital value whose most significant bit is "1" and other bits are "0". At first, the low byte part of the dividend is divided by the divisor to obtain a low-byte quotient and a low-byte remainder. Secondly, the high byte part of the dividend is divided by the divisor to obtain a high-byte quotient and a high-byte remainder. Then the high-byte remainder is shift-divided by the divisor to update the low-byte quotient, the high-byte quotient, and the high-byte remainder. Then the high-byte remainder is added to the low-byte remainder to obtain a sum. The sum is divided by the divisor to obtain a quotient and the dividing remainder. Finally, the quotient is added to the low-byte quotient to find the dividing quotient.
|