Method for performing decimal division
AssigneeInternational Business Machines Corporation
InventorsSteven R. Carlough, Paulomi Kadakia, Wen H. Li, Eric M. Schwarz
Life of this patent
Estimating the term…
Abstract
A method for performing decimal division including receiving a scaled divisor and a scaled dividend into input registers. A subset of multiples of the scaled divisor is stored in a plurality of multiples registers. Quotient digits are calculated in response to the scaled divisor and the scaled dividend. Each quotient digit is calculated in three clock cycles by a pipeline mechanism. The calculating includes selecting a new quotient digit, and calculating a new remainder. Input to the calculating a new remainder includes data from one or more of the multiples registers.
Claims13
A method for performing decimal division, the method comprising:
- receiving a scaled divisor and a scaled dividend into input registers;
- storing a subset of multiples of the scaled divisor in a plurality of multiples registers;
- calculating quotient digits in response to the scaled divisor and the scaled dividend, wherein each quotient digit is calculated in three clock cycles by a pipeline mechanism, wherein the pipeline mechanism includes a two cycle adder, a latching multiplexer connected to the multiples registers and the two cycle adder, a remainder register connected to the two cycle adder, remainder selection circuitry connected to the remainder register, quotient selection circuitry connected to the multiplexer, the remainder selection circuitry and the remainder register, and a quotient accumulator connected to the two cycle adder, the calculating including:
- selecting a new quotient digit;
- and
- calculating a new remainder, wherein input to the calculating a new remainder includes data from one or more of the multiples registers.
A method for performing decimal division, the method comprising:
- receiving a scaled divisor and a scaled dividend into input registers;
- storing a subset of the multiples of the scaled divisor in a plurality of multiples registers;
- and
- calculating quotient digits in response to the scaled divisor and the scaled dividend, wherein the calculating is performed by a mechanism that includes a two cycle adder, a latching multiplexer connected to the multiples registers and the two cycle adder, a remainder register connected to the two cycle adder, remainder selection circuitry connected to the remainder register, quotient selection circuitry connected to the multiplexer, the remainder selection circuitry and the remainder register, and a quotient accumulator connected to the two cycle adder, the calculating including:
- receiving the scaled divisor and dividend into the input registers;
- storing a subset of the multiples of the scaled divisor in the multiples registers;
- initializing an accumulated quotient to zero;
- initializing a first current remainder to be equal to the scaled dividend;
- initializing a second current remainder to be equal to the scaled dividend minus the scaled divisor;
- and
- performing until a selected number of quotient digits are produced:
- calculating an estimated next quotient digit based on the first digit of the first current remainder;
- selecting a temporary remainder to be either the first current remainder or the second current remainder based on the estimated next quotient digit;
- calculating a first next remainder by subtracting one of the stored multiples from the temporary remainder using the two cycle adder, wherein the stored multiple is selected based on a first digit of the first current remainder;
- calculating a second next remainder by subtracting an other one of the stored multiples from the temporary remainder using the two cycle adder, wherein the other one of the stored multiples is selected based on the first current remainder;
- calculating an actual next quotient digit based on the estimated next quotient digit, the first current remainder and the first next remainder;
- updating the accumulated quotient with the actual next quotient digit;
- and
- setting the first current remainder to be equal to the first next remainder and the second current remainder to be equal to the second next remainder.
A method for performing decimal division, the method comprising:
- receiving a scaled divisor and a scaled dividend into input registers;
- storing a subset of multiples of the scaled divisor in a plurality of multiples registers;
- calculating quotient digits in response to the scaled divisor and the scaled dividend, wherein each quotient digit is calculated by a pipeline mechanism, wherein the pipeline mechanism includes a two cycle adder, a latching multiplexer connected to the multiples registers and the two cycle adder, a remainder register connected to the two cycle adder, remainder selection circuitry connected to the remainder register, quotient selection circuitry connected to the multiplexer, the remainder selection circuitry and the remainder register, and a quotient accumulator connected to the two cycle adder, the calculating including:
- selecting a new quotient digit;
- and
- calculating a new remainder, wherein input to the calculating a new remainder includes data from one or more of the multiples registers.
Dependencies are inferred from the claim text.