4:2 adder and multiplier circuit employing the same

Abstract: An adder (150) of four inputs and two outputs is a circuit for deriving CARRY and SUM satisfying in0 + in1 + in2 + in3 + cin = 2cout + 2CARRY + SUM, where in0, in1, in2, in3 are the first to fourth inputs, cin is the intermediate carry from the preceding digit and cout is the intermediaty carry to the next digit. Cout is calculated only from (in0,in1,in2,in3) and will not be influenced by cin. The adder (150) is to be employed in an intermediate sum generating circuit (310,320,...,400) of a multiplier.

Description: BACKGROUND OF THE INVENTION Field of the Invention The present invention relates generally to an adder and a multiplier circuit employing the same. More specifically, the invention relates to an adder which generates an intermediate sum of the multiplier circuit. Description of the Related Art Conventionally, a binary multiplier circuit multiplying n-bit binary values, formed with an integrated circuit, calculates logical multiplies (AND's) of respective bits of a multiplied value and multiplying value to generate n in number of n-bit partial AND's (intermediate sums) and then calculates a ground sum of the partial AND's to derive a product. As a process for deriving the ground sum, a series of full adders, in which adders of three inputs and two outputs are connected in parallel, are employed to reduce number of the partial AND's into 2/3 at respective stages. Therefore, number of the partial AND's is reduced in order of n → 2/3 n → 4/9 n ... through a plurality of stages. When the number of the partial AND's is reduced up to two, the ground sum is calculated by means of a normal adder having two inputs and one output. The multiplier circuit employing the process set forth above has been referred to as Wallace type multiplier circuit. Here, the adder with three inputs and two outputs is a circuit to perform operation to output two outputs C, S satisfying 2C + S = X + Y + Z with respect to given three inputs X, Y and Z. The conventional Wallace type multiplier circuit for multiplying two n-bit values comprises a partial AND's generating portion, an intermediate sum generating portion, in which a plurality stages of full adder series formed by connecting full adders in parallel are provided in tree-like configuration, and the adder of two inputs and one output. At first, by the partial AND's generating portion n in number of n-bit partial AND's, X x Y1, X x Y2, X x Y3, ..... X x Yn are calculated from a multiplied value X and multiplying value Y (Y1, Y2, Y3, ... Yn). Then, at the first stage of the full adder series, respective three partial AND's are input to respectively corresponding full adders. Each individual full adder receiving three input of the partial AND's outputs two intermediate sum. Therefore, through the first stage of the full adder series, the intermediate sums of two-third in number of the initial number of the partial AND's are output. In the similar manner, number of the intermediate sums output from the first stage full adder series is reduced into two-third through the second stage full adder series. Number of stages of the intermediate sum calculating circuits can be expressed by x satisfying (½) x · n -2 , and, in turn, expressed by (log n - log 2)/(log 1.5) . Therefore, by (log n - log 2)/(log 1.5) in number of stages of full adder series, the number of the intermediate sums is reduced up to two. Finally, remained two intermediate sums are input to the adder of two inputs and one output to derive the product. The Wallace type multiplier circuit set forth above is also referred to as carry-save adder tree. In the intermediate sum generating process in the above-mentioned conventional multiplier circuit, the full adders of three inputs and two outputs are employed. It requires a large number of stages of the full adder series to reduce the number of the intermediate sums into two to take a long period in operation. The period required for reducing the number of the intermediate sums into two is the significant part of the overall period required for arithmetic operation including generation of the partial AND's, reduction of number of the partial AND's into two intermediate sums and adding the finally obtained two intermediate sums. Therefore, the process to reduce the number of the intermediate sums into two is a substantial border in speeding up of the multiplier circuit. IEEE Journal of Solid-State Circuits, Vol. 27 (1992) September, No. 9, p. 1229-1235 discloses a 54 x 54-b parallel multiplier which is implemented in 0.8-µm CMOS using a regularly structured tree (RST) design approach. The circuit is basically a Wallace tree. The tree and the set of partial-product-bit generators are combined into a recurring block which generates seven partial-product bits and compresses them to a pair of bits for the sum and carry signals. This block is used repeatedly to construct an RST block in which even wiring among blocks included in wire shifters is designed as recurring units. SUMMARY OF THE INVENTION It is an object of the present invention to provide a multiplier circuit which can shorten a period required for reducing intermediate sums into two and thus permits realization of speeding up of multiplying operation with resolving the constraint in shortening of the arithmetic operation period. Another object of the present invention is to provide an adder to be employed in the above-mentioned multiplier circuit, which adder can perform multiplying operation in four inputs and two outputs and thus can contribute shortening of the arithmetic operation period. These objects are achieved by the subject matter of the independent claim. Another aspect of the invention is a multiplier circuit comprises: partial AND generating means for generating n in number of partial AND's as products of a multiplied value and respective bits of n-bit multiplying value; intermediate sum generating means for inputting n in number of partial AND's, generating intermediate sums and reducing number of the intermediate sums progressively for finally outputting two intermediate sums; adder means for adding two intermediate sums output from the intermediate sum generating means for outputting a product of multiplication of the multiplied value and the multiplying value; the intermediate sum generating means comprising a plurality of intermediate sum calculating circuits, each of which comprises a plurality of adders of the type of four inputs and two outputs, connected in parallel, the intermediate sum calculating circuits are connected in a plurality of stages in a tree-like configuration; and the adder being constructed as set forth in claim 1. In the preferred construction, the intermediate sum calculating circuit is constructed by establishing parallel connection of a plurality of adders by connecting first output of the adder to the fifth input of the adder at the next digit. Also, the intermediate sum calculating circuit inputs "0" to the fifth input of an adder at the lowermost digit and takes the third output as the second output in the adder at the uppermost digit. In another preferred construction, the intermediate sum generating means includes the intermediate sum calculating circuits of (log n - log 2)/(log 2) stages. BRIEF DESCRIPTION OF THE DRAWINGS The present invention will be understood more fully from the detailed description given herebelow and from the accompanying drawings of the preferred embodiment of the invention, which, however, should not be taken to be limitative to the invention, but are for explanation and understanding only. In the drawings: Fig. 1 is a block diagram showing a construction of the preferred embodiment of an adder of four inputs and two outputs according to the present invention; Fig. 2 is a block diagram showing a construction of the preferred embodiment of a multiplier circuit according to the present invention; and Fig. 3 is a block diagram showing a construction of an intermediate sum generating circuit in the multiplier circuit of Fig. 2. DESCRIPTION OF THE PREFERRED EMBODIMENT The preferred embodiment of the present invention will be discussed hereinafter with reference to the accompanying drawings. Fig. 1 shows a construction of the preferred embodiment of an adder to be employed in an intermediate sum generating circuit of the preferred embodiment of a multiplier circuit according to the present invention. In Fig. 1, the preferred embodiment of an adder 150 of four inputs and two outputs has a NAND gate 10 receiving a first input in0 and a second input in1 and outputting an output A1, a NAND gate 20 receiving a third input in2 and a fourth input in4 and outputting an output A2, a NAND gate 30 inputting the outputs A1 and A2 and outputting an output A3 (an intermediate carry cout), an OR gate 40 receiving the first and second inputs in0 and in1 and outputting O1, an OR gate 50 receiving the third and fourth inputs in2 and in3 and outputting an output O2, a NAND gate 60 inputting the output A1 and the output O1 and outputting an output A4, a NAND gate 70 receiving the output A2 and the output O2 and outputting an output A5, a NOR gate 80 inputting the outputs A1 and A5 and outputting an output N1, a NOR gate 90 inputting the outputs A2 and A5 and outputting N2, an exclusive OR gate 100 inputting the outputs A4 and A5 and outputting an output E1, an exclusive OR gate 110 inputting a carry input cin and the output E1 and outputting a sum output SUM, an AND gate 120 inputting the input cin and the output E1 and outputting an output AA1, a NOR gate inputting the outputs N1 and N2 and the output AA1 and outputting an output N3, and an inverter 140 receiving the output N3 and outputting a carry output CARRY. In the preferred construction, the OR gate 40 and the NAND gate 60, the OR gate 50 and the NAND gate 70, and the AND gate 120 and the NOR gate 130 are respectively formed by CMOS composite gates. The adder of four inputs and two outputs is a circuit for deriving C (carry) and S (sum) satisfying X + Y + Z + W = 2C + S when first to fourth inputs X, Y, Z, W are input. It should be noted "2" of "2C" is a weighting value. Next, the preferred embodiment of a multiplier circuit constructed employing the preferred embodiment of the adder set forth above, will be discussed with reference to Fig. 2. The preferred embodiment of the multiplier circuit which is designed to perform multiplication of n-bit multiplied value and a multiplying value, has n in number of partial AND's generating portion 200, an intermediate sum generating portion 300 inputting n of partial AND's and finally generates two intermediate sums, and a carry propagation type adder 500 of two inputs for adding two intermediate sums output from the intermediate sum generating portion 300. The intermediate sum generating portion 300 is constructed by connecting a first stage intermediate sum calculating circuits 310..., second stage intermediate sum calculating circuits 320..., a final stage intermediate sum calculating circuit 400 in a multi-stage tree configuration. Each of the intermediate sum calculating circuits 310, 320, ... 400 are formed employing the adders discussed with respect to Fig. 1. Each of the first stage intermediate sum calculating circuits 310 receives four partial AND's from the partial AND generating portion 200 and derives two intermediate sums for outputting. Similarly, the second stage intermediate sum calculating circuits 320 receives respective two outputs of two first stage intermediate sum calculating circuits 310 and thus four outputs of the first stage intermediate sum calculating circuits to outputs two outputs. Number of the intermediate sum calculating circuits at respective stages is determined corresponding to number of bits of the multiplying value. Also, the number of stages of the intermediate sum calculating circuits to be employed in the intermediate sum generating portion is determined from (log n - log 2)/(log 2) . For instance, if the multiplying value is 16 bits, the number of stages of the intermediate sum calculating circuits becomes three. In this case, number of the intermediate sum calculating circuits 310 in the first stage becomes 4, number of the intermediate sum calculating circuit 320 in the second stage becomes 2, and number of the intermediate sum calculating circuit 400 at the final stage becomes 1. The construction of the intermediate sum calculating circuit 310, 320, ... 400 employing the adder 150 of four inputs and two outputs as illustrated in Fig. 1, will be discussed with reference to Fig. 3. As shown, the intermediate sum calculating circuit is constructed with n or more in number of adders 150 when the multiplied value is n bits. The intermediate carry cout of each adder 150 is connected to carry input cin of the adder 150 of the next digit for establishing parallel connection. To the carry input cin of the adder 150 at the lowermost digit, "0" is input. On the other hand, the intermediate carry of the adder 150 at the uppermost digit is used as SUM. Number of the adders 150 employed in each intermediate sum calculating circuit is n + 3 in the first stage adder series, increased toward the upper stage and finally becomes 2n at the final stage, when the multiplied value is n-bit, for example. In the intermediate sum calculating circuit shown in Fig. 3, consideration is given for the case, as an example, in which four 5-bit inputs "X 5 , X 4 , X 3 , X 2 , X 1 ", "Y 5 , Y 4 , Y 3 , Y 2 , Y 1 ", "Z 5 , Z 4 , Z 3 , Z 2 , Z 1 " and "W 5 , W 4 , W 3 , W 2 , W 1 " are input. It should be noted that all of the alphabetic characters represent "0" or "1". In this case, since the input values are 5-bit, five adders 150 are connected in parallel. Then, each adder 150 performs addition process with respect to corresponding digit. Here, for S 6 , the intermediate carry cout (D 5 ) of the adder 150 of the uppermost digit is used. In the above-mentioned arithmetic operation, C (CARRY) and S (SUM) satisfying X + Y + Z + W = 2C + S . In the foregoing arithmetic operation, when the lowermost digit is observed: Here, X 1 + Y 1 + Z 1 + W 1 = 2D 1 + 2C 1 + S 1 is satisfied. The addition is also performed in the next digit through Here, X 2 + Y 2 + Z 2 + W 2 + D 2 = 2D 2 + 2C 2 + S 2 is satisfied. In the uppermost digit, calculation is performed as: Then, S 6 becomes equal to D 6 . It should be appreciated that, in the foregoing calculation, it should appear to take a long arithmetic operation period since it implies D (cout) is calculated from (X, Y, Z, W) at the lowermost digit and D is further calculated from (X, Y, Z, W, D) in subsequent digits. However, as can be clear from the circuit of Fig. 1, D (cout) is calculated only from (X, Y, Z, W) and will not be influenced by D (cout) of the preceding digit. Therefore, even at a large number of digits, it does not take a long period. Here, example will be given for the case where four 3-bit data (111, 101, 110, 001) are processed for adding by the above-mentioned intermediate sum calculating circuit. As can be appreciated, the shown example is an addition of 7 + 5 + 6 + 11 in binary values. As a result of this, since (SUM) = 1111 = (15) and c(CARRY) = 100 = (4), the total becomes 19 (=7 + 5 + 6 + 1). In the partial AND generating portion 200, by multiplying n-bit multiplied value X with each bit (Y1, Y2, Y3, ..... Yn) of the multiplying value Y, n in number of n-bit partial AND's A(1) to A(n), i.e. X x Y1, X x Y2, X x Y3, ...... X x Yn, are derived. Accordingly, n in number of the partial AND's A(1) to A(n) are output from each of the partial AND generating portions 200. Number of the partial AND's to be generated by the partial AND generating portion 200 depends on number of bits of the multiplying value Y. Also, number of bits of the partial AND's depends on number of bits of the multiplied value X. Accordingly, assuming the multiplied value X is 8-bit and multiplying value Y is 16-bit, 16x8-bits partial AND's are output from the partial AND generating portion 200. For each of a plurality of first stage intermediate sum calculating circuits 310 ...., four in number of partial AND's are input. Each first stage intermediate sum calculating circuit 310.... then performs addition for the four partial AND's input thereto and outputs two intermediate sums. By this, the number of the intermediate sums output from the first stage intermediate sum calculating circuits 310... becomes half (1/2 n) of the number of the partial AND's from the partial AND generating portion 200. Respective four intermediate sums output from the first stage intermediate sum calculating circuits 310.... are input to corresponding second stage intermediate sum calculating circuits 320.... In each of the second stage intermediate sum calculating circuits 320 ..., four intermediate sums from the first stage intermediate sum calculating circuits 310... are added to be output as two second stage intermediate sums. Therefore, through the second stage intermediate sum calculating portions 320...., number of the intermediate sums output therefrom becomes quarter (1/4 n) of the number of the partial AND's input from the partial AND generating portion 200. At a final stage of the intermediate sum calculating circuit 400, which is (log n - log 2)/(log 2) th stage of the intermediate sum calculating circuit, two intermediate sums are output. Two intermediate sums output from the final stage intermediate sum calculating circuit 400 are added by the carry propagation type adder 500 and output as a product B of the multiplied value X and the multiplying value Y. As set forth above, since the preferred embodiment of the multiplying circuit according to the present invention employs adders of four input and two outputs, the number of stages of the intermediate sum calculating circuits becomes (log n - log 2)/(log 2) which is much smaller than (log n - log 2)/(log 1.5) which is required when the conventional intermediate sum calculating circuits employing full adders of three input and two output. A necessary period to reduce the number of the intermediate sums into two employing the adders of four inputs and two outputs, is expressed as follow with assuming that the delay period of the adder is τ4. τ4 x (log n - log 2)/(log 2) On the other hand, the necessary period to reduce the number of the intermediate sums into two in the conventional Wallace type multiplier circuit is expressed as follows with assuming that the delay period of the full adder is τ3. τ3 x (log n - log 2)/(log 1.5) Here, when the delay period τ4 of the adder employed in the preferred embodiment satisfies the equation τ4 < τ3 x log 2 ÷ log 1.5 ≒ τ3 x 1.7 the multiplier circuit can be speeded up. The adder employed in the preferred embodiment satisfies the foregoing condition. Therefore, the preferred embodiment of the multiplier circuit according to the present invention can provide higher speed than the conventional Wallace type multiplier circuit employing the full adders of three inputs and two outputs. As set forth above, since the present invention can speed up the period required for reducing the number of intermediate sums, which is the substantial part of operation period of the multiplier circuit, it becomes possible to significantly speed up the operation speed of the multiplier circuit.

Claims: An adder (150) comprising: a first logic circuit receiving first to fourth inputs (in0, in1, in2, in3); and wherein said first logic circuit comprises a first NAND gate (10) inputting said first and second inputs (in0, in1) and outputting a first NAND output (A1); a second NAND gate (20) inputting said third and fourth inputs (in2, in3) and outputting a second NAND output (A2); and a third NAND gate (30) inputting said first and second NAND outputs (A1, A2) and outputting an intermediate carry (COUT) as a first output; a second logic circuit which comprises a first OR gate (40) inputting said first and second inputs (in0, in1) and outputting a first OR output (O1); and a fourth NAND gate (60) inputting said first NAND output (A1) and said first OR output (O1) and outputting a fourth NAND output (A4); a third logic circuit which comprises: a second OR gate (50) inputting said third and fourth inputs (in2, in3) and outputting a second OR output (O2); and a fifth NAND gate (70) inputting said second NAND output (A2) and said second OR output (O2) and outputting a fifth NAND output (A5); a fourth logic circuit which comprises: a first exclusive OR gate (100) inputting said fourth and fifth NAND outputs (A4, A5) and outputting a first exclusive OR output (E1); a fifth logic circuit which comprises: a second exclusive OR gate (110) inputting a fifth input (CIN) and said first exclusive OR output (E1) and outputting a second output (SUM) as a sum of said first to fourth inputs (in0, in1, in2, in3); a sixth logic circuit which comprises: an AND gate (120) inputting said fifth input (CIN) and said first exclusive OR output (E1) and outputting an AND output (AA1); characterised in that said sixth logic circuit further comprises: first NOR gate (80) inputting said first and second NAND outputs (A1, A2) and outputting a first NOR output (N1); a second NOR gate (90) inputting said fourth and fifth NAND outputs (A4, A5) and outputting a second NOR output (N2); a third NOR gate (130) inputting said first and second NOR outputs (N1, N2) and said AND output (AA1) and outputting a third NOR output (N3); and an inverter (140) outputting a carry (CARRY) as a third output by inverting said third NOR output (N3). A multiplier circuit comprising: partial AND generating means (200) for generating n in number of partial AND's as products of a multiplied value and respective bits of n-bit multiplying value; intermediate sum generating means (300) for inputting n in number of partial AND's, generating intermediate sums and reducing number of said intermediate sums progressively for finally outputting two intermediate sums; adder means (500) for adding two intermediate sums output from said intermediate sum generating means for outputting a product of multiplication of said multiplied value and said multiplying value; said intermediate sum generating means (300) comprising a plurality of intermediate sum calculating circuits (310, 320, ..., 400), each of which comprises a plurality of adders (150) of the type of four inputs and two outputs, connected in parallel, said intermediate sum calculating circuits are connected in a plurality of stages in a tree-like configuration; and said adder (150) being constructed as set forth in claim 1. A multiplier circuit as set forth in claim 2, wherein said intermediate sum calculating circuit (310, 320, ..., 400) is constructed by establishing parallel connection of a plurality of adders (150) by connecting first output of said adder to said fifth input of the adder at the next digit. A multiplier circuit as set forth in claim 3, wherein said intermediate sum calculating circuit (310, 320, ..., 400) inputs "0" to said fifth input of an adder (150) at the lowermost digit and takes the first output as said second output in the adder (150) at the uppermost digit. A multiplier circuit as set forth in claim 2, wherein said intermediate sum generating means (300) includes said intermediate sum calculating circuits (310, 320, ..., 400) of (log n - log 2)/(log 2) stages.

Inventors: HAGIHARA YASUHIKO, HAGIHARA, YASUHIKO, HAGIHARA, YASUHIKO, C/O NEC CORPORATION
Applicants: NIPPON ELECTRIC CO, NEC CORPORATION
Application year: 1994
Main classification: G06F7
IPC codes: G06F7