94 Arithmetic There are some points to keep in mind in following the algorithm - Suppose you have a divisor whose normalized mantissa is larger than the normalized mantissa of the dividend, for example - 15 + 48 then the first digit of the quotient's mantissa could easily be zero. If calculation of only twelve digits were made, the first digit being zero would mean a loss of a significant digit. To guarantee that there are always at least 12 significant digits calculated for the quotient, it is necessary (and sufficient) to calculate 13 digits. The 13th digit can always be thrown away, or used for rounding, if the first digit is not zero.
Thirteen digits are always sufficient because you can never have a quotient with two leading zeroes, if the divisor and the dividend are both normalized. The number of subtractions during the calculation of any digit in the quotient is always nine or less. Again, this is true because the divisor is normalized and its first digit is always non-zero. • At times during the algorithm, it is necessary to left-shift the mantissa of Ar2 (the mantissa at this point is the remainder). When shifting the remainder to the left (multiplying it by 10), you are shifting the first digit out of Ar2. If this digit is zero, this is not a problem.
But, if the digit is non-zero, you can't ignore it during subtractions of the divisor. This in effect means that you are dealing with a 13-digit dividend! Since the machine instructions deal in 12-digit arithmetic, it is necessary that the algorithm handle the thirteenth. The FDV Instruction The FDV instruction provided by the processor is the primary tool used to implement the algorithm in assembly language. The instruction works by accomplishing the equivalent of automatically repeated subtractions of Arl (the divisor) from Ar2 (the dividend) until Ar2 is smaller than Ar!. The instruction actually adds the divisor to the ten's complement of the dividend until an overflow occurs.
However, this is equivalent to subtracting until an "under- flow" occurs. It is easier to understand the procedure if the discussion is in terms of "subtrac- tions", but it should be kept in mind that what is really occurring with the instruction is repeated tions until overflow". "complement-additions" until overflow. This process is what is meant by the term "subtrac-