Content deleted Content added
Line 25:
The basic algorithm for binary (radix 2) restoring division is:
<code>
P := N << n ''* P and D need twice the word width of N and q''
'''for''' i = n-1..0 '''do''' ''* for example 31..0 for 32 bits''
P := 2P - D ''* trial subtraction from shifted value''
Line 37 ⟶ 38:
'''where''' ''N=Numerator, D=Denominator, n=#bits, P=Partial remainder, q(i)=bit #i of quotient''
</code>
Non-performing restoring division is similar to restoring division except that the value of <code>2*P[i]</code> is saved, so ''D'' does not need to be added back in for the case of <code>TP[i] ≤ 0</code>.
|