JPH07168699A - Squaring circuit - Google Patents

Squaring circuit

Info

Publication number
JPH07168699A
JPH07168699A JP5316291A JP31629193A JPH07168699A JP H07168699 A JPH07168699 A JP H07168699A JP 5316291 A JP5316291 A JP 5316291A JP 31629193 A JP31629193 A JP 31629193A JP H07168699 A JPH07168699 A JP H07168699A
Authority
JP
Japan
Prior art keywords
partial
product
bit
square
circuit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP5316291A
Other languages
Japanese (ja)
Inventor
Takayuki Minemaru
貴行 峯丸
Maki Toyokura
真木 豊蔵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP5316291A priority Critical patent/JPH07168699A/en
Publication of JPH07168699A publication Critical patent/JPH07168699A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To constitution the squaring circuit which performs squaring arithmetic without being made large in circuit scale so much. CONSTITUTION:A number 1 to be squared is divided into four codes X33, X24, X15, and X06 by a Booth encoding means 2 and outputted. One code consists of three bits, the 3rd bit shows the absolute value of the code, and when the value is 1, the code is minus. Further, the remaining two bits show the absolute value of the code and are assigned to a 2<1> bit and a 2<0> bit respectively. Those codes are inputted to a partial square product generating means 7 and a partial product generating means 8 respectively. The outputs of the partial square product generating means 7 and partial product generating means 8 are inputted to a partial square product and partial product adding means 19 and added until the addition results 2 and 21 of the two output signal addition results 1 and 20 are obtained. The addition results 2 and 21 of the addition results 1 and 20 are inputted to a two-input adding means 22, whose output is outputted as a square product 23.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、例えばディジタル信号
処理等で誤差の検出等に用いられる2乗回路に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a squaring circuit used for error detection in digital signal processing, for example.

【0002】[0002]

【従来の技術】従来、2入力乗算回路で乗数と被乗数に
同じ数を与え、2乗演算を行なう方法があった。
2. Description of the Related Art Conventionally, there has been a method of performing a square operation by giving the same number to a multiplier and a multiplicand in a 2-input multiplication circuit.

【0003】[0003]

【発明が解決しようとする課題】しかしながら、2乗演
算のみを目的とする場合には、入力信号数は1つでよい
のであるが、乗数と被乗数の配線を必要とするので、配
線が2倍必要でかつ同一信号を入力するので回路が冗長
となり、回路規模が大きくなると言う問題点があった。
However, when only the square operation is intended, the number of input signals may be one, but since the wiring of the multiplier and the multiplicand is required, the wiring is doubled. There is a problem that the circuit becomes redundant and the circuit scale becomes large because the same signal is input as necessary.

【0004】本発明は上記問題点を除去し、被2乗数を
ブースアルゴリズムを利用してコード化し、被2乗数を
複数の部分に分割し、部分2乗積と部分積を生成し、加
算手段で加算することで、より小規模の回路で2乗演算
を行う2乗回路を提供することを目的とする。
The present invention eliminates the above-mentioned problems, codes the multiplicand using the Booth algorithm, divides the multiplicand into a plurality of parts, generates partial square products and partial products, and adds the means. It is an object of the present invention to provide a squaring circuit that performs squaring operation in a smaller circuit by adding in.

【0005】[0005]

【課題を解決するための手段】本発明の請求項1記載の
2乗回路は、ブース符号化手段において、被2乗数を2
次のブースアルゴリズムに従ってコード信号化し、被2
乗数をM個の部分に分割し、部分2乗積生成手段と部分
積生成手段に入力し、分割したそれぞれの部分から得ら
れるM個の部分2乗積と、異なる組み合せの部分同士を
乗算して得られるM2個の部分積とを部分2乗積・部分
積加算手段において、2つの信号になるまで加算し、そ
の出力を2入力加算手段で加算して2乗積を得るという
ものである。
In the squaring circuit according to the first aspect of the present invention, in the Booth coding means, the multiplicand is 2
The code signal is converted according to the following Booth algorithm and
The multiplier is divided into M parts, which are input to the partial square product generating means and the partial product generating means, and the M partial square products obtained from the respective divided parts are multiplied by parts of different combinations. The partial square product / partial product adding means adds the obtained M C 2 partial products until two signals are obtained, and the outputs are added by the two-input adding means to obtain a square product. Is.

【0006】また、本発明の請求項2記載の2乗回路
は、前記ブース符号化手段の出力を部分2乗積生成・加
算手段において桁の低い方から2乗して、シフト累積加
算すると同時に、前記ブース符号化手段の出力を部分積
生成・加算手段において、異なる組み合せの部分同士を
桁の低い方から乗算し、得られる部分積をシフト累積加
算することで、部分2乗積の総和と部分積の総和を独立
に求め、それぞれの手段の出力を2入力加算手段におい
て加算して2乗積を得るというものである。
Further, in the squaring circuit according to a second aspect of the present invention, the output of the Booth encoding means is squared in the partial square product generating / adding means from the one with a lower digit and at the same time the shift cumulative addition is performed. In the partial product generating / adding means, the output of the Booth encoding means is used to multiply parts having different combinations from the one having a lower digit, and the partial products obtained are subjected to shift cumulative addition to obtain a sum of partial square products. The total sum of partial products is independently obtained, and the outputs of the respective means are added by the 2-input addition means to obtain a squared product.

【0007】[0007]

【作用】本発明の請求項1記載の2乗回路によれば、ブ
ース符号化を利用して被2乗数をコード化して被乗数を
M個の部分に分割し、M個の部分2乗積とM2個の部分
積を生成して加算することで、加算に必要なビット数を
押え、全加算器・半加算器の数を2入力乗算器の場合よ
りも減少させることができる。このことにより、回路規
模をそれほど大きくせずに2乗算をおこなう2乗回路を
構成することが可能となる。
According to the squaring circuit according to the first aspect of the present invention, the multiplicand is coded by utilizing Booth coding, the multiplicand is divided into M parts, and M partial square products are obtained. By generating and adding M C 2 partial products, the number of bits required for addition can be suppressed, and the number of full adders / half adders can be reduced as compared with the case of a 2-input multiplier. As a result, it is possible to construct a squaring circuit that performs squaring without increasing the circuit scale so much.

【0008】また、請求項2記載の2乗回路によれば、
部分2乗積と、部分積を桁の低い方からシフト累積加算
することで、加算回路をさらに削減することができる。
According to the squaring circuit of the second aspect,
It is possible to further reduce the number of addition circuits by performing the partial square product and the shift cumulative addition of the partial products from the lower digit.

【0009】[0009]

【実施例】次に、本発明の2乗回路を8ビットの場合を
例として説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Next, the squaring circuit of the present invention will be described by taking the case of 8 bits as an example.

【0010】8ビットの2の補数表現された被2乗数P
を2のべき表示で表すと(数1)となる。
8-bit two's complement representation of multiplicand P
Is expressed by a power of 2, it becomes (Equation 1).

【0011】[0011]

【数1】 [Equation 1]

【0012】但し、piは1か0の値をとる。このPを
2次のブース符号を利用して表現すると、(数2)とな
る。
However, p i takes a value of 1 or 0. When this P is expressed using the secondary Booth code, it becomes (Equation 2).

【0013】[0013]

【数2】 [Equation 2]

【0014】但し、Xi=−2P2i+1+P2i+P2i-1
−2≦Xi≦2(0≦i≦3) このXiを用いると、P2は(数3)と表すことができ
る。
However, X i = -2P 2i + 1 + P 2i + P 2i-1
−2 ≦ X i ≦ 2 (0 ≦ i ≦ 3) When this X i is used, P 2 can be expressed by (Equation 3).

【0015】また、このXiは符号を表わす1ビットと
絶対値を表わす2ビットの計3ビットで表現される。
Further, this X i is represented by a total of 3 bits, 1 bit representing a sign and 2 bits representing an absolute value.

【0016】[0016]

【数3】 [Equation 3]

【0017】(数3)から、Xiの2乗(部分2乗積)
と異なるXi同士の積(部分積)を求め、2のべきに合
わせてシフトさせて加算すればよいことがわかる。
From (Equation 3), the square of X i (partial square product)
It will be understood that the product (partial product) of X i different from is obtained, and the product is shifted according to the power of 2 and added.

【0018】部分2乗積Xi 2は2乗なので、符号ビット
を無視して、絶対値を表わす2ビットで生成する事がで
きる。Xi 2は0、1、4の3つの値のうちの1つをと
る。
Since the partial square product X i 2 is a square, it can be generated with 2 bits representing the absolute value, ignoring the sign bit. X i 2 takes one of three values 0, 1, 4.

【0019】部分積Xij(0≦i,j≦3,i≠j)
は、2つの符号ビットが同一値であれば正、異なれば負
を表わす符号をとる。ただし、どちらかの絶対値を表わ
す部分が0ならば正を表わす符号をとるものとする。ま
た、絶対値を表わす部分は、0、1、2、4の値のうち
の1をとる。
Partial product X i X j (0 ≦ i, j ≦ 3, i ≠ j)
Takes a sign that represents positive if the two sign bits have the same value, and represents negative if they differ. However, if either of the absolute value portions is 0, a positive sign is used. Further, the part representing the absolute value takes 1 out of the values of 0, 1, 2, 4.

【0020】(数3)の2のべきに関する処理は左シフ
トで行う。つまり、X1 2は12ビット、X10は3ビッ
トというように2のべきの数の分だけ左シフトして加減
算する。
The processing for the power of 2 in (Equation 3) is performed by left shift. That is, X 1 2 is 12 bits and X 1 X 0 is 3 bits.

【0021】以上の部分2乗積・部分積の加減算の結
果、Pの2乗積を得ることができる。次に本発明の請求
項1記載の2乗回路について、8ビットの場合を第1の
実施例として、図面を用いて詳細に説明する。
As a result of addition and subtraction of the partial square product and partial product described above, the square product of P can be obtained. Next, the square circuit according to the first aspect of the present invention will be described in detail with reference to the drawings with the case of 8 bits as the first embodiment.

【0022】図1に実施例1の2乗回路の構成図を示
す。被2乗数1はブース符号化手段2において4つの符
号X3 3、X2 4、X1 5、X0 6に分割して出力され
る。1つの符号は3ビットで構成され、3ビット目が符
号を表わし、その値が1であるときに負を表わす。ま
た、残り2ビットは符号の絶対値を表わし、それぞれ2
1ビット、20ビットに割り振られる。
FIG. 1 shows a block diagram of the squaring circuit of the first embodiment. The multiplicand 1 is divided by the Booth coding means 2 into four codes X 3 3, X 2 4, X 1 5, and X 0 6 and output. One code is composed of 3 bits, and the third bit represents the code, and when the value is 1, it represents a negative sign. In addition, the remaining 2 bits represent the absolute value of the code, each of which is 2
1 bit is allocated to the 2 0 bit.

【0023】つまり2ビットの組み合せが(1,0)な
ら2、(0,1)なら1、(0,0)なら0を表わす。
また、(1,1)は用いない。
That is, if the combination of 2 bits is (1,0), it is 2, if it is (0,1), it is 1, and if it is (0,0), it is 0.
Also, (1,1) is not used.

【0024】前記4つの符号名は、(数3)の記号と同
一である。これらの符号は部分2乗積生成手段7と部分
積生成手段8にそれぞれ入力される。
The four code names are the same as the symbols of (Equation 3). These codes are input to the partial square product generating means 7 and the partial product generating means 8, respectively.

【0025】部分2乗積生成手段7は、図2に示す構成
であり、4つの符号3から6に対応して1つずつ部分2
乗積回路101−104をもち、それぞれの部分2乗積
回路において部分2乗積X3 2 9、X2 2 10、X1 2
11、X0 2 12が生成される。
The partial square product generating means 7 has the configuration shown in FIG. 2, and the partial square product generating means 7 corresponds to the four symbols 3 to 6 one by one.
Each of the partial square product circuits has a cross product circuit 101-104, and the partial square products X 3 2 9, X 2 2 10, X 1 2
11, X 0 2 12 is generated.

【0026】部分2乗積回路は図3に示す構成であり、
入力されるブース符号110のうち、3ビット目の符号
ビット111は用いずに、2ビット目の21ビット11
2と1ビット目の20ビット113を用いる。
The partial square product circuit has the configuration shown in FIG.
Of the input Booth code 110, the second code 2 1 bit 11 is used without using the third code bit 111.
2 and 1 bit of the 2 0 bit 113 is used.

【0027】21ビット112はバッファ114、20
ット113はバッファ116に入力される。21ビット
112が1の場合には2乗すれば22となり、バッファ
114から出力される信号は22 ビット115として
部分2乗積118の2ビット目を構成する。また20
ット113が1の場合には2乗すれば20となり、バッ
ファ116から出力される信号は20ビット117とし
て部分2乗積118の1ビット目を構成する。
[0027] 2 1 bit 112 buffer 114,2 0 bit 113 is input to the buffer 116. 2 1 bit 112 2 2 next be square in the case of 1, the signal output from the buffer 114 constitutes the second bit part 2 product 118 as 2 2 bits 115. The 2 0 bit 113 becomes 2 0 if the square in the case of 1, the signal output from the buffer 116 constitutes the first bit portion 2 product 118 as 2 0 bit 117.

【0028】また、図4に部分積生成手段8の構成を示
す。部分積生成手段8は6つの部分積回路201−20
6で構成され、それぞれX3213、X3114、X3
015、X2116、X2017、X1018の部分
積を生成する。
FIG. 4 shows the structure of the partial product generating means 8. The partial product generating means 8 includes six partial product circuits 201-20.
Consists of six, each X 3 X 2 13, X 3 X 1 14, X 3
A partial product of X 0 15, X 2 X 1 16, X 2 X 0 17, and X 1 X 0 18 is generated.

【0029】図5に部分積回路の構成を示す。ブース符
号1 210は符号ビット1 211、21ビット12
12、20ビット1 213で構成される。ブース符号
2 214は符号ビット2 215、21ビット2 2
16、20ビット2 217で構成される。
FIG. 5 shows the configuration of the partial product circuit. Booth code 1 210 is code bit 1 211, 2 1 bit 12
12,2 composed of a 0 bit 1 213. Booth code 2 214 is code bit 2 215, 2 1 bit 2 2
16,2 composed of a 0 bit 2 217.

【0030】2つの符号ビットが一致すると積は正とな
るので、結果の符号ビットは正である0となり、不一致
ならば負である1となる。そこで、排他的論理和回路2
18に2つの符号ビット211、215を入力すればよ
い。また、2つのブース符号の絶対値が0ならば、符号
を正を表わすものとするので、それぞれの絶対値を表わ
す2ビットの論理和をとり、どちらかの論理和の結果が
0の場合に正を表わす0にすればよい。
The product is positive if the two sign bits match, so the resulting sign bit is positive 0, and negative if negative. Therefore, the exclusive OR circuit 2
It is sufficient to input two code bits 211 and 215 to 18. Also, if the absolute value of two Booth codes is 0, the sign is assumed to be positive, so the logical sum of 2 bits representing the respective absolute values is taken, and if the result of either logical sum is 0, It can be set to 0 for positive.

【0031】そこで、21ビット1 212、20ビット
1 213を論理和回路220に、21ビット2 21
6、20ビット2 217を論理和回路219に入力す
る。それらの出力と前記排他的論理和回路218の出力
を論理積回路221に入力し、符号ビット222を得
る。前記符号ビット222は部分積229の4ビット目
を構成する。
Therefore, 2 1 bit 1 212, 2 0 bit 1 213 are input to the OR circuit 220 and 2 1 bit 2 21
6,2 0 inputs the bit 2 217 to the OR circuit 219. These outputs and the output of the exclusive OR circuit 218 are input to the logical product circuit 221 to obtain the sign bit 222. The sign bit 222 constitutes the fourth bit of the partial product 229.

【0032】2つの21ビットの両方が1の場合、積の
2ビットが1となるので、論理積回路223に21ビッ
ト1 212、21ビット2 216を入力し、その出
力が2 2 ビット224となり、部分積229の3ビット
目を構成する。
Two two1If both bits are 1, the product
Two2Since the bit becomes 1, the logical product circuit 223 outputs 21Bit
To 12 12 and 21Enter bit 2 216 and exit
Power is 2 2 Bit 224, 3 bits of partial product 229
Make up the eyes.

【0033】積の21ビットが1になるのは、ブース符
号のどちらか1つの21ビットが1で、もう一方の20
ットが1の場合であるので、21ビット1 212と20
ビット 2 217、21ビット2 216と20ビット
1 213、という組み合せで論理積−論理和回路22
5に入力する。その出力は21ビット226として部分
積229の2ビット目を構成する。
The 2 1 bit of the product becomes 1 when one of the 2 1 bits of the Booth code is 1 and the other 2 0 bit is 1, so 2 1 bits 1 212 and 2 0
Bit 2 217,2 1 bit 2 216 2 0 bit 1 213, logical product in combination of - OR circuit 22
Enter in 5. The output constitutes the second bit of the partial product 229 as 2 1 bits 226.

【0034】2つの20ビットの両方が1の場合、積の
0ビットが1となるので、論理和回路227に20ビッ
ト1 213、20ビット2 217を入力し、その出
力が2 0 ビット228となり、部分積229の1ビット
目を構成する。部分2乗積生成手段7と部分積生成手段
8の出力は部分2乗積・部分積加算手段19に入力さ
れ、2つの出力信号加算結果1 20加算結果2 21
になるまで加算される。
Two two0If both bits are 1, the product
Two0Since the bit becomes 1, the logical sum circuit 227 outputs 20Bit
To 1 213, 20Enter bit 2 217 and exit
Power is 2 0 Bit 228, 1 bit of partial product 229
Make up the eyes. Partial square product generating means 7 and partial product generating means
The output of 8 is input to the partial square product / partial product adding means 19.
2 output signals addition result 1 20 addition result 2 21
Will be added until.

【0035】図6に部分2乗積・部分積加算手段19の
構成を示す。部分2乗積生成手段7からの出力X3 29、
2 210、X1 211、X0 212は多入力加算回路401
に入力される。
FIG. 6 shows the structure of the partial square product / partial product adding means 19. The output X 3 2 9 from the partial square product generation means 7,
X 2 2 10, X 1 2 11 and X 0 2 12 are multi-input adder circuits 401.
Entered in.

【0036】一方、部分積生成手段8からの出力X32
13、X3114、X3015、X 2116、X20
7、X1018はそれぞれ補数回路402から407に
入力される。
On the other hand, the output X from the partial product generating means 83X2
13, X3X114, X3X015, X 2X116, X2X01
7, X1X018 from the complement circuits 402 to 407 respectively
Is entered.

【0037】補数回路402−407では、入力される
符号ビットの値が1の場合には、残りの3ビットをビッ
ト反転し、補数補償ビットを1とする。符号ビットが0
の場合には残りの3ビットをスルー出力し、補数補償ビ
ットを0とする。
In the complement circuits 402-407, when the value of the input sign bit is 1, the remaining 3 bits are bit-inverted and the complement compensation bit is set to 1. Sign bit is 0
In the case of, the remaining 3 bits are output through and the complement compensation bit is set to 0.

【0038】このようにして得られた補数化X3240
8、補数化X31410、補数化X30412、補数化
21414、補数化X20416、補数化X1041
8と補数補償ビット409、411、413、415、
417、419は多入力加算回路401に入力される。
多入力加算回路401では、入力信号を(数3)の2の
べきに合わせて左シフトして2つの出力信号加算結果1
20と加算結果221になるまで加算する。
The complemented X 3 X 2 40 thus obtained
8, complemented X 3 X 1 410, complemented X 3 X 0 412, complemented X 2 X 1 414, complemented X 2 X 0 416, complemented X 1 X 0 41
8 and complement compensation bits 409, 411, 413, 415,
417 and 419 are input to the multi-input adder circuit 401.
In the multi-input adder circuit 401, the input signal is left-shifted according to the power of 2 in (Equation 3), and the two output signal addition results 1
20 and the addition result 221 are added.

【0039】加算結果1 20と加算結果2 21は2
入力加算手段22に入力され、その出力が2乗積23と
して出力される。
The addition result 1 20 and the addition result 2 21 are 2
It is input to the input addition means 22, and the output thereof is output as a squared product 23.

【0040】次に本発明の請求項2記載の2乗回路につ
いて、8ビットの場合を第2の実施例として説明する。
Next, the square circuit according to the second aspect of the present invention will be described in the case of 8 bits as a second embodiment.

【0041】図7にその構成を示す。被2乗数1はブー
ス符号化手段2において4つの符号X33、X24、X1
5、X06に分割され、部分2乗積生成・加算手段50
1と部分積生成・加算手段502に入力される。それぞ
れの加算結果、加算結果1 503と加算結果2 50
4は2入力加算手段505で加算され、2乗積506と
して出力される。
FIG. 7 shows the configuration. The multiplicand 1 has four codes X 3 3, X 2 4, and X 1 in the Booth coding means 2.
5, X 0 6, and a partial square product generation / addition means 50
1 and the partial product generation / addition means 502. Each addition result, addition result 1 503 and addition result 2 50
4 is added by the 2-input addition means 505 and output as a squared product 506.

【0042】図8に部分2乗積生成・加算手段501の
構成を示す。4つの符号X33、X24、X15、X06は
それぞれレジスタ601−604に保持される。保持さ
れた符号はセレクタ605に入力され、X06からX3
まで順番に部分2乗積回路606に送られる。
FIG. 8 shows the configuration of the partial square product generation / addition means 501. The four codes X 3 3, X 2 4, X 1 5, and X 0 6 are held in registers 601-604, respectively. The stored code is input to the selector 605, and X 0 6 to X 3 3 are input.
Are sequentially sent to the partial square product circuit 606.

【0043】部分2乗積回路606は請求項1の実施例
と全く同じものであるので説明を省略する。部分2乗積
回路606の出力は加算回路607に入力され、シフタ
ー608の出力と加算される。加算結果はレジスタ60
9に保持される。
Since the partial square product circuit 606 is exactly the same as that of the embodiment of claim 1, its explanation is omitted. The output of the partial square product circuit 606 is input to the adder circuit 607 and added to the output of the shifter 608. Addition result is register 60
Held at 9.

【0044】レジスタ609の出力はシフター608に
入力され、4ビット左シフトして出力される。これによ
り桁の低い方からの加算が実現され、最終加算結果が加
算結果1 503として出力される。
The output of the register 609 is input to the shifter 608, left-shifted by 4 bits and output. As a result, the addition from the lower digit is realized, and the final addition result is output as the addition result 1 503.

【0045】図9に部分積生成・加算手段502の構成
を示す。4つの符号X33、X24、X15、X06はそれ
ぞれレジスタ701−704に保持される。保持された
符号はセレクタ705と706に入力される。
FIG. 9 shows the configuration of the partial product generating / adding means 502. The four codes X 3 3, X 2 4, X 1 5, and X 0 6 are held in registers 701 to 704, respectively. The stored code is input to the selectors 705 and 706.

【0046】2つのセレクタからの出力は、(X1
0)、(X2,X0)、(X2,X1)、(X3,X0)、
(X3,X1)、(X3,X2)の組み合せになるように制
御され、部分積回路707に入力される。
The outputs from the two selectors are (X 1 ,
X 0 ), (X 2 , X 0 ), (X 2 , X 1 ), (X 3 , X 0 ),
The partial product circuit 707 is controlled so as to be a combination of (X 3 , X 1 ) and (X 3 , X 2 ).

【0047】部分積回路707の出力は補数回路708
に入力され、補数化出力709と補数補償ビット710
を生成する。部分積回路707と補数回路708は請求
項1の実施例のものと全く同一であるので説明を省略す
る。
The output of the partial product circuit 707 is the complement circuit 708.
To the complemented output 709 and the complement compensation bit 710.
To generate. Since the partial product circuit 707 and the complement circuit 708 are exactly the same as those of the embodiment of claim 1, their description will be omitted.

【0048】補数化出力709と補数補償ビット710
は加算回路711に入力され、シフター712の出力と
加算される。加算結果はレジスタ713に保持される。
レジスタ713の出力はシフター712に入力され、2
のべきに合わせて左シフトして出力される。これにより
桁の低い方からの加算が実現され、最終加算結果が加算
結果2 504として出力される。
Complemented output 709 and complement compensation bits 710
Is input to the adder circuit 711 and added to the output of the shifter 712. The addition result is held in the register 713.
The output of the register 713 is input to the shifter 712 and 2
It is output by shifting left according to the power of. As a result, the addition from the lower digit is realized, and the final addition result is output as the addition result 2 504.

【0049】本実施例の場合、部分2乗積回路606と
部分積回路707は1つずつでよく、多入力加算器を用
いないので、第1の実施例の場合よりもより回路規模を
小さくすることが可能である。
In the case of the present embodiment, the number of the partial square product circuits 606 and the partial product circuits 707 may be one each, and since a multi-input adder is not used, the circuit scale is smaller than that of the first embodiment. It is possible to

【0050】[0050]

【発明の効果】以上説明したように、本発明の請求項1
の2乗回路によれば、ブース符号化を利用して被2乗数
をコード化して被乗数をM個の部分に分割し、M個の部
分2乗積とM2個の部分積を生成して加算することで、
加算に必要なビット数を削減し、全加算器・半加算器の
数を2入力乗算器の場合よりも減少させることができ
る。このことにより、回路規模をそれほど大きくせずに
2乗算をおこなう2乗回路を構成することが可能とな
る。
As described above, according to the first aspect of the present invention.
According to the square circuit of, the Booth coding is used to code the multiplicand, divide the multiplicand into M parts, and generate M partial square products and M C 2 partial products. By adding
The number of bits required for addition can be reduced, and the number of full adders / half adders can be reduced as compared with the case of a 2-input multiplier. As a result, it is possible to construct a squaring circuit that performs squaring without increasing the circuit scale so much.

【0051】さらに、不必要な全加算器・半加算器が減
ったことで、より高速な演算が可能となる。
Further, since unnecessary full adders and half adders are reduced, it is possible to perform higher speed calculation.

【0052】また、請求項2の2乗回路によれば、部分
2乗積と、部分積を桁の低い方からシフト累積加算する
ことで、加算回路を請求項1の回路よりさらに削減する
ことができる。
Further, according to the squaring circuit of the second aspect, the partial squaring product and the partial products are subjected to shift cumulative addition from the lower digit, thereby further reducing the number of the summing circuits from the circuit of the first aspect. You can

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明の第1の実施例の2乗回路の構成図FIG. 1 is a configuration diagram of a squaring circuit according to a first embodiment of the present invention.

【図2】同実施例における部分2乗積生成手段の構成図FIG. 2 is a configuration diagram of a partial square product generating means in the embodiment.

【図3】同実施例における部分2乗回路の構成図FIG. 3 is a configuration diagram of a partial square circuit in the same embodiment.

【図4】同実施例における部分積生成手段の構成図FIG. 4 is a block diagram of a partial product generating means in the same embodiment.

【図5】同実施例における部分積回路の構成図FIG. 5 is a configuration diagram of a partial product circuit in the same embodiment.

【図6】同実施例における部分2乗積・部分積加算手段
の構成図
FIG. 6 is a configuration diagram of a partial square product / partial product adding means in the embodiment.

【図7】本発明の第2の実施例の2乗回路の構成図FIG. 7 is a configuration diagram of a squaring circuit according to a second embodiment of the present invention.

【図8】同実施例における部分2乗積生成・加算手段の
構成図
FIG. 8 is a configuration diagram of a partial square product generation / addition unit in the embodiment.

【図9】同実施例における部分積生成・加算手段の構成
FIG. 9 is a block diagram of a partial product generating / adding means in the embodiment.

【符号の説明】[Explanation of symbols]

1 被2乗数 2 ブース符号化手段 7 部分2乗積生成手段 8 部分積生成手段 19 部分2乗積・部分積生成手段 22 2入力加算手段 101−104 部分2乗積回路 201−206 部分積回路 401 多入力加算回路 402−407 補数回路 501 部分2乗積生成・加算手段 502 部分積生成・加算手段 505 2入力加算手段 605 セレクタ 606 部分2乗回路 607 加算回路 608 シフター 705、706 セレクタ 707 部分積回路 708 補数回路 711 加算器 712 シフター DESCRIPTION OF SYMBOLS 1 Multiplicand 2 Booth encoding means 7 Partial square product generating means 8 Partial product generating means 19 Partial square product / partial product generating means 22 2 Input adding means 101-104 Partial square product circuit 201-206 Partial product circuit 401 multi-input addition circuit 402-407 complement circuit 501 partial square product generation / addition means 502 partial product generation / addition means 505 2-input addition means 605 selector 606 partial square circuit 607 addition circuit 608 shifters 705, 706 selector 707 partial products Circuit 708 Complement circuit 711 Adder 712 Shifter

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】被2乗数を2次のブースアルゴリズムに従
ってコード信号化し、前記コード信号を用いて被2乗数
をM個の部分に分割するブース符号化手段と、前記M個
の分割部分を2乗して得られるM個の部分2乗積を生成
する部分2乗積生成手段と、前記分割部分のうち、異な
る組み合せの部分同士を乗算して得られるM2個の部分
積を生成する部分積生成手段と、前記M個の部分2乗積
と前記M2個の部分積を部分2乗積・部分積加算手段に
おいて、2つの信号になるまで加算し、その出力を2入
力加算手段で加算することにより、2乗積を得ることを
特長とする2乗回路。
1. A Booth coding means for converting a multiplicand into a code signal according to a quadratic Booth algorithm, and dividing the multiplicand into M parts using the code signal, and the M divided parts into 2 parts. A partial square product generating means for generating M partial square products obtained by multiplication, and M C 2 partial products obtained by multiplying different combinations of the divided parts. The partial product generating means, the M partial square products, and the M C 2 partial products are added by the partial square product / partial product adding means until two signals are obtained, and the output is added by two inputs. A squaring circuit characterized by obtaining a squared product by addition by means.
【請求項2】被2乗数を2次のブースアルゴリズムに従
ってコード信号化し、前記コード信号を用いて被2乗数
をM個の部分に分割するブース符号化手段と、前記M個
の分割部分を桁の低い方から2乗し、シフト累積加算す
る部分2乗積生成・加算手段と、前記M個の分割部分の
うち、異なる組み合せの部分同士を桁の低い方から乗算
し、得られる部分積をシフト累積加算する部分積生成・
加算手段と、前記部分2乗積生成・加算手段と前記部分
積生成・加算手段の出力を2入力加算手段において加算
して2乗積を得ることを特長とする2乗回路。
2. A Booth coding means for converting a multiplicand into a code signal according to a quadratic Booth algorithm and dividing the multiplicand into M parts using the code signal, and a digit for the M divided parts. From the lowest digit, the partial square product generating / adding means for performing the cumulative cumulative shift, and the different combinations of the M divided portions are multiplied from the lowest digit to obtain a partial product. Partial product generation for shift cumulative addition
A squaring circuit characterized by adding the output of the adding means, the partial square product generating / adding means, and the partial product generating / adding means in a two-input adding means to obtain a square product.
JP5316291A 1993-12-16 1993-12-16 Squaring circuit Pending JPH07168699A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5316291A JPH07168699A (en) 1993-12-16 1993-12-16 Squaring circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5316291A JPH07168699A (en) 1993-12-16 1993-12-16 Squaring circuit

Publications (1)

Publication Number Publication Date
JPH07168699A true JPH07168699A (en) 1995-07-04

Family

ID=18075480

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5316291A Pending JPH07168699A (en) 1993-12-16 1993-12-16 Squaring circuit

Country Status (1)

Country Link
JP (1) JPH07168699A (en)

Similar Documents

Publication Publication Date Title
JPH0612229A (en) Multiplication and accumulation circuit
US5784305A (en) Multiply-adder unit
EP0356153B1 (en) Radix-2**n divider method and apparatus using overlapped quotient bit selection and concurrent quotient rounding and correction
JP2972498B2 (en) Automatic logic circuit design method, system and device thereof, and multiplier
JPH05134851A (en) Multiplying circuit output system
US6745219B1 (en) Arithmetic unit using stochastic data processing
US5195051A (en) Computation of sign bit and sign extension in the partial products in a floating point multiplier unit
KR970006408B1 (en) Method and apparatus for automatically designing logic circuitand multiplier
US4677583A (en) Apparatus for decimal multiplication
EP0044450B1 (en) Digital adder circuit
JPH09222991A (en) Adding method and adder
KR100329914B1 (en) Dissipation device
US4935892A (en) Divider and arithmetic processing units using signed digit operands
JPH07168699A (en) Squaring circuit
JP6863907B2 (en) Arithmetic circuit
JP2556300B2 (en) Multiplier
JP2606326B2 (en) Multiplier
EP1178398A1 (en) Arithmetic unit
JP2765516B2 (en) Multiply-accumulate unit
JP2606339B2 (en) Multiplier
JPH1115641A (en) Multiplier using redundant binary adder
JP3803653B2 (en) Multiplication processor
JP3106767B2 (en) Multiplication method and multiplication circuit
JP4042215B2 (en) Arithmetic processing apparatus and method
JP3247759B2 (en) Arithmetic processing unit

Legal Events

Date Code Title Description
FPAY Renewal fee payment (prs date is renewal date of database)

Year of fee payment: 8

Free format text: PAYMENT UNTIL: 20080714

FPAY Renewal fee payment (prs date is renewal date of database)

Year of fee payment: 9

Free format text: PAYMENT UNTIL: 20090714

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100714

Year of fee payment: 10

FPAY Renewal fee payment (prs date is renewal date of database)

Year of fee payment: 10

Free format text: PAYMENT UNTIL: 20100714

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110714

Year of fee payment: 11

EXPY Cancellation because of completion of term
FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110714

Year of fee payment: 11