JPS62128334A - Multiplication circuit - Google Patents

Multiplication circuit

Info

Publication number
JPS62128334A
JPS62128334A JP60268328A JP26832885A JPS62128334A JP S62128334 A JPS62128334 A JP S62128334A JP 60268328 A JP60268328 A JP 60268328A JP 26832885 A JP26832885 A JP 26832885A JP S62128334 A JPS62128334 A JP S62128334A
Authority
JP
Japan
Prior art keywords
input
multiplier
output
selector
product
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
JP60268328A
Other languages
Japanese (ja)
Inventor
Masayoshi Hiraguchi
平口 正義
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP60268328A priority Critical patent/JPS62128334A/en
Publication of JPS62128334A publication Critical patent/JPS62128334A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To execute a multiplication with a double efficiency in a short time without increasing a circuit scale at all by adding a selection circuit at the periphery of a multiplier of conventional type. CONSTITUTION:A multiplier 1 has the same performance as a conventional type of multiplier which performs multiplication between multipliers K1KN and multiplicands L1-LN and outputs multiplication results M1-M2N-1. A selector 2 is a selector provided at the multiplicand input side of the multiplier 1, and outputs an input A to an output Y when a select input S is 0, and an input B to the output Y when the select input S is 1. 0 is always inputted to the MSB input A of the selector 2, and multiplicands l1-lN are inputted to the input terminal of the selector 2. A selector 3 is a selector provided at the multiplication result output side of the multiplier 1, and similarly as the selector 2, it outputs the input A to the output Y when the select input S is '0', and the input B to the output Y when the select input S is '1'. 0 is always inputted to the LSB input A of the selector 3.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は乗算回路に関し、特に2の補数表示による数値
を用いるディジタルの乗算回路に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a multiplication circuit, and more particularly to a digital multiplication circuit that uses numerical values expressed in two's complement notation.

〔従来の技術〕[Conventional technology]

ディジタル信号処理を行う場合、重要な構成要素となる
ものの1つに乗算回路がある。近年、一般的に処理速度
の高速な並列乗算回路が多く用いられている。また乗算
回路を内臓した演算処理専用のシグナルプロセッサも出
現しており、複雑な演算処理を実時間で行えるようにな
った。
When performing digital signal processing, one of the important components is a multiplication circuit. In recent years, parallel multiplication circuits that generally have high processing speeds have been widely used. In addition, signal processors dedicated to arithmetic processing with built-in multiplication circuits have appeared, making it possible to perform complex arithmetic processing in real time.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

しかしながら現在広く用いられている乗算回路は乗数の
語長が14〜16bit  (ビット)程度のものがほ
とんどで、それ以上の語長による乗算を行う場合、倍精
度演算を行う必要がある。シグナルプロセッサの場合、
単精度の乗算は普通1命令サイクルで実行できるのがほ
とんどであるが、倍精度乗算を行う場合にはIO〜20
ステップ程かかってしまう。
However, most of the multiplier circuits that are currently widely used have a word length of the multiplier of about 14 to 16 bits, and when performing multiplication with a word length longer than that, it is necessary to perform double precision arithmetic. For signal processors,
Most single-precision multiplications can normally be executed in one instruction cycle, but double-precision multiplications require IO to 20
It takes about a step.

本発明の目的は従来の2の補数表示を用いる乗算回路を
一部変更することにより、はとんど回路規模を増すこと
なく、倍精度乗算を短時間で実行できる乗算回路を提供
することにある。
An object of the present invention is to provide a multiplication circuit that can perform double-precision multiplication in a short time without increasing the circuit scale by partially modifying a conventional multiplication circuit that uses two's complement representation. be.

〔問題点を解決するための手段〕[Means for solving problems]

本発明の乗算回路は、2のト市数表示による第1の入力
データに1〜KNと第2の入力データL1〜L8との積
の2の補数表示のM1〜MN4M−1を出力する乗算器
(ここでに+、L1M+がそれぞれ最下位ビットを表わ
す)と、この乗算器の前記第2の入力データの入力側に
設けられ、最上位ビットに0が与えられ、この最上位ビ
ットを含めて前記第2の入力データを選択する第1のセ
レクタと、前記乗算器の出力側に設けられ、最下位ビッ
トに0あるいは1が与えられ、この最下位ビットを含め
て前記積を選択する第2のセレクタと、前記第2のセレ
クタの出力端子に加えて、前記乗算器の積の最上位ビッ
トが出力されるM個の出力端子どを(藺えることを特徴
としている。
The multiplication circuit of the present invention outputs M1 to MN4M-1 in two's complement representation of the product of 1 to KN and second input data L1 to L8 to first input data in 2's G city number representation. (here, + and L1M+ respectively represent the least significant bits) and the second input data input side of this multiplier, the most significant bit is given 0, and the most significant bit is included. a first selector that selects the second input data using a first selector; In addition to the output terminal of the second selector, the multiplier has M output terminals to which the most significant bit of the product of the multiplier is output.

〔実施例〕〔Example〕

以下図面を参照しながら本発明の実施例を詳述する。 Embodiments of the present invention will be described in detail below with reference to the drawings.

第1図は本発明の一実施例を示すブロック図である。FIG. 1 is a block diagram showing one embodiment of the present invention.

乗算器1は乗数に、〜に、 (K、はLSB、2の補数
表示)と被乗数L1〜LM (L、はLSB、2の補数
表示)の乗算を行い乗算結果M1〜M2.l−I(Ml
はLSB、2の補数表示)を出力する従来タイプの乗算
器と同じ機能を有する。ここで、LSBは最下位ビット
である。
Multiplier 1 multiplies the multiplier by the multiplicands L1-LM (L, LSB, 2's complement) and the multiplicands L1-LM (L, LSB, 2's complement), and produces the multiplication results M1-M2. l-I(Ml
has the same function as a conventional type multiplier that outputs LSB, two's complement representation). Here, LSB is the least significant bit.

セレクタ2は乗算器1の被乗数入力側に設けられたセレ
クタであり、セレクト入力Sが0のとき入力へを出力Y
に、セレクト入力Sが1のとき入力Bを出力Yに出力す
る。このセレクタ2のMSB(最上位ビット)入力Aに
は常に0を入れておく。このセレクタの入力側子には被
乗数!、〜bが入力される。セレクタ3は乗算器1の乗
算結果出力側に設けられたセレクタであり、セレクタ2
と同様、セレクト入力Sが「0」のとき入力へを出力Y
に、セレクト入力SがrlJのとき入力Bを出力Yに出
力する。このセレクタ3のLSB入力入力は常に0を入
れておく。
Selector 2 is a selector provided on the multiplicand input side of multiplier 1, and when select input S is 0, it outputs Y to the input.
Input B is output to output Y when select input S is 1. The MSB (most significant bit) input A of this selector 2 is always set to 0. The input child of this selector is the multiplicand! , ~b are input. Selector 3 is a selector provided on the multiplication result output side of multiplier 1, and selector 2
Similarly, when select input S is "0", output Y
Input B is output to output Y when select input S is rlJ. The LSB input of this selector 3 is always set to 0.

本実施例の動作を説明するにあたり、比較する意味で、
2の補数表示の従来タイプの乗算器と演算論理ユニット
A L U (Arithmet、ic Logic 
Unit )を含むシグナルプロセッサにおいて、2の
補数表示の単精度データF1〜F+、と倍精度デークロ
1〜G2Mとを乗算する場合について考える。先ずF。
In explaining the operation of this embodiment, for comparison purposes,
A conventional type multiplier with two's complement representation and an arithmetic logic unit ALU (Arithmet, ic Logic
Let us consider the case where, in a signal processor including unit ), single-precision data F1 to F+ in two's complement representation are multiplied by double-precision data F1 to G2M. First of all, F.

〜F sとG1〜GNの積を求め、さらにF、〜FNと
6941〜G2Nの積を求め両者を加算することによっ
て倍精度乗算を行うが、このとき、乗算器は入力データ
のMSB(最上位ビット)をSign Bit (サイ
ンビット)と判断する為、F1〜FM とG1〜G。
Double-precision multiplication is performed by finding the product of ~F s and G1 ~ GN, and then finding the product of F, ~FN, and 6941 ~ G2N and adding both. At this time, the multiplier calculates the MSB (most F1 to FM and G1 to G in order to determine the upper bit) as the Sign Bit.

の積を求める際に、G1〜GNを1ビツト下位ヘシフト
し、MSBに0を入れておく必要がある。このシフト及
びMSBに0を入れる操作はΔLUを用いて行われる。
When calculating the product, it is necessary to shift G1 to GN to the lower part by 1 bit and put 0 in the MSB. This shift and the operation of putting 0 in the MSB are performed using ΔLU.

さらに入力でG I−G MをlビニIト下位シフトし
たため、乗算結果を1ビツト上位シフトして位取りを合
わせる必要がある。こうして求めた乗算結果と、2番目
の計算であるF、〜F、lとGN−+ −G2gとの積
を加算して倍精度乗算の結果を求める。もちろんF1〜
FMと61〜Gmの債はF1〜FM とGM+l〜02
Nの積に対してNビット下位に位置するものである。F
1〜FMと61〜GWの債とF、−F、 (!:G、、
−G2おの債との和を求めるとき、F、〜FNとG、−
G、Iの債が正及び零の場合には、F、〜FNと61〜
G8の積の上位にNビットのOを、F1〜F9とG +
 −G Nの積が負の場合にはF l” F NとG、
〜GNの積の上位にNビットの1を拡張してからF1〜
FM と68゜1〜G2Nの積との和を求める。これら
の操作もALLIを用いて別の命令サイクルで行われる
Furthermore, since G I - G M is shifted down by 1 bit I at the input, it is necessary to shift the multiplication result up 1 bit to match the scale. The result of the double-precision multiplication is obtained by adding the thus obtained multiplication result and the second calculation, the product of F, ˜F, l and GN−+ −G2g. Of course F1~
FM and 61~Gm bonds are F1~FM and GM+l~02
It is located N bits lower than the product of N. F
1~FM and 61~GW bonds and F, -F, (!:G,,
- When finding the sum of G2's bonds, F, ~FN and G, -
If the bonds of G and I are positive and zero, F, ~FN and 61~
Add N bits of O to the upper part of the product of G8, F1 to F9 and G +
-G If the product of N is negative, F l” F N and G,
~Extend N bits of 1 to the upper part of the product of GN, then F1~
Find the sum of FM and the product of 68°1~G2N. These operations are also performed in separate instruction cycles using ALLI.

このように、従来タイプのシグナルプロセッザの場合に
は、倍精度の乗算を行うために、2回の単精度乗算を行
う命令サイクル及びそれらの積の和を求める命令サイク
ル以外に、上記したように多数の操作が必要となり、結
果的に非常に時間がかかってしまう。
In this way, in the case of conventional type signal processors, in order to perform double-precision multiplication, in addition to the instruction cycle that performs two single-precision multiplications and the instruction cycle that calculates the sum of their products, the above-mentioned instruction cycle is used. This requires a large number of operations, and as a result, it takes a lot of time.

次に本実施例の動作を説明する。先ず、F、〜FNとG
、−G、との積を求める場合、F1〜FNを乗算回路の
乗数入力に、〜KNに入力し、61〜GNを乗算回路の
被乗数入力β1〜1.Iに入力する。このとき、セレク
タ2および3のセレクト入力Sに入力する選択信号Sl
−をOとずれば、セレクタ2および3は入力Aを選択す
る。従って、乗算器lの入力L1〜LMには、G、〜G
Nを1ビツト下位ヘシフトし、MSBに0を入れたデー
タが入力される。乗算器1における乗算結果である積M
1〜M2M−0はセレクタ3に送られるが、セレクタは
入力Aを選択しているので、1ビツト上位ヘシフトされ
て、積M1〜M211−2がセレクタ3の出力02〜0
2N−1に出力される。セレクタ3の出力01には0が
出力される。積の最上位ビットM2N−1は乗算回路の
出力028〜03N−1に出力される。以上のように、
F1〜F9とG1〜Gやの積を求める際、選択信号SL
を0とすれば、上述したG、〜Gつの下位シフト及びM
SBへの0のセット、乗算結果の上位シフト及び上位N
ビットの0及び1の拡張が1命令サイクルで行えるため
、演算時間を大幅に減少させることができる。次に、F
l−FMとGM+l 〜G2Nとの積を求める場合、F
 + −F sを乗算回路の乗数入力に1〜に8に入力
し、G、I+t〜G2Nを乗算回路の被乗数入力11〜
MN+MNに入力する。このとき、セレクタ2および3
のセレクト入力Sに入力する選択信号SLを1とすれば
、セレクタ2および3は入力Bを選択する。従って、乗
算器1の入力L1〜LMには、Cz〜G2がそのまま入
力される。
Next, the operation of this embodiment will be explained. First, F, ~FN and G
, -G, input F1 to FN to the multiplier inputs of the multiplier circuit and ~KN, and input 61 to GN to the multiplicand inputs β1 to 1 . Enter in I. At this time, the selection signal Sl input to the selection inputs S of selectors 2 and 3
If - is shifted from O, selectors 2 and 3 select input A. Therefore, the inputs L1 to LM of the multiplier l have G, to G
Data is input by shifting N by 1 bit to the lower order and putting 0 in the MSB. The product M which is the multiplication result in multiplier 1
1 to M2M-0 are sent to the selector 3, but since the selector has selected input A, they are shifted one bit upwards, and the products M1 to M211-2 are sent to the outputs 02 to 0 of the selector 3.
2N-1. 0 is output to the output 01 of the selector 3. The most significant bit M2N-1 of the product is output to outputs 028-03N-1 of the multiplier circuit. As mentioned above,
When calculating the product of F1 to F9 and G1 to G, select signal SL
is 0, then the above G, ~G lower shifts and M
Setting 0 to SB, upper shift of multiplication result and upper N
Since bits can be expanded to 0 and 1 in one instruction cycle, the calculation time can be significantly reduced. Next, F
When calculating the product of l-FM and GM+l ~G2N, F
+ -F s is input to the multiplier input of the multiplier circuit from 1 to 8, and G, I+t to G2N is input to the multiplicand input from 11 to 8 of the multiplier circuit.
Enter MN+MN. At this time, selectors 2 and 3
If the selection signal SL input to the selection input S of is 1, selectors 2 and 3 select input B. Therefore, Cz to G2 are input to the inputs L1 to LM of the multiplier 1 as they are.

乗算器1における乗算結果である積M、〜M2H−1は
セレクタ3に送られるが、セレクタは入力Bを選択して
いるので、積M1〜M2N−1がセレクタ3の出力01
〜0゜N−1にそのまま出力される。さらに、積の最上
位ピッ)M2R−1は乗算回路の出力02N〜03N 
−1に出力される。以上のように、F1〜FNとGM。
The product M, ~M2H-1, which is the multiplication result in the multiplier 1, is sent to the selector 3, but since the selector has selected input B, the product M1 ~ M2N-1 is the output 01 of the selector 3.
~0°N-1 is output as is. Furthermore, the most significant pin of the product (M2R-1) is the output 02N~03N of the multiplication circuit.
-1 is output. As mentioned above, F1 to FN and GM.

1〜G2Nの積を求める際には選択信号SLを1とすれ
ば良い。本実施例によれば、命令語として選択信号SL
の0およびlを指定する必要はあるが、乗算器1の周辺
に追加する回路は第1図から明らかなように微少であり
、それに比して得られる効果が大きい特徴がある。
When calculating the product of 1 to G2N, the selection signal SL may be set to 1. According to this embodiment, the selection signal SL is used as the command word.
Although it is necessary to specify 0 and l, the circuit added around the multiplier 1 is small, as is clear from FIG. 1, and the effect obtained is large in comparison.

〔発明の効果〕〔Effect of the invention〕

以上説明したように本発明は、従来のタイプの乗算器の
周辺に選択回路を追加するだけで、倍精度乗算を短時間
で且つ確実に実行できるという効果がある。
As described above, the present invention has the advantage that double precision multiplication can be executed reliably in a short time by simply adding a selection circuit around a conventional type multiplier.

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

第1図は本発明の一実施例を示すブロック図である。 FIG. 1 is a block diagram showing one embodiment of the present invention.

Claims (2)

【特許請求の範囲】[Claims] (1)2の補数表示による第1の入力データK_1〜K
_Nと第2の入力データL_1〜L_Mとの積の2の補
数表示のM_1〜M_N_+_M_−_1を出力する乗
算器(ここでK_1、L_1、M_1、がそれぞれ最下
位ビットを表わす)と、この乗算器の前記第2の入力デ
ータの入力側に設けられ、最上位ビットに0が与えられ
、この最上位ビットを含めて前記第2の入力データを選
択する第1のセレクタと、前記乗算器の出力側に設けら
れ、最下位ビットに0あるいは1が与えられ、この最下
位ビットを含めて前記積を選択する第2のセレクタと、
前記第2のセレクタの出力端子に加えて、前記乗算器の
積の最上位ビットが出力されるM個の出力端子とを備え
ることを特徴とする乗算回路。
(1) First input data K_1 to K in two's complement representation
A multiplier that outputs M_1 to M_N_+_M_-_1 in two's complement representation of the product of _N and second input data L_1 to L_M (here, K_1, L_1, and M_1 each represent the least significant bit), and this multiplier a first selector provided on the input side of the second input data of the multiplier, whose most significant bit is given 0, and which selects the second input data including this most significant bit; a second selector provided on the output side, whose least significant bit is given 0 or 1, and selects the product including the least significant bit;
A multiplication circuit comprising, in addition to the output terminal of the second selector, M output terminals from which the most significant bit of the product of the multiplier is output.
(2)特許請求の範囲第1項に記載の乗算回路において
、前記第1および第2のセレクタへの選択信号がオンの
場合、前記第2の入力データL_1〜L_Mを1ビット
下位へシフトし最上位ビットに0を与え、前記乗算器に
前記第1の入力データにK_1〜K_Nと、前記第2の
入力データL_2〜L_M、及び最上位ビット0との積
M_1〜M_N_+_M_−_1を出力せしめ、さらに
、前記積M_1〜M_N_+_M_−_1を1ビット上
位へシフトせしめ、乗算回路の出力として最下位ビット
出力O_1に0あるいは1、前記積M_1〜M_N_+
_M_−_2を出力O_2〜O_N_+_M_−_1に
出力せしめ、さらに前記積の最上位ビットM_N_+_
M_−_1を出力O_N_+_M〜O_N_+_2_M
_−_1に出力せしめ、また前記選択信号がオフの場合
、前記第1の入力データK_1〜K_Nと第2の入力デ
ータL_1〜L_Mとの積M_1〜M_N_+_M_−
_1を出力O_1〜O_N_+_M_−_1に出力し、
さらに前記積の最上位ビットM_N_+_M_−_1を
出力O_N_+_M〜O_N_+_2_M_−_1に出
力することを特徴とする乗算回路。
(2) In the multiplication circuit according to claim 1, when the selection signals to the first and second selectors are on, the second input data L_1 to L_M are shifted one bit lower. Give 0 to the most significant bit and cause the multiplier to output the product M_1 to M_N_+_M_-_1 of the first input data K_1 to K_N, the second input data L_2 to L_M, and the most significant bit 0. , Furthermore, the products M_1 to M_N_+_M_-_1 are shifted to the upper bit by 1 bit, and the least significant bit output O_1 is set to 0 or 1 as the output of the multiplication circuit, and the products M_1 to M_N_+
_M_-_2 is outputted to the outputs O_2 to O_N_+_M_-_1, and the most significant bit M_N_+_ of the product is
Output M_-_1 O_N_+_M ~ O_N_+_2_M
___1, and when the selection signal is off, the product M_1 to M_N_+_M_- of the first input data K_1 to K_N and the second input data L_1 to L_M.
Output _1 to outputs O_1 to O_N_+_M_-_1,
The multiplication circuit further comprises outputting the most significant bit M_N_+_M_-_1 of the product to outputs O_N_+_M to O_N_+_2_M_-_1.
JP60268328A 1985-11-30 1985-11-30 Multiplication circuit Pending JPS62128334A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60268328A JPS62128334A (en) 1985-11-30 1985-11-30 Multiplication circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60268328A JPS62128334A (en) 1985-11-30 1985-11-30 Multiplication circuit

Publications (1)

Publication Number Publication Date
JPS62128334A true JPS62128334A (en) 1987-06-10

Family

ID=17457015

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60268328A Pending JPS62128334A (en) 1985-11-30 1985-11-30 Multiplication circuit

Country Status (1)

Country Link
JP (1) JPS62128334A (en)

Similar Documents

Publication Publication Date Title
JPH1195981A (en) Multiplication circuit
US4556948A (en) Multiplier speed improvement by skipping carry save adders
JPS6132437Y2 (en)
JP3345894B2 (en) Floating point multiplier
US5870322A (en) Multiplier to selectively perform unsigned magnitude multiplication or signed magnitude multiplication
JPH07107664B2 (en) Multiplication circuit
US6202078B1 (en) Arithmetic circuit using a booth algorithm
JPH0346024A (en) Floating point computing element
JPS62128334A (en) Multiplication circuit
JP3127654B2 (en) Multiplier / divider
JPS58137045A (en) Parallel multiplier
JPS6222178A (en) Multiplier for multiplying two complex numbers
JPH0784762A (en) Multiplication circuit
JPS62154029A (en) Multiplier circuit
JP2972326B2 (en) Square root calculator
JPS6222144A (en) Decimal arithmetic circuit
JPS63254525A (en) Dividing device
JP2537876B2 (en) Rounding circuit
JPH02148326A (en) Multiplier
JP2654062B2 (en) Information processing device
JPS62159224A (en) Arithmetic circuit for floating point
JPH04328630A (en) Floating point multiplication/division device
JPH0440521A (en) Multiplier
JPS6152741A (en) Multiplication circuit with shift function
JPH01232430A (en) Arithmetic circuit