10-4. Signed Division by Divisors ≥ 2

At this point you may wonder if other divisors present other problems. We see in this section that they do not; the three examples given illustrate the only cases that arise (for d ≥ 2).

Some of the proofs are a bit complicated, so to be cautious, the work is done in terms of a general word size W.

Given a word size W ≥ 3 and a divisor d, 2 ≤ d < 2W − 1, we wish to find the least integer m and integer p such that

Equation 1a

Equation 1b

with 0 ≤ m < 2W and pW.

The reason we want the least integer m is ...

Get Hacker's Delight now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.