Unsigned integer multiply/divide circuit
AssigneeZilog, Inc.
InventorBabu S. Mandava
Life of this patent
Estimating the term…
Abstract
An unsigned integer multiply/divide circuit is implemented with an unconventional non-restoring division algorithm which always subtracts the divisor from the partial dividend regardless of whether the divisor is greater than the partial dividend or not, a hybrid carry lookahead and carry select adder construction where both portions run in parallel, and control lookahead features which avoid interim calculation wait delays. The division algorithm is further modified in order that the same hardware configuration primarily consisting of storage registers, an adder, a multiplexer, and a shifter can be used for both multiplication and division operations.
Claims3
A circuit for conducting integer division, comprising:
- a first register having a plurality of bit locations including a first and second portion;
- a second register having a plurality of bit locations equal in number to said first portion of said first register;
- means for subtracting the contents of said second register from the contents of said first portion of said first register to generate a difference and a carry-out bit;
- a flip-flop;
- logical OR means connected to said subtracting means and said flip-flop, for logically ORing said carry-out bit and the contents of said flip-flop and generating a multiplexer selection signal in response thereof;
- multiplexer means for receiving as inputs, the contents of said first portion of said first register, said difference from said subtracting means, and said multiplexer selection signal, and generating as outputs in response thereof, either the contents of said first portion of said first register or said difference from said subtracting means, the selection of which being determined by the logic level of said multiplexer selection signal;
- a shifter having a first set of inputs for receiving said multiplexer outputs, a second set of inputs for receiving the contents of said second portion of said first register, and a carry-in input for receiving said multiplexer selection signal, and a set of outputs generated by shifting said first and second set of inputs each one bit location to the left with said carry-in input being shifted into a least significant bit location of said output and said most significant bit of said first set of inputs being a shifted out bit;
- means for storing said outputs of said shifter into the contents of said first register and said shifted out bit into said flip-flop.
A method of calculating a quotient and a remainder from a divisor and a dividend, comprising the steps of:
- (a) initializing a counter to a number equal to the number of bits in said divisor, and storing said dividend in a first register having a plurality of bit locations, said plurality of bit locations having a first and second portion of bit locations, said first portion having a most significant bit location for initially storing a most significant bit of said dividend, said second portion having a least significant bit location for initially storing a least significant bit of said dividend, said most significant bit location being positioned to the left of said least significant bit location;
- (b) shifting each of the contents of said first register one bit location to the left with a "0" being shifted into said least significant bit location and the contents of said most significant bit location being shifted into a flip-flop;
- (c) storing said divisor in a second register having a plurality of bit locations equal in number to said first portion of said first register;
- (d) subtracting the contents of said second register from the contents of said first portion of said first register to generate a difference and a carry-out bit;
- (e) logically ORing said carry-out bit with the contents of said flip-flop to generate a multiplexer select signal;
- (f) if said multiplexer select signal is a logical "1", then providing said difference to a first set of inputs to a shifter and the contents of said second portion of said first register to a second set of inputs to said shifter, but if said multiplexer select signal is a logical "0", then providing the contents of said first portion of said first register to said first set of inputs to said shifter and the contents of said second portion of said first register to said second set of inputs to said shifter, said first set of inputs being positioned to the left of said second set of inputs;
- (g) generating a shifted out bit and a first and second set of shifter outputs by shifting each of the inputs of said shifter one bit location to the left with said multiplexer select signal being shifted into a least significant bit of said second set of outputs, a most significant bit of said second set of inputs being shifted into a least significant bit of said first set of outputs, and a most significant bit of said first set of inputs being said shifted out bit;
- (h) storing said shifted out bit of said shifter into said flip flop, storing said first set of outputs of said shifter into said first portion of said first register, storing said second set of outputs of said shifter into said second portion of said first register, and decrementing said counter;
- (i) repeating steps (d) through (h) until said counter has been decremented down to zero;
- and
- (j) after said counter has been decremented down to zero, shifting each of the contents of said first register one bit location to the right with the contents of said flip flop being shifted into the most significant bit location of said first register.
Dependencies are inferred from the claim text.