For an -bit unsigned dividend and positive divisor , read the dividend bits from most to least significant. If the processed prefix is , maintain with . Appending bit gives trial remainder ; append quotient bit and replace the remainder by . This preserves the quotient–remainder identity.
The old dividend and new quotient can share one -bit processor register: after iterations its value is , where . The shifted dividend occupies the upper positions and the accumulated quotient occupies the lower positions, so no information is overwritten. The high processor register holds . For an -bit dividend the next trial remainder is no larger than the next prefix, hence fits in bits through the final iteration. This last bound is specific to the dividend width; it must not be assumed for unrestricted multiword dividends.

Articles by others on the same topic (0)

There are currently no matching articles.