JPH0962489A - Multiplier - Google Patents

Multiplier

Info

Publication number
JPH0962489A
JPH0962489A JP7215938A JP21593895A JPH0962489A JP H0962489 A JPH0962489 A JP H0962489A JP 7215938 A JP7215938 A JP 7215938A JP 21593895 A JP21593895 A JP 21593895A JP H0962489 A JPH0962489 A JP H0962489A
Authority
JP
Japan
Prior art keywords
adder
register
input
switch
square
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
JP7215938A
Other languages
Japanese (ja)
Inventor
Takahito Ishii
崇人 石井
Yoshiyuki Hata
善之 畑
Atsushi Moriya
敦 森谷
Kenzo Urabe
健三 占部
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.)
Kokusai Electric Corp
Original Assignee
Kokusai Electric Corp
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 Kokusai Electric Corp filed Critical Kokusai Electric Corp
Priority to JP7215938A priority Critical patent/JPH0962489A/en
Publication of JPH0962489A publication Critical patent/JPH0962489A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide the multiplier which can easily cope with an increase in the number of bits and is made small-sized. SOLUTION: As for two numbers X and Y which are inputted, an adder 1 calculates X+Y, a switch 2 outputs X and Y, and X+Y in this order, and a square calculator 3 squares the numeral inputted from the switch 2; and a polarity controller 4 changes the sign of the square of the X into a minus, the square of the Y into a minus, and the square of the (X+Y) into a plus, an adder 5 totalizes the values inputted from the polarity controller 4 and stores the result in a register 6, and a divider 7 divides the result stored in the register 6 by 2 to find the product of the X and Y.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、デジタル機器に用
いられる汎用の乗算器に係り、特に、乗算される数(被
乗算数)のビット数の増大に容易に対応することがで
き、かつ小型に構成できる乗算器に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a general-purpose multiplier used in digital equipment, and more particularly, it can easily cope with an increase in the number of bits of a number to be multiplied (multiplicand) and is small in size. And a multiplier that can be configured as follows.

【0002】[0002]

【従来の技術】従来の乗算器について図2を使って説明
する。図2は、従来の乗算器の構成ブロック図である。
従来の乗算器は、図2に示すように、複数のシフトレジ
スタ8a〜8nと、複数のスイッチ9a〜9nを有する
スイッチ9と、複数の加算器10a〜10nとから構成
されている。
2. Description of the Related Art A conventional multiplier will be described with reference to FIG. FIG. 2 is a configuration block diagram of a conventional multiplier.
As shown in FIG. 2, the conventional multiplier is composed of a plurality of shift registers 8a to 8n, a switch 9 having a plurality of switches 9a to 9n, and a plurality of adders 10a to 10n.

【0003】各部の働きを具体的に説明する。シフトレ
ジスタ8は、入力された数値(X)のビット列を左シフ
トする(2のn乗倍する)ものである。シフトレジスタ
8は、複数用意され、それぞれ、シフトをしない(2の
0乗倍する)もの(8a)と、1回の左シフトを行う
(2の1乗倍する)もの(8b)と、2回の左シフトを
行う(2の2乗倍する)もの(8c)というように、そ
れぞれ、i回左シフトを行う(入力された2のi乗倍を
計算する)ようになっている。iは、0から、乗算に関
わる数のビット数の間の数すべてである。例えば、乗算
の結果得られる数の最大限度が、「9999」である場
合、これの2進数表現が、「100111000011
11」で14ビットであることから、iは0〜14にな
る。
The function of each part will be specifically described. The shift register 8 shifts the input bit string of the numerical value (X) to the left (multiplies 2 to the nth power). A plurality of shift registers 8 are prepared, one that does not shift (multiply by 2 to the power of 0) (8a), one that performs one left shift (multiply by 2 to the power of 1) (8b), and 2 For example, the left shift is performed twice (2 to the power of 2) (8c), the left shift is performed i times (the input 2 to the power of 2 is calculated). i is any number between 0 and the number of bits involved in the multiplication. For example, when the maximum limit of the number obtained as a result of multiplication is “9999”, the binary representation of this is “100111000011.
Since "11" is 14 bits, i becomes 0 to 14.

【0004】スイッチ9は、最初すべてが開いた状態に
あり、乗算に係る数値(Y)のビットに応じて、ビット
が立っていれば、対応するスイッチを閉じ、ビットが立
っていなければ、対応するスイッチを開いたままにする
ものである。例えば、数値(Y)が「5」である場合、
「5」の2進数表現が「101」であるので、2の0乗
に対応するスイッチ(9a)と、2の2乗に対応するス
イッチ(9c)が閉じられ、残りのスイッチは開かれた
ままになる。そして加算器10は、入力された2つの数
の和を計算して出力するものである。
All of the switches 9 are initially in the open state. Depending on the bit of the numerical value (Y) related to multiplication, if the bit is set, the corresponding switch is closed, and if the bit is not set, the corresponding switch is set. It leaves the switch to open. For example, when the numerical value (Y) is “5”,
Since the binary number representation of "5" is "101", the switch (9a) corresponding to the power of 2 and the switch (9c) corresponding to the power of 2 are closed and the remaining switches are opened. Leave. Then, the adder 10 calculates and outputs the sum of the two input numbers.

【0005】次に、従来の乗算器の動作について、具体
的に「7」と「5」との積を計算する例をあげて説明す
る。尚、「7」の2進数表現は、「111」、「5」の
2進数表現は「101」である。まず、Xとして「7」
が入力されると、シフトレジスタ8で、8aが「11
1」を、8bが「1110」を、8cが「11100」
をスイッチ9に出力する。スイッチ9では、Yである
「5」の「101」に対応して、9aと9cのスイッチ
が閉じており、9bのスイッチは開いたままになってい
る。
Next, the operation of the conventional multiplier will be described by giving an example of calculating the product of "7" and "5". The binary expression of "7" is "111", and the binary expression of "5" is "101". First, "7" as X
Is input, the shift register 8 shifts 8a to “11.
1 ”, 8b is“ 1110 ”, 8c is“ 11100 ”
Is output to the switch 9. In the switch 9, the switches 9a and 9c are closed and the switch 9b is left open, corresponding to "101" of Y "5".

【0006】そして、加算器10bが、スイッチ9bが
開いているため、シフトレジスタ8bの内容を加算する
ことなく、スイッチ9aを介して入力された「111」
をそのまま加算器10cに出力する。そして、加算器1
0cが、加算器10bから出力された「111」と、ス
イッチ9cを介して出力された「11100」とを加算
して、「100011」を出力する。これは、10進数
表現で「35」に対応している。そして、従来の乗算器
は、「7」と「5」の積である「35」を出力するよう
になっていた。
Since the switch 9b is open, the adder 10b does not add the contents of the shift register 8b and inputs "111" through the switch 9a.
Is output to the adder 10c as it is. And adder 1
0c adds "111" output from the adder 10b and "11100" output via the switch 9c, and outputs "100011". This corresponds to "35" in decimal notation. Then, the conventional multiplier is designed to output "35" which is the product of "7" and "5".

【0007】[0007]

【発明が解決しようとする課題】しかしながら、上記従
来の乗算器では、計算に係る数が大きくなり、ビット数
が増大すると、シフトレジスタとスイッチと加算器とを
それぞれ増設する必要があり、ビット数の増大に容易に
対応できず、また、小型に構成することができないとい
う問題点があった。
However, in the conventional multiplier described above, when the number of calculations becomes large and the number of bits increases, it is necessary to add a shift register, a switch, and an adder, respectively. However, there is a problem in that it cannot be easily dealt with and the size cannot be reduced.

【0008】本発明は上記実情に鑑みて為されたもの
で、ビット数の増大に容易に対応でき、また、小型に構
成できる乗算器を提供することを目的とする。
The present invention has been made in view of the above circumstances, and an object of the present invention is to provide a multiplier which can easily cope with an increase in the number of bits and can be constructed in a small size.

【0009】[0009]

【課題を解決するための手段】上記従来例の問題点を解
決するための請求項1記載の発明は、2つの乗算される
数の和を計算する第一の加算器と、前記2つの乗算され
る数、前記2つの乗算される数の和の順序で出力する切
替器と、前記切替器から入力された数値を2乗して出力
する2乗計算器と、前記2乗計算器から入力された数値
の符号を、入力された順序で、「負」「負」「正」に変
換して出力する極性制御器と、前記極性制御器から入力
された数値を加算して出力する第二の加算器と、前記第
二の加算器から入力された値を格納するレジスタと、前
記レジスタに格納されている値を2で割って出力する除
算器とを有することを特徴としており、乗算される数が
大きくなり、ビット数が増大しても、全体の構成を変え
ずに2乗計算器の内容のみを変えることによって、部品
点数を増加させることがなく、容易に対応でき、かつ、
小型に構成できる。
The invention according to claim 1 for solving the above-mentioned problems of the conventional example is a first adder for calculating the sum of two numbers to be multiplied, and the two multiplications. A number that is output in the order of the sum of the two multiplied numbers, a square calculator that squares and outputs the numerical value input from the switch, and an input from the square calculator. The sign of the numerical value is converted into "negative", "negative", "positive" in the input order and output, and the numerical value input from the polarity controller is added and output. Of the second adder, a register for storing the value input from the second adder, and a divider for dividing the value stored in the register by 2 and outputting the divided value. Even if the number of bits increases and the number of bits increases, the square calculator By changing only volume, without increasing the number of parts, easily can handle, and,
Can be made compact.

【0010】[0010]

【発明の実施の形態】本発明の実施の形態を図面を参照
しながら説明する。本発明に係る乗算器(本乗算器)
は、(X+Y)の2乗が、Xの2乗とYの2乗と、Xと
Yとの積の2倍の和であることを利用して、(X+Y)
の2乗からXの2乗とYの2乗とを差引してから、2で
割り、XとYとの積を求める構成とすることで、ビット
数の増大に容易に対応でき、また、小型化できるもので
ある。
Embodiments of the present invention will be described with reference to the drawings. Multiplier according to the present invention (this multiplier)
Takes advantage of the fact that the square of (X + Y) is the sum of twice the product of X squared, Y squared, and X and Y, (X + Y)
By subtracting the square of X from the square of X and the square of Y and then dividing by 2 to obtain the product of X and Y, it is possible to easily cope with an increase in the number of bits, and It can be miniaturized.

【0011】本装置を図1を使って説明する。図1は、
本発明に係る乗算器の構成ブロック図である。本乗算器
は、図1に示すように、第一の加算器1と、切替器2
と、2乗計算器3と、極性制御器4と、第二の加算器5
と、レジスタ6と、除算器7とから構成されている。
This device will be described with reference to FIG. FIG.
FIG. 3 is a configuration block diagram of a multiplier according to the present invention. This multiplier includes a first adder 1 and a switch 2 as shown in FIG.
, The square calculator 3, the polarity controller 4, and the second adder 5
And a register 6 and a divider 7.

【0012】次に、各部を具体的に説明する。第一の加
算器1は、入力された2数(XとYと)の和を切替器2
に出力するものである。切替器2は、入力されたXとY
とそれらの和とを、その順番で、2乗計算器3に出力す
るものである。2乗計算器3は、あらかじめ計算してR
OMに格納している数値を参照して、入力された数値の
2乗の値を極性制御器4に出力するものである。極性制
御器4は、入力された数値の符号を入力された順番に、
負、負、正の順に変化させ、その結果を第二の加算器5
に出力するものである。また、極性制御器4は、正の符
号に変えるべき数値が入力されると、その時点で除算器
7に信号を出力するものである。
Next, each part will be described in detail. The first adder 1 switches the sum of the two numbers (X and Y) input to the switch 2
Is output to The switching device 2 receives the input X and Y
And the sum thereof are output to the square calculator 3 in that order. The square calculator 3 calculates in advance and R
With reference to the numerical value stored in the OM, the squared value of the input numerical value is output to the polarity controller 4. The polarity controller 4 inputs the signs of the input numerical values in the order of input,
It is changed in the order of negative, negative, positive, and the result is changed to the second adder 5
Is output to The polarity controller 4 outputs a signal to the divider 7 at that time when a numerical value to be changed to a positive sign is input.

【0013】第二の加算器5は、入力された数値とレジ
スタ6に格納された数値の和を計算し、レジスタ6に上
書きして格納するものである。レジスタ6は、最初
「0」に初期化されており、第二の加算器5から入力さ
れた数値を格納しておくものである。そして、除算器7
は、シフトレジスタであり、極性制御器4から信号が入
力されるまで待機し、信号の入力を受けると、レジスタ
6のビット内容を1回右シフトして(2で割って)、出
力するものである。
The second adder 5 calculates the sum of the input numerical value and the numerical value stored in the register 6, and overwrites and stores it in the register 6. The register 6 is initially initialized to “0” and stores the numerical value input from the second adder 5. And the divider 7
Is a shift register, which waits until a signal is input from the polarity controller 4, and when the signal is input, shifts the bit contents of the register 6 to the right once (by dividing by 2) and outputs the result. Is.

【0014】次に、本乗算器の動作について、「5」と
「7」との積を計算する場合を例にとって説明する。ま
ず、第一の加算器1が、Xとして入力された「5」と、
Yとして入力された「7」との和「12」を切替器2に
出力する。切替器2が、これらを「5」、「7」、「1
2」の順で2乗計算器3に出力する。
Next, the operation of this multiplier will be described by taking as an example the case where the product of "5" and "7" is calculated. First, when the first adder 1 inputs “5” as X,
The sum “12” with “7” input as Y is output to the switch 2. The switching device 2 sets these as "5", "7", "1".
2 ”is output to the square calculator 3 in this order.

【0015】2乗計算器3が、ROMを参照して、それ
ぞれ、「5」に対応する「25」と、「7」に対応する
「49」と、「12」に対応する「144」とを、この
順序で極性制御器4に出力すると、極性制御器4が、そ
れぞれの極性を、負、負、正の順序で変更して、「−2
5」と、「−49」とを第二の加算器5に出力し、「+
144」を第二の加算器5に出力し、かつ、そのときに
除算器7に信号を出力する。
The square calculator 3 refers to the ROM and stores "25" corresponding to "5", "49" corresponding to "7", and "144" corresponding to "12", respectively. Are output to the polarity controller 4 in this order, the polarity controller 4 changes the respective polarities in the order of negative, negative and positive, and
5 ”and“ −49 ”are output to the second adder 5, and“ + ”is output.
144 ”to the second adder 5, and at that time outputs a signal to the divider 7.

【0016】そして、第二の加算器5が、レジスタ6に
格納されている「0」と、「−25」との和を計算して
「−25」をレジスタ6に格納する。次に、「−49」
とレジスタ6に格納されている「−25」との和、「−
74」をレジスタ6に上書きして格納する。次に、この
「−74」と、「+144」との和、「70」をレジス
タ6に上書きして格納する。
Then, the second adder 5 calculates the sum of "0" stored in the register 6 and "-25" and stores "-25" in the register 6. Next, "-49"
And the sum of “−25” stored in the register 6, “−”
74 ”is overwritten and stored in the register 6. Next, the sum of "-74" and "+144", "70", is overwritten and stored in the register 6.

【0017】そして、除算器7が、極性制御器4からの
信号を受けて、レジスタ6の内容を右に1回ビットシフ
トして(2で割り)、その結果である「35」を出力す
る。尚、上記計算は10進数で表したが、本乗算器では
実際には「0」「1」を用いた2進法で為されるもので
ある。
Then, the divider 7 receives the signal from the polarity controller 4, bit-shifts the contents of the register 6 to the right once (divides by 2), and outputs the result "35". . Although the above calculation is represented by a decimal number, this multiplier is actually performed by a binary method using "0" and "1".

【0018】本乗算器によれば、被乗算数が増大したと
きには、ROM等の交換を行うことで済み、従って、ビ
ット数の増大に容易に対応することができ、また、部品
点数の増加がないため、小型に構成することができる効
果がある。
According to the present multiplier, when the multiplicand increases, it is sufficient to replace the ROM or the like, and therefore, it is possible to easily cope with the increase in the number of bits and increase the number of parts. Since it does not exist, there is an effect that it can be made compact.

【0019】[0019]

【発明の効果】本発明によれば、第一の加算器が2つの
乗算される数の和を計算し、切替器が2つの乗算される
数と2つの乗算される数の和とを、この順序で出力し、
2乗計算器が切替器から入力された数値を2乗して出力
し、極性制御器が2乗計算器から入力された数値の符号
を、入力された順序で、「負」「負」「正」に変換して
出力し、第二の加算器が極性制御器から入力された数値
を加算して出力し、レジスタが第二の加算器から入力さ
れた値を格納し、除算器がレジスタに格納されている値
を2で割って出力する乗算器としているので、乗算され
る数が大きくなり、ビット数が増大しても、全体の構成
を変えずに2乗計算器の内容のみを変えることによっ
て、部品点数を増加させることがなく、容易に対応で
き、かつ、小型に構成できる効果がある。
According to the present invention, the first adder calculates the sum of two multiplied numbers, and the switcher calculates the sum of two multiplied numbers and the sum of two multiplied numbers. Output in this order,
The square calculator squares and outputs the numerical value input from the switching device, and the polarity controller outputs the sign of the numerical value input from the square calculator in the order of input, "negative""negative"" The value is converted to "positive" and output, the second adder adds and outputs the value input from the polarity controller, the register stores the value input from the second adder, and the divider enters the register. Since it is a multiplier that divides the value stored in 2 by 2 and outputs it, even if the number to be multiplied increases and the number of bits increases, only the contents of the squaring calculator will remain unchanged without changing the overall configuration. By changing the number, there is an effect that the number of parts can be easily increased and the size can be reduced without increasing the number of parts.

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

【図1】本発明に係る乗算器の構成ブロック図である。FIG. 1 is a configuration block diagram of a multiplier according to the present invention.

【図2】従来の乗算器の構成ブロック図である。FIG. 2 is a configuration block diagram of a conventional multiplier.

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

1,5,10…加算器、 2…切替器、 3…2乗計算
器、 4…極性制御器、 6…レジスタ、 7…除算
器、 8…シフトレジスタ、 9…スイッチ
1, 5, 10 ... Adder, 2 ... Switcher, 3 ... Square calculator, 4 ... Polarity controller, 6 ... Register, 7 ... Divider, 8 ... Shift register, 9 ... Switch

───────────────────────────────────────────────────── フロントページの続き (72)発明者 占部 健三 東京都中野区東中野三丁目14番20号 国際 電気株式会社内 ─────────────────────────────────────────────────── ─── Continuation of the front page (72) Inventor Kenzo Urabe 3-14-20 Higashi-Nakano, Nakano-ku, Tokyo Kokusai Electric Co., Ltd.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 2つの乗算される数の和を計算する第一
の加算器と、前記2つの乗算される数、前記2つの乗算
される数の和の順序で出力する切替器と、前記切替器か
ら入力された数値を2乗して出力する2乗計算器と、前
記2乗計算器から入力された数値の符号を、入力された
順序で、「負」「負」「正」に変換して出力する極性制
御器と、前記極性制御器から入力された数値を加算して
出力する第二の加算器と、前記第二の加算器から入力さ
れた値を格納するレジスタと、前記レジスタに格納され
ている値を2で割って出力する除算器とを有することを
特徴とする乗算器。
1. A first adder for calculating the sum of two multiplied numbers, a switch for outputting the two multiplied numbers, and a switch for outputting the sum of the two multiplied numbers in order. The square calculator that squares and outputs the numerical value input from the switching device, and the sign of the numerical value input from the square calculator are “negative”, “negative”, and “positive” in the input order. A polarity controller for converting and outputting, a second adder for adding and outputting the numerical values input from the polarity controller, a register for storing the value input from the second adder, and And a divider that divides the value stored in the register by 2 and outputs the divided value.
JP7215938A 1995-08-24 1995-08-24 Multiplier Pending JPH0962489A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP7215938A JPH0962489A (en) 1995-08-24 1995-08-24 Multiplier

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7215938A JPH0962489A (en) 1995-08-24 1995-08-24 Multiplier

Publications (1)

Publication Number Publication Date
JPH0962489A true JPH0962489A (en) 1997-03-07

Family

ID=16680753

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7215938A Pending JPH0962489A (en) 1995-08-24 1995-08-24 Multiplier

Country Status (1)

Country Link
JP (1) JPH0962489A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11669304B2 (en) 2021-02-08 2023-06-06 Kioxia Corporation Arithmetic device and arithmetic circuit for performing multiplication and division

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11669304B2 (en) 2021-02-08 2023-06-06 Kioxia Corporation Arithmetic device and arithmetic circuit for performing multiplication and division

Similar Documents

Publication Publication Date Title
US6233597B1 (en) Computing apparatus for double-precision multiplication
AU2005256094A1 (en) Division and square root arithmetic unit
KR940001147B1 (en) OPERATING METHOD AND APPARATUS FOR GF(2m)
JP3345894B2 (en) Floating point multiplier
US4346451A (en) Dual moduli exponent transform type high speed multiplication system
JPH05134851A (en) Multiplying circuit output system
JPS595350A (en) Combined multiplier
Parodi et al. Synthesis of multiport resistors with piecewise‐linear characteristics: a mixed‐signal architecture
JPH09325955A (en) Square root arithmetic circuit for sum of squares
JPH0962489A (en) Multiplier
JPS58137045A (en) Parallel multiplier
JPS63219066A (en) Orthogonal transforming device
KR100480997B1 (en) APPARATUS OF FIELD MULTIPLICATION OVER GF(p) AND GF(2^m)
US6775685B1 (en) Method and apparatus for calculating energy in a-law or μ-law encoded speech signals
JPH0784762A (en) Multiplication circuit
JPS6222178A (en) Multiplier for multiplying two complex numbers
SU972517A1 (en) Device for performing rapid fourier transform
Priyadharshini et al. Retracted: Implementation of Distributed Arithmetic based Sum-of-Products
JPS58181143A (en) Digital multiplier
JP2519288B2 (en) Multiplier / divider
SU1737472A1 (en) Image brightness gradient evaluator
SU1005035A1 (en) Multiplication device
Sabu Comparitive study of RSD based and CSD based arithmetic modules of ECC
SU868751A1 (en) Multiplier
JP2001092810A (en) Complex multiplier and complex correlator