[go: up one dir, main page]

JPH05334050A - Multiplier - Google Patents

Multiplier

Info

Publication number
JPH05334050A
JPH05334050A JP4139157A JP13915792A JPH05334050A JP H05334050 A JPH05334050 A JP H05334050A JP 4139157 A JP4139157 A JP 4139157A JP 13915792 A JP13915792 A JP 13915792A JP H05334050 A JPH05334050 A JP H05334050A
Authority
JP
Japan
Prior art keywords
multiplier
product
multiplicand
bit
bits
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.)
Withdrawn
Application number
JP4139157A
Other languages
Japanese (ja)
Inventor
Yoshinobu Komagata
善信 駒形
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP4139157A priority Critical patent/JPH05334050A/en
Publication of JPH05334050A publication Critical patent/JPH05334050A/en
Withdrawn legal-status Critical Current

Links

Abstract

(57)【要約】 (修正有) 【目的】別途に加算器を必要としない数値丸め機能付き
乗算器を実現する。 【構成】乗数器20は、x-1からx7までの8+1ビッ
トの被乗数Xとy0 からy7 までの8ビットの乗数Yと
を乗算処理し、z0 からz15までの16ビットの積Zを
出力する8×8ビット規模の並列型乗算器である。21
〜24はシフタ、25〜28は加算器で、シフタは、そ
れぞれ、下位から上位へと連続する被乗数の3ビット
(「x-1,x0 ,x1 」「x1 ,x2 ,x3 ……)ごと
に、被乗数と乗数の部分積(a-1/0/1,a1/2/3 、…
…)を生成する部分積生成手段として機能し、また、加
算器は、それぞれ、各部分積を2ビットずつシフトして
順次に加算する複数段の加算手段として機能する。定数
発生器29で所定の定数Dを発生し、この定数Dは、被
乗数XとYの積Zに対する数値丸めに必要なビット配列
を有する2進数である。
(57) [Summary] (Modified) [Purpose] To realize a multiplier with a numerical rounding function that does not require an adder separately. A multiplier 20 multiplies an 8 + 1-bit multiplicand X from x -1 to x 7 and an 8-bit multiplicand Y from y 0 to y 7 , and outputs a 16-bit multiplicand from z 0 to z 15. It is a parallel type multiplier of 8 × 8 bit scale that outputs the product Z. 21
˜24 are shifters, 25-28 are adders, and each of the shifters has 3 bits (“x −1 , x 0 , x 1 ”, “x 1 , x 2 , x 3) of the multiplicand consecutive from the lower order to the higher order. ...) for each multiplicand and multiplier (a -1/0/1 , a 1/2/3 , ...)
..), and the adders function as a plurality of stages of adding means for shifting each partial product by 2 bits and sequentially adding them. A constant generator 29 generates a predetermined constant D, which is a binary number having a bit arrangement necessary for rounding a numerical value with respect to a product Z of multiplicands X and Y.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、被乗数(X)と乗数
(Y)の積(Z)を求めるディジタル並列型の乗算器に
関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a digital parallel type multiplier for obtaining a product (Z) of a multiplicand (X) and a multiplier (Y).

【0002】[0002]

【従来の技術】従来、ディジタル並列型の乗算器とし
て、例えば、変形Boothアルゴリズムに基づく回路
構成を有するものが知られている。図4は、その概念ブ
ロック図であり、x-1からx7 までの8+1ビットの被
乗数(X)とy0 からy7 までの8ビットの乗数(Y)
とを乗算処理し、z0 からz15 までの16ビットの積
(Z)を出力する8×8ビット規模の並列型乗算器の例
である。
2. Description of the Related Art Conventionally, as a digital parallel type multiplier, for example, one having a circuit configuration based on a modified Booth algorithm is known. FIG. 4 is a conceptual block diagram showing the 8 + 1-bit multiplicand (X) from x -1 to x 7 and the 8-bit multiplicand (Y) from y 0 to y 7.
This is an example of an 8 × 8-bit parallel type multiplier that multiplies and and outputs a 16-bit product (Z) from z 0 to z 15 .

【0003】4個のシフタ10〜13は、それぞれ、下
位から上位へと連続する被乗数の3ビット(「x-1、x
0 、x1 」「x1 、x2 、x3 」「x3 、x4 、x5
「x 5 、x6 、x7 」)ごとに、被乗数と乗数の部分積
(a-1/0/1、a1/2/3 、a3/ 4/5 、a5/6/7 、)を生成
する部分積生成手段として機能し、また、4個の加算器
14〜17は、それぞれ、各部分積を2ビットづつシフ
トして順次に加算する複数段の加算手段として機能する
ものである。
The four shifters 10 to 13 are respectively
3 bits (“x-1, X
0, X1"X1, X2, X3"X3, XFour, XFive"
"X Five, X6, X7)), The partial product of the multiplicand and the multiplier
(A-1/0/1, A1/2/3, A3 / 4/5, A5/6/7,)Generate a
Functioning as a partial product generating means, and four adders
14 to 17 respectively shift each partial product by 2 bits.
Functions as a multi-stage addition means for adding and sequentially adding
It is a thing.

【0004】ここで、被乗数Xは次式(1)で表すこと
ができる。但し、被乗数X、乗数Y及び積Zは何れも2
の補数で表現されているものとする。
Here, the multiplicand X can be expressed by the following equation (1). However, the multiplicand X, the multiplier Y, and the product Z are all 2
It is assumed to be represented by the complement of.

【0005】[0005]

【数1】 [Equation 1]

【0006】上式(1)より、積Z(Z=X×Y)は次
のように表すことができる。
From the above equation (1), the product Z (Z = X × Y) can be expressed as follows.

【0007】[0007]

【数2】 [Equation 2]

【0008】ここで、式(2)中のai は、x2i-1、x
2i、x2i+1に1個、すなわち被乗数Xの連続する3ビッ
ト(例えば「x-1、x0 、x1 」「x1 、x2 、x3
「x 3 、x4 、x5 」「x5 、x6 、x7 」)に応じ、
次表1に示す値をとるもので、Yとai とを掛けること
により、被乗数Xの連続する3ビットに1個の割の部分
積(以下、a-1/0/1、a1/2/3 、a3/4/5 、a5/6/7
が生成される。
Here, a in equation (2)iIs x2i-1, X
2i, X2i + 11 bit, that is, 3 consecutive bits of the multiplicand X
(Eg "x-1, X0, X1"X1, X2, X3"
"X 3, XFour, XFive"XFive, X6, X7))
It takes the values shown in Table 1 below, and Y and aiMultiply by
Therefore, every 3 bits of the multiplicand X are divided by 1
Product (hereinafter a-1/0/1, A1/2/3, A3/4/5, A5/6/7)
Is generated.

【0009】 表1 ======================================= x2i-12i2i+1 i --------------------------------------- 0 0 0 0 0 0 1 1 0 1 0 1 0 1 1 2 1 0 0 −2 1 0 1 −1 1 1 0 −1 1 1 1 0 ======================================= 左から1番目の加算器14は、部分積a-1/0/1とオール
ゼロ(Lレベル)とを加算して積Zの2ビットz0 、z
1 を生成すると共に残りの加算結果を2番目の加算器1
5に与え、2番目の加算器15は、1番目の加算器14
の加算結果と部分積a1/2/3 とを加算して積Zの2ビッ
トz2 、z3 を生成すると共に残りの加算結果を3番目
の加算器16に与える。3番目の加算器16は、2番目
の加算器15の加算結果と部分積a3/4/5 とを加算して
積Zの2ビットz4 、z5 を生成すると共に残りの加算
結果を4番目の加算器17に与え、4番目の加算器は、
3番目の加算器16の加算結果と部分積a5/6/7 とを加
算して積Zの残りのビットz6 〜z15を生成する。な
お、各加算器14〜17には、キャリ入力としてそれぞ
れx1 、x3 、x5 、x7 が与えられている。
Table 1 ======================================= x 2i-1 x 2i x 2i + 1 a i --------------------------------------- 0 0 0 0 0 0 0 1 1 0 1 0 1 0 1 1 2 1 1 0 0 -2 1 0 1 1 -1 1 1 1 0 -1 1 1 1 1 0 ========================== =============== The first adder 14 from the left adds 2 bits of the product Z by adding the partial product a -1/0/1 and all zero (L level). z 0 , z
1 is generated and the remaining addition result is added to the second adder 1
5 to the second adder 15, the first adder 14
And the partial product a 1/2/3 are added to generate 2 bits z 2 and z 3 of the product Z, and the remaining addition result is given to the third adder 16. The third adder 16 adds the addition result of the second adder 15 and the partial product a 3/4/5 to generate 2 bits z 4 and z 5 of the product Z, and outputs the remaining addition result. The fourth adder is given to the fourth adder 17.
The addition result of the third adder 16 and the partial product a 5/6/7 are added to generate the remaining bits z 6 to z 15 of the product Z. Note that x 1 , x 3 , x 5 , and x 7 are given to the adders 14 to 17 as carry inputs, respectively.

【0010】このような構成によれば、被乗数Xの連続
する3ビットに1個の割で部分積を生成すると共に、各
部分積を加算器ごとに2ビットづつシフトして加算する
ことにより、例えば8×8ビットの並列演算であれば、
16ビット幅の積Zを生成することができる。
According to such a configuration, a partial product is generated by dividing one by 3 consecutive 3 bits of the multiplicand X, and each partial product is shifted by 2 bits for each adder to be added. For example, in the case of 8 × 8 bit parallel operation,
A 16-bit wide product Z can be generated.

【0011】[0011]

【発明が解決しようとする課題】しかしながら、かかる
従来の乗算器にあっては、積Zに対する数値丸め処理機
能(有効ビット数を少なくする処理、10進演算の4捨
5入に相当する)を有していないために、丸め処理を行
う場合には、一般に図5に示すように、乗算器(図4の
乗算器)の後に加算器18を繋ぎ、この加算器18によ
って、数値丸めに必要なビット配列を有する2進数
「D」と、積「Z」とを加算する必要があった。
However, in such a conventional multiplier, a numerical rounding processing function for the product Z (processing for reducing the number of effective bits, corresponding to decimal rounding) is performed. When the rounding process is performed, the adder 18 is connected after the multiplier (multiplier of FIG. 4) as shown in FIG. It was necessary to add the binary number "D" having a different bit array and the product "Z".

【0012】従って、例えば、8×8ビット規模の並列
乗算器に数値丸め機能を持たせようとすると、少なくと
も4個のシフタ10〜13と4個の加算器14〜17に
加えて、さらに1個の加算器18を必要とするから、回
路規模が増大するといった問題点や、追加の加算器18
の処理時間だけ高速化が妨げられるといった問題点があ
る。 [目的]そこで、本発明の目的は、別途に加算器を必要
としない数値丸め機能付き乗算器の実現にある。
Therefore, for example, if an 8 × 8 bit parallel multiplier is to have a numerical rounding function, in addition to at least four shifters 10-13 and four adders 14-17, an additional 1 is added. Since the number of adders 18 is required, the problem that the circuit scale increases and the additional adder 18
There is a problem that the speedup is hindered by the processing time of. [Purpose] Therefore, an object of the present invention is to realize a multiplier with a numerical rounding function that does not require an adder separately.

【0013】[0013]

【課題を解決するための手段】本発明は、上記目的を達
成するために、被乗数を下位側から「x-1、x0
1 、x2 、x3 、x4 、x5 、……」とするとき、下
位から上位へと連続する被乗数の3ビット(「x-1、x
0 、x1 」「x1 、x2 、x3 」「x3 、x4 、x 5
……)ごとに、前記被乗数と乗数の部分積(a-1/0/1
1/2/3 、a3/4/5、……)を生成する部分積生成手段
と、各部分積を2ビットづつシフトして順次に加算する
複数段の加算手段とを備え、前記複数段の加算手段のう
ち初段の加算手段が、被乗数の最下位側の3ビット(x
-1、x0 、x1 )に対応する部分積(a-1/0/1)と所定
の定数とを加算する乗算器であって、前記所定の定数
は、被乗数と乗数の積に対する数値丸めに必要なビット
配列を有する2進数であることを特徴とし、好ましく
は、前記数値丸め用の定数は、前記被乗数と乗数の積を
「z0 、z1、z2 、z3 、z4 、z5 、z6 、……」
とし、そのうちのz0 〜zi (iは1、2、……)を丸
める場合に、下位からi+2ビット目が「1」、その他
のビットが「0」のビット配列を持つ2進数であること
を特徴とする。
The present invention achieves the above objects.
In order to generate-1, X0,
x 1, X2, X3, XFour, XFive, …… ”
3 bits ("x-1, X
0, X1"X1, X2, X3"X3, XFour, X Five"
......), the partial product (a-1/0/1,
a1/2/3, A3/4/5, ...) to generate partial product generating means
And each partial product is shifted by 2 bits and added sequentially
A plurality of stages of addition means,
The first-stage addition means uses the least significant 3 bits (x
-1, X0, X1) Corresponding to the partial product (a-1/0/1) And predetermined
Of the predetermined constant
Is the number of bits needed for rounding the product of the multiplicand and the multiplier
Characterized by being a binary number having an array, preferably
Is the constant for rounding the number, the product of the multiplicand and the multiplier.
"Z0, Z1, Z2, Z3, ZFour, ZFive, Z6, …… 」
And z of them0~ ZiCircle (i is 1, 2, ...)
When the number is lower, the i + 2th bit from the lower order is "1", etc.
Is a binary number with a bit array of "0"
Is characterized by.

【0014】[0014]

【作用】本発明では、乗算器内部で数値丸め処理が実行
され、乗算器からは、丸め処理済みの積(Z)が出力さ
れる。従って、別途に加算器を必要としない数値丸め機
能付き乗算器を実現でき、前述の回路規模や演算速度の
問題を解決できる。
In the present invention, the numerical rounding process is executed inside the multiplier, and the product (Z) after the rounding process is output from the multiplier. Therefore, it is possible to realize a multiplier with a numerical rounding function that does not require an additional adder, and it is possible to solve the problems of the circuit scale and the operation speed described above.

【0015】[0015]

【実施例】以下、本発明の実施例を図面に基づいて説明
する。図1〜図3は本発明に係る乗算器の一実施例を示
す図であり、変形Boothアルゴリズムに基づく回路
構成を有する乗算器への適用例である。まず、原理構成
を説明する。図1において、乗算器20は、x-1からx
7 までの8+1ビットの被乗数(X)とy0 からy7
での8ビットの乗数(Y)とを乗算処理し、z0 からz
15 までの16ビットの積(Z)を出力する8×8ビッ
ト規模の並列型乗算器である。
Embodiments of the present invention will be described below with reference to the drawings. 1 to 3 are diagrams showing an embodiment of a multiplier according to the present invention, which is an example of application to a multiplier having a circuit configuration based on a modified Booth algorithm. First, the principle configuration will be described. In FIG. 1, the multiplier 20 operates from x −1 to x
8-bit multiplier 8 + 1 bit of the multiplicand to 7 and (X) from y 0 to y 7 a (Y) by multiplying process, z from z 0
It is a parallel type multiplier of 8 × 8 bit scale that outputs a 16-bit product (Z) up to 15 .

【0016】21〜24はシフタ、25〜28は加算器
であり、シフタ21〜24は、それぞれ、下位から上位
へと連続する被乗数の3ビット(「x-1、x0 、x1
「x 1 、x2 、x3 」「x3 、x4 、x5 」「x5 、x
6 、x7 」)ごとに、被乗数と乗数の部分積
(a-1/0/1、a1/2/3 、a3/4/5 、a5/6/7 、)を生成
する部分積生成手段として機能し、また、加算器25〜
28は、それぞれ、各部分積を2ビットづつシフトして
順次に加算する複数段の加算手段として機能するもので
ある。
Reference numerals 21 to 24 are shifters and 25 to 28 are adders.
And the shifters 21 to 24 are respectively from lower to higher.
3 bits of the multiplicand consecutive to (“x-1, X0, X1"
"X 1, X2, X3"X3, XFour, XFive"XFive, X
6, X7)), The partial product of the multiplicand and the multiplier
(A-1/0/1, A1/2/3, A3/4/5, A5/6/7,)Generate a
Functioning as a partial product generating means, and the adder 25 to
28 shifts each partial product by 2 bits
It functions as a multi-stage addition means that adds sequentially.
is there.

【0017】ここで、29は所定の定数「D」を発生す
る定数発生器である。定数Dは、被乗数(X)と乗数
(Y)の積(Z)に対する数値丸めに必要なビット配列
を有する2進数であり、被乗数と乗数の積を「z0 、z
1 、z2 、z3 、z4 、z5 、z6 、z7 、z8
9 、z10、z11、z12、z13、z14、z15」の16ビ
ットとした場合で、そのうちのz0 からzi (iは1、
2、……)までを丸める場合であれば、下位からi+2
ビット目が「1」、その他のビットが「0」のビット配
列を持つ2進数のコード列である。例えば、zi =z4
とすると、「0〜0000100000(2) 」のコード
列となる。
Here, 29 is a constant generator for generating a predetermined constant "D". The constant D is a binary number having a bit array necessary for rounding a numerical value for the product (Z) of the multiplicand (X) and the multiplier (Y), and the product of the multiplicand and the multiplier is represented by "z 0 , z".
1 , z 2 , z 3 , z 4 , z 5 , z 6 , z 7 , z 8 ,
z 9, z 10, z 11 , z 12, z 13, z 14, z in case of the 16-bit 15 ", is z i (i from z 0 of which 1,
When rounding up to 2, ...), i + 2 from the bottom
It is a binary code string having a bit array in which the 1st bit is "1" and the other bits are "0". For example, z i = z 4
Then, the code string is "0 to 0000100000 (2) ".

【0018】i+2ビット目を、例えばHレベルに相当
する高電位側電源に接続することで「1」を与え、その
他のビットを例えばLレベルに相当する低電位側電源に
接続することで「0」を与える。このような構成によれ
ば、初段の加算器25により部分積a-1/0/1と定数Dが
加算されると共に、次段の加算器26により部分積a
1/2/3 と初段の加算器25の出力が加算され、さらに、
次次段の加算器27により部分積a3/4/5 と次段の加算
器26の出力が加算されると共に、最終段の加算器28
により部分積a5/6/ 7 と次次段の加算器27の出力が加
算される。
"1" is given by connecting the i + 2th bit to the high potential side power source corresponding to the H level, for example, and "0" by connecting the other bits to the low potential side power source corresponding to the L level, for example. "give. According to such a configuration, the partial product a −1/0/1 and the constant D are added by the adder 25 in the first stage, and the partial product a − is added by the adder 26 in the next stage.
1/2/3 and the output of the first stage adder 25 are added, and further,
The partial product a 3/4/5 and the output of the adder 26 of the next stage are added by the adder 27 of the next stage and the adder 28 of the final stage is added.
The output of the partial product a 5/6/7 and the next subsequent stage of the adder 27 are added by.

【0019】そして、初段の加算器25から積Zのビッ
ト0(z0 )とビット1(z1 )が取り出されると共
に、次段の加算器26から積Zのビット2(z2 )とビ
ット3(z3 )が取り出され、さらに、次次段の加算器
27から積Zのビット4(z4)とビット5(z5 )が
取り出されると共に、最終段の加算器28から積Zの残
りのビット(z6 〜z15)が取り出される。
Then, bit 0 (z 0 ) and bit 1 (z 1 ) of the product Z are taken out from the adder 25 at the first stage, and bit 2 (z 2 ) and bit 2 of the product Z are obtained from the adder 26 at the next stage. 3 (z 3 ) is taken out, bit 4 (z 4 ) and bit 5 (z 5 ) of the product Z are taken out from the adder 27 at the next stage, and the product Z of the product Z is taken out from the adder 28 at the last stage. the remaining bits (z 6 ~z 15) is taken out.

【0020】ここで、z0 、z1 、……z15は所定の定
数Dを加算した後の値であるから、定数Dを例えば「0
〜0000100000(2) 」とすると、積Zの下位5
ビット(z0 〜z4 )を切捨てることにより、有効ビッ
ト数をz5 からz15までと少なくすることができ、数値
丸め処理を施した積Zを得ることができる。従って、丸
め処理のための専用の加算器(図5の符号18参照)を
不要にでき、回路規模を増大することなく、また、処理
時間の高速化を妨げることなく、数値丸め機能付きの乗
算器を実現することができる。
Here, since z 0 , z 1 , ... Z 15 are values after adding a predetermined constant D, the constant D is set to, for example, “0”.
~ 0000100000 (2) ", the lower 5 of the product Z
By truncating the bits (z 0 to z 4 ), the number of effective bits can be reduced from z 5 to z 15 , and the product Z subjected to the rounding process can be obtained. Therefore, a dedicated adder for rounding processing (see reference numeral 18 in FIG. 5) can be dispensed with, multiplication with a numerical rounding function can be performed without increasing the circuit scale and preventing the processing time from increasing in speed. Can be realized.

【0021】図2は、本発明に係る乗算器の具体的なブ
ロック図であり、Xは被乗数、Yは乗数、Zは積、30
〜33は部分積生成手段としてのシフタ、34〜37は
加算手段としての加算器、38は定数発生器である。4
個のシフタ30〜33は同一構成であり、例えばシフタ
30は、図3に示すように、被乗数Xの連続する3ビッ
ト(x2i-1,x2i,x2i+1)に応じたデコード信号
0 、C1 を生成するBoothデコーダ30aと、ア
ンドゲート(AND)やオアゲート(OR)及びイクス
クルーシブオアゲート(EX)で構成された論理回路3
0bとを有し、論理回路30bのアンドゲート段とオア
ゲート段により、×0、×1、×2の何れかの動作、す
なわち×|ai |を実行する。次表2は、Boothデ
コーダ30aの真理値表と動作の対応表である。
FIG. 2 is a specific block diagram of the multiplier according to the present invention, where X is a multiplicand, Y is a multiplier, Z is a product, and 30 is a product.
Numerals 33 to 33 are shifters as partial product generating means, 34 to 37 are adders as adding means, and 38 is a constant generator. Four
The shifters 30 to 33 have the same configuration. For example, as shown in FIG. 3, the shifter 30 decodes a decoded signal corresponding to 3 consecutive bits (x 2i-1 , x 2i , x 2i + 1 ) of the multiplicand X. A Booth decoder 30a for generating C 0 and C 1 , and a logic circuit 3 including an AND gate (AND), an OR gate (OR), and an exclusive OR gate (EX)
0b, and the AND gate stage or the OR gate stage of the logic circuit 30b executes any operation of x0, x1, and x2, that is, x | a i |. The following Table 2 is a correspondence table of truth values and operations of the Booth decoder 30a.

【0022】 表2 =================================================== 2i+1 2i2i-10 1 動作 --------------------------------------------------- 0 0 0 0 0 ×0 0 0 1 0 1 ×1 0 1 0 0 1 ×1 0 1 1 1 0 ×2 1 0 0 1 0 ×2 1 0 1 0 1 ×1 1 1 0 0 1 ×1 1 1 1 0 0 ×0 =================================================== (C1 、C0 )→「0、0」の場合には、オアゲートの
出力(d8 〜d0 )が全て「0」になり、この場合×0
が実行される。(C1 、C0 )→「0、1」の場合に
は、オアゲートの出力(d8 〜d0 )は被乗数(x7
0 )と等しくなり(但し、d8 はx7 をコピーした
値)、この場合×1が実行される。(C1 、C0 )→
「1、0」の場合には、オアゲートの出力(d8
0 )は被乗数(x7 〜x0 )を上位側へ1ビットだけ
シフトした値、すなわちdi =xi+ 1になり、この場合
×2が実行される。
Table 2 ============================================== ====== x 2i + 1 x 2i x 2i-1 C 0 C 1 motion ------------------------------------------------- - 0 0 0 0 0 × 0 0 0 1 0 1 x 1 0 1 0 0 1 × 1 0 1 1 1 0 × 2 1 0 0 1 0 × 2 1 0 1 0 1 x 1 1 1 0 0 1 x 1 1 1 1 0 0 × 0 ============================================ ======== (C 1 , C 0 ) → In the case of “0, 0”, the outputs (d 8 to d 0 ) of the OR gates are all “0”, and in this case × 0
Is executed. In the case of (C 1 , C 0 ) → “0, 1”, the output of the OR gate (d 8 to d 0 ) is the multiplicand (x 7 to
x 0 ), where d 8 is a copy of x 7 and in this case x 1 is executed. (C 1 , C 0 ) →
In the case of "1, 0", the output of the OR gate (d 8 ~
d 0 ) is a value obtained by shifting the multiplicand (x 7 to x 0 ) to the upper side by one bit, that is, d i = x i + 1 , and in this case, x 2 is executed.

【0023】イクスクルーシブオアゲート(EX)は、
i が負符号のときに補数を計算するものである。但
し、この補数は1の補数であるため、図2の加算器34
〜37のキャリー入力にx2i+1を接続するようにしてい
る。これは、ai が負符号になるとき、各加算段におけ
るx2i+1の値は「1」であり、1の補数にその値「1」
を加えることによって2の補数に変換できるからであ
る。
The exclusive or gate (EX) is
Complement is calculated when a i has a negative sign. However, since this complement is a one's complement, the adder 34 of FIG.
The carry input of ~ 37 is connected to x 2i + 1 . This is because when a i has a negative sign, the value of x 2i + 1 in each addition stage is “1”, and its value is “1” in the one's complement.
This is because it can be converted into a two's complement by adding.

【0024】4個の加算器34〜37は同一構成であ
り、各段の加算器の入力A(A8 〜A 0 )に、対応する
シフタの出力(p0 〜p7 )すなわち被乗数Xの連続す
る3ビット(「x-1〜x1 」「x1 〜x3 」「x3 〜x
5 」または「x5 〜x7 」)に対応する部分積を与える
と共に、最終段を除く各加算器の出力(S8 〜S0 )を
2ビットづつシフトして次位段の加算器の入力B(B8
〜B0 )に与える。但し、初段の加算器34の入力Aに
は、定数発生器38で作られた所定の定数D、すなわち
「被乗数と乗数の積に対する数値丸めに必要なビット配
列を有する2進数」を与える。
The four adders 34 to 37 have the same structure.
Input of each stage adder (A8~ A 0) Corresponds to
Output of shifter (p0~ P7) That is, the multiplicand X
3 bits ("x-1~ X1"X1~ X3"X3~ X
FiveOr "xFive~ X7)) Gives the partial product corresponding to
Together with the output of each adder (S8~ S0)
It is shifted by 2 bits and input B (B8
~ B0) To give. However, to the input A of the first-stage adder 34
Is a predetermined constant D generated by the constant generator 38, that is,
"The bit allocation required for rounding the product of the multiplicand and the multiplier.
A binary number with columns ".

【0025】以上述べたように、本実施例によれば、乗
算器を構成する初段の加算手段に、i+2ビット目だけ
が「1」で、他のビットが「0」のビット配列を有する
定数Dを与えるようにしたので、積Zのビットz0 から
ビットzi を切捨てるだけで、積Zに対する数値丸め処
理を行うことができ、別途に加算器を必要としない数値
丸め機能付き乗算器を実現することができる。
As described above, according to this embodiment, a constant having a bit arrangement in which only the i + 2th bit is "1" and the other bits are "0" in the first-stage adder constituting the multiplier. Since D is given, it is possible to perform the numerical rounding process on the product Z by simply cutting the bits z 0 to z i of the product Z, and a multiplier with a numerical rounding function that does not require an adder separately. Can be realized.

【0026】なお、定数Dのi+2ビット目を、所定の
モード制御信号に従って「1」か「0」に切り換えでき
るようにすると、「0捨1入」をオン/オフできるので
好ましい。
It is preferable that the i + 2th bit of the constant D can be switched to "1" or "0" according to a predetermined mode control signal because "0 rounding 1" can be turned on / off.

【0027】[0027]

【発明の効果】本発明によれば、初段の加算手段に数値
丸めに必要な定数Dを与えるようにしたので、別途に加
算器を必要としない数値丸め機能付き乗算器を実現する
ことができる。
According to the present invention, since the constant D necessary for rounding the numerical value is given to the adding means at the first stage, it is possible to realize a multiplier with a numerical rounding function which does not require an additional adder. ..

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

【図1】一実施例の原理構成図である。FIG. 1 is a principle configuration diagram of an embodiment.

【図2】一実施例のブロック構成図である。FIG. 2 is a block diagram of an embodiment.

【図3】一実施例のシフタの構成図である。FIG. 3 is a configuration diagram of a shifter according to an embodiment.

【図4】従来例の構成図である。FIG. 4 is a configuration diagram of a conventional example.

【図5】数値丸め処理を行う場合の従来構成図である。FIG. 5 is a conventional configuration diagram in the case of performing a numerical rounding process.

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

D:所定の定数 21〜24:シフタ(部分積生成手段) 25〜28:加算器(加算手段) 30〜33:シフタ(部分積生成手段) 34〜37:加算器(加算手段) D: predetermined constant 21 to 24: shifter (partial product generating means) 25 to 28: adder (adding means) 30 to 33: shifter (partial product generating means) 34 to 37: adder (adding means)

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】被乗数を下位側から「x-1、x0 、x1
2 、x3 、x4 、x5 、……」とするとき、下位から
上位へと連続する被乗数の3ビット(「x-1、x0 、x
1 」「x1 、x2 、x3 」「x3 、x4 、x5 」……)
ごとに、前記被乗数と乗数の部分積(a-1/0/1、a
1/2/3 、a3/4/5 、……)を生成する部分積生成手段
と、 各部分積を2ビットづつシフトして順次に加算する複数
段の加算手段とを備え、 前記複数段の加算手段のうち初段の加算手段が、被乗数
の最下位側の3ビット(x-1、x0 、x1 )に対応する
部分積(a-1/0/1)と所定の定数とを加算する乗算器で
あって、 前記所定の定数は、被乗数と乗数の積に対する数値丸め
に必要なビット配列を有する2進数であることを特徴と
する乗算器。
1. The multiplicands from the lower side are "x -1 , x 0 , x 1 ,
When the x 2, x 3, x 4 , x 5, ...... ", 3 bits of the multiplicand to be continuous from bottom to top (" x -1, x 0, x
1 "and" x 1, x 2, x 3 "," x 3, x 4, x 5 "...)
, The partial product of the multiplicand and the multiplier (a -1/0/1 , a
1/2/3 , a 3/4/5 , ...), and a plurality of stages of adding means for sequentially adding each partial product by shifting it by 2 bits. Of the adding means of the stages, the adding means of the first stage forms a partial product (a -1/0/1 ) corresponding to the least significant 3 bits (x -1 , x 0 , x 1 ) of the multiplicand and a predetermined constant. Wherein the predetermined constant is a binary number having a bit array necessary for rounding a numerical value for a product of a multiplicand and a multiplier.
【請求項2】前記数値丸め用の定数は、前記被乗数と乗
数の積を「z0 、z1 、z2 、z3、z4 、z5
6 、……」とし、そのうちのz0 〜zi (iは1、
2、……)を丸める場合に、下位からi+2ビット目が
「1」、その他のビットが「0」のビット配列を持つ2
進数であることを特徴とする請求項1記載の乗算器。
2. The constant for rounding the numerical value is obtained by multiplying the product of the multiplicand and the multiplier by "z 0 , z 1 , z 2 , z 3 , z 4 , z 5 ,
z 6 , ..., Of which, z 0 to z i (i is 1,
When rounding 2, ...), 2 has a bit arrangement in which the i + 2th bit from the lower order is "1" and the other bits are "0".
The multiplier according to claim 1, wherein the multiplier is a base number.
JP4139157A 1992-05-29 1992-05-29 Multiplier Withdrawn JPH05334050A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4139157A JPH05334050A (en) 1992-05-29 1992-05-29 Multiplier

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4139157A JPH05334050A (en) 1992-05-29 1992-05-29 Multiplier

Publications (1)

Publication Number Publication Date
JPH05334050A true JPH05334050A (en) 1993-12-17

Family

ID=15238908

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4139157A Withdrawn JPH05334050A (en) 1992-05-29 1992-05-29 Multiplier

Country Status (1)

Country Link
JP (1) JPH05334050A (en)

Similar Documents

Publication Publication Date Title
US4168530A (en) Multiplication circuit using column compression
US4722069A (en) Nonrestoring divider
US5426598A (en) Adder and multiplier circuit employing the same
GB2373602A (en) Multiplication logic with column compression
JP2000259394A (en) Floating point multiplier
JPH09269891A (en) Partial product addition method and device, floating point multiplication method and device, floating point product sum operation method and device
JPH0713742A (en) Multiplicaton device
US3711693A (en) Modular bcd and binary arithmetic and logical system
JPH0619685A (en) Parallel multiplying circuit
US20040010536A1 (en) Apparatus for multiplication of data in two's complement and unsigned magnitude formats
US5870322A (en) Multiplier to selectively perform unsigned magnitude multiplication or signed magnitude multiplication
JP3660075B2 (en) Dividing device
JPH08314697A (en) Signed / unsigned multi-purpose multiplier
JPH076024A (en) Decimal number multiplier
US4118786A (en) Integrated binary-BCD look-ahead adder
JPH05334050A (en) Multiplier
JPS58137045A (en) Parallel multiplier
JP3071607B2 (en) Multiplication circuit
JP2734438B2 (en) Multiplier
JP2991788B2 (en) Decoder
JP2907276B2 (en) Arithmetic processing unit
JP3130797B2 (en) Product-sum operation processing method and apparatus
JPH1011267A (en) Multiplier
JP3230349B2 (en) Decimal multiplier
JPS6285333A (en) Round-off processing system for floating point multiplier

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 19990803