JPH08314697A - Multiplier used for both number with sign and number withoutsign - Google Patents

Multiplier used for both number with sign and number withoutsign

Info

Publication number
JPH08314697A
JPH08314697A JP8117487A JP11748796A JPH08314697A JP H08314697 A JPH08314697 A JP H08314697A JP 8117487 A JP8117487 A JP 8117487A JP 11748796 A JP11748796 A JP 11748796A JP H08314697 A JPH08314697 A JP H08314697A
Authority
JP
Japan
Prior art keywords
partial product
multiplier
multiplicand
multiplication
digit
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
JP8117487A
Other languages
Japanese (ja)
Inventor
Kim Jae-Yoon
載 潤 金
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.)
Samsung Electronics Co Ltd
Original Assignee
Samsung Electronics 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 Samsung Electronics Co Ltd filed Critical Samsung Electronics Co Ltd
Publication of JPH08314697A publication Critical patent/JPH08314697A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • G06F7/48Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
    • G06F7/52Multiplying; Dividing
    • G06F7/523Multiplying only
    • G06F7/533Reduction of the number of iteration steps or stages, e.g. using the Booth algorithm, log-sum, odd-even
    • G06F7/5334Reduction of the number of iteration steps or stages, e.g. using the Booth algorithm, log-sum, odd-even by using multiple bit scanning, i.e. by decoding groups of successive multiplier bits in order to select an appropriate precalculated multiple of the multiplicand as a partial product
    • G06F7/5336Reduction of the number of iteration steps or stages, e.g. using the Booth algorithm, log-sum, odd-even by using multiple bit scanning, i.e. by decoding groups of successive multiplier bits in order to select an appropriate precalculated multiple of the multiplicand as a partial product overlapped, i.e. with successive bitgroups sharing one or more bits being recoded into signed digit representation, e.g. using the Modified Booth Algorithm
    • G06F7/5338Reduction of the number of iteration steps or stages, e.g. using the Booth algorithm, log-sum, odd-even by using multiple bit scanning, i.e. by decoding groups of successive multiplier bits in order to select an appropriate precalculated multiple of the multiplicand as a partial product overlapped, i.e. with successive bitgroups sharing one or more bits being recoded into signed digit representation, e.g. using the Modified Booth Algorithm each bitgroup having two new bits, e.g. 2nd order MBA
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • G06F7/48Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
    • G06F7/52Multiplying; Dividing

Abstract

PROBLEM TO BE SOLVED: To provide a multiplier with which multiplication is performed selectively between signed/unsigned numbers by applying a corrected booth algorithm. SOLUTION: A multiplier is composed of an encoder 22 which generates a recod digit from a multiplier B, a shifting/inverting unit 24 which generates a partial product by shifting/inverting a multiplicand A in accordance with the recod digit, a first partial product generator 25 which performs arithmetic operation in accordance with the recod digit and adds the results of the arithmetic operation to the partial product outputted front the unit 24, second to fourth partial product generators 26-28 which are successively connected to the output of the generator 25 and generate partial products by adding the output data of the preceding stage to the result of arithmetic operation performed on the multiplicand following the recode digit, a sign transmitting unit 23 which integrates the partial product to the extended sign bit of the multiplicand A, and a selector 21 which discriminates whether multiplicand is to be performed between signed or unsigned numbers from a select signal and provides extended signal bits to the multiplier B and multiplicand A.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は乗算器に係り、より
詳しくは、乗算のための修正ブース・アルゴリズム(mo
dified Booth algorithm)を適用して符号付き数(sign
ed number )間の乗算と符号なし数(unsigned number
)間の乗算を選択的に行なえる符号付き/符号なし数
兼用乗算器に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a multiplier, and more particularly to a modified Booth algorithm (mo
Apply the dified Booth algorithm) and apply the signed number (sign
ed number) and the unsigned number (unsigned number)
), The present invention relates to a signed / unsigned number-use multiplier capable of selectively performing multiplication between the two).

【0002】[0002]

【従来の技術】乗算はイメージデータを処理するデジタ
ル信号プロセッシング(DSP:DigitalSignal Processin
g)において必須の演算のうちの一つである。
2. Description of the Related Art Multiplication is a digital signal processing (DSP) process for processing image data.
This is one of the essential operations in g).

【0003】実際、中央処理ユニット(CPU)内にあ
る算術論理演算ユニット(ALU)のような演算を主と
するユニットは乗算器を必要とし、この乗算器は符号付
き数間の乗算と符号なし数間の乗算を選択的に行なわな
ければならない。
In practice, arithmetic units such as arithmetic and logic units (ALUs) in central processing units (CPUs) require multipliers, which multiply between signed numbers and unsigned. The multiplication between numbers must be done selectively.

【0004】符号付き数間の乗算と符号なし数間の乗算
を算術論理演算ユニット内において実現するための方法
として、符号なし数用乗算器と符号付き数用乗算器の両
方を使用する方法がある。しかしながら、この方法は二
つの乗算器が用いられるので回路スペースが浪費される
という短所がある。
As a method for realizing multiplication between signed numbers and multiplication between unsigned numbers in an arithmetic logic operation unit, there is a method of using both the multiplier for unsigned numbers and the multiplier for signed numbers. is there. However, this method has a disadvantage that circuit space is wasted because two multipliers are used.

【0005】符号付き数間の乗算と符号なし数間の乗算
を算術論理演算ユニット内において実現するための他の
方法として、符号付き数間の乗算結果と符号なし数間の
乗算結果の差を補償せしめるため別途、追加回路を構成
する方法がある。
As another method for realizing the multiplication between signed numbers and the multiplication between unsigned numbers in an arithmetic logic operation unit, the difference between the multiplication result between signed numbers and the multiplication result between unsigned numbers is calculated. There is a method of separately configuring an additional circuit for compensation.

【0006】この方法は、ある乗数の最上位ビット(M
SB)が「1」である場合に他の乗数の最上位ビットを
除いた残りのビットが最終の乗算結果に加わるようにす
るものである。しかしながら、この方法もまた、アレイ
乗算器の長所といえるスクエア・レイアウトを得難いと
いう短所を有する。
In this method, the most significant bit (M
When SB) is "1", the remaining bits except the most significant bit of other multipliers are added to the final multiplication result. However, this method also has a disadvantage that it is difficult to obtain the square layout which is the advantage of the array multiplier.

【0007】一方、米国特許第5, 153, 850号
(“METHOD AND APPARATUS FOR MODIFYING TWO′S COMP
LEMENT MULTIPLIER TO PERFORM UNSIGNED MAGNITUDE MU
LTIPLICATION ”)には、符号なし数間の乗算および2
の補数間の乗算を行なう乗算器が開示されている。
On the other hand, US Pat. No. 5,153,850 ("METHOD AND APPARATUS FOR MODIFYING TWO'S COMP
LEMENT MULTIPLIER TO PERFORM UNSIGNED MAGNITUDE MU
LTIPLICATION ”) includes multiplication between unsigned numbers and 2
A multiplier for performing multiplication between the complements of is disclosed.

【0008】この米国特許は、符号なし数間の乗算と2
の補数間の乗算を選択的に行なうことができるようにす
るため、付加回路によって2の補数間の乗算結果を修正
して符号なし数の結果を得るようにしている。
This US patent describes multiplication between unsigned numbers and 2
In order to selectively perform the multiplication between the two's complements, an addition circuit corrects the multiplication result between the two's complements to obtain an unsigned number result.

【0009】また、乗算に関するアルゴリズムとして修
正ブース・アルゴリズムがマクロ・アナラトン(Macro
Annaratone)著の“Digital CMOS Circuit Design ”
(pp211〜221)に開示されている。
As a multiplication algorithm, the modified Booth's algorithm is Macro
Annaratone) 's "Digital CMOS Circuit Design"
(Pp 211-221).

【0010】修正ブース・アルゴリズムはリコード・ア
ルゴリズム(recoding algorithm)の一種であって、乗
数を所定のビット組に区分し、各ビット組に対応する演
算を被乗数に対し行い中間結果である部分積を得て、各
ビット組に対し発生する部分積を加算して乗数と被乗数
の乗算による最終の結果を得る。この修正ブース・アル
ゴリズムは、乗算において「0」が何ら影響を及ばない
点を考慮したものであって、乗算の演算速度を改善する
ことができる。以下、添付図面を参照して既存のブース
・アルゴリズムを適用した2の補数乗算器について説明
する。
The modified Booth algorithm is a kind of recoding algorithm, in which a multiplier is divided into a predetermined bit set, an operation corresponding to each bit set is performed on a multiplicand, and a partial product which is an intermediate result is obtained. Then, the partial products generated for each bit set are added together to obtain the final result of the multiplication of the multiplier and the multiplicand. This modified Booth algorithm takes into account that "0" has no effect on multiplication, and can improve the operation speed of multiplication. Hereinafter, a two's complement multiplier to which the existing Booth algorithm is applied will be described with reference to the accompanying drawings.

【0011】図2は通常の2の補数乗算器の構成ブロッ
ク図である。同図に示すように、通常の2の補数乗算器
は、エンコーダ1、符号伝送ユニット2、シフト・反転
ユニット3、第1ないし第3部分積発生器4、5、6お
よびキャリー・ルック・アヘッド加算器7からなる。な
お、図2に示す乗算器は8×8乗算器であり、Aは被乗
数、Bは乗数を表す。
FIG. 2 is a block diagram showing the configuration of a normal 2's complement multiplier. As shown in the figure, a normal 2's complement multiplier includes an encoder 1, a code transmission unit 2, a shift / inversion unit 3, first to third partial product generators 4, 5, 6 and a carry look ahead. It consists of an adder 7. The multiplier shown in FIG. 2 is an 8 × 8 multiplier, where A is the multiplicand and B is the multiplier.

【0012】8ビットの乗数Bが入力されるエンコーダ
1は、3ビットずつ区分された乗数のビットの組をコー
ディングしてビット組に対応するリコード・デジット
(−2x, −1x, 0x, +1x, +2x)の集合を生
成する。
The encoder 1 to which the 8-bit multiplier B is input encodes a group of bits of the multiplier divided into 3 bits to generate a recoding digit (-2x, -1x, 0x, + 1x, + 2x) set is generated.

【0013】このリコード・デジット集合の各リコード
・デジットはシフト・反転ユニット3及び第1ないし第
3部分積発生器4、5、6のうちの対応する一つに伝達
され、シフト・反転ユニット3及び第1ないし第3部分
積発生器4、5、6において8ビットの被乗数Aに対し
て該当する演算が行なわれる。このように行なわれる演
算の結果はキャリー・ルック・アヘッド加算器7を通じ
て外部に出力される。また、符号伝送ユニット2は被乗
数の拡張された符号ビットを処理するためのものであ
る。
Each recoded digit of this set of recoded digits is transmitted to the shift / inversion unit 3 and the corresponding one of the first to third partial product generators 4, 5, 6 to shift / invert unit 3. The corresponding operation is performed on the 8-bit multiplicand A in the first to third partial product generators 4, 5, and 6. The result of the operation performed in this way is output to the outside through carry look ahead adder 7. Further, the code transmission unit 2 is for processing the code bits in which the multiplicand is expanded.

【0014】[0014]

【発明が解決しようとする課題】しかしながら、前記の
ような乗算器では2の補数で表現された符号付き数間の
乗算は行なえるが、符号なし数間の乗算は行なえないと
いう短所がある。
However, the above-described multiplier has a disadvantage that it can multiply signed numbers represented by 2's complement, but cannot multiply unsigned numbers.

【0015】本発明の目的は、乗算のための修正ブース
・アルゴリズムを適用して符号付き数間の乗算と符号な
し数間の乗算を選択的に行なえる符号付き/符号なし数
兼用乗算器を提供することにある。
An object of the present invention is to provide a combined signed / unsigned number multiplier capable of selectively performing a multiplication between signed numbers and a multiplication between unsigned numbers by applying a modified Booth algorithm for multiplication. To provide.

【0016】[0016]

【課題を解決するための手段】本発明に係る符号付き/
符号なし数兼用乗算器は、乗数のビット組をコーディン
グして各ビット組に対応するリコード・デジットを生成
するエンコーダと、該エンコーダから伝送されるリコー
ド・デジットに従って被乗数のシフトおよび反転動作を
行い部分積を生成するシフト・反転ユニットと、前記エ
ンコーダから伝送されるリコード・デジットに従ってそ
れに対応する演算を被乗数に対して行い、この演算結果
を前記シフト・反転ユニットから出力される部分積に加
算して所定の部分積を生成する第1部分積発生器と、該
第1部分積発生器の出力に順に連結されて前段の出力デ
ータと伝送されたリコード・デジットに従った被乗数に
対する演算結果を加算して部分積をそれぞれ生成する第
2ないし第4部分積発生器と、前記シフト・反転ユニッ
トと前記第1ないし第4部分積発生器に接続されて被乗
数の拡張符号ビットに対する部分積を累積して加算する
符号伝送ユニットと、入力される選択信号によって符号
付き数間の乗算であるか符号なし数間の乗算であるかを
判別し、該判別結果に基づいて乗数と被乗数に拡張符号
ビットを提供する選択器とからなることを特徴とする。
Signed / according to the present invention
The unsigned multi-purpose multiplier is an encoder that codes a bit set of a multiplier to generate a recode digit corresponding to each bit set, and a shift and inversion operation of a multiplicand according to a recode digit transmitted from the encoder. A shift / inversion unit for generating a product and a corresponding operation are performed on the multiplicand according to the recode / digit transmitted from the encoder, and the operation result is added to the partial product output from the shift / inversion unit. A first partial product generator for generating a predetermined partial product, and an operation result for the multiplicand according to the output digit of the preceding stage, which is sequentially connected to the output of the first partial product generator and the transmitted recode digit, and is added. Second to fourth partial product generators for respectively generating partial products, the shift / inversion unit, and the first unit. A code transmission unit connected to the fourth partial product generator for accumulating and adding partial products for the extended code bits of the multiplicand, and multiplication between signed numbers or unsigned numbers depending on an input selection signal And a selector that provides extension code bits to the multiplier and the multiplicand based on the determination result.

【0017】更に、本発明に係る符号付き/符号なし数
兼用乗算器は、前記シフト・反転ユニット及び第1ない
し第3部分積発生器から出力されるキャリーと第4部分
積発生器から出力される和およびキャリーが入力され、
これを累積して加算するキャリー・ルック・アヘッド加
算器を含むことを特徴とする。
Further, the signed / unsigned number-use multiplier according to the present invention is such that the carry output from the shift / inversion unit and the first to third partial product generators and the fourth partial product generator output. Sum and carry are entered,
It is characterized by including a carry look ahead adder for accumulating and adding this.

【0018】[0018]

【発明の実施の形態】以下、本発明の実施の形態を添付
図面を参照しながら詳細に説明する。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

【0019】本発明による乗算器を説明する前に、8ビ
ット×8ビットの乗算を例に挙げて本発明の実施の形態
が適用される乗算過程について説明する。
Before describing the multiplier according to the present invention, the multiplication process to which the embodiment of the present invention is applied will be described by taking the multiplication of 8 bits × 8 bits as an example.

【0020】被乗数をA、乗数をBとし、(−4)×
(−2)の乗算を、符号付き数、符号なし数、2進数に
よって表現すると次のようになる。
Letting A be the multiplicand and B be the multiplier, (-4) ×
The multiplication of (-2) can be expressed as a signed number, an unsigned number, and a binary number as follows.

【0021】[0021]

【数1】 A × B (−4) × (−2) ・・・・符号付き数 +252 × +254 ・・・・符号なし数 1111 1100 × 1111 1110 ・・・・2進数## EQU00001 ## A.times.B (-4) .times. (-2) .... Signed number + 252.times. + 254 ..... Unsigned number 1111 1100.times.1111 1110 ..... Binary number

【0022】上記のように表現される符号付き数間の乗
算過程を数式で表現すると次のようになる。
The multiplication process between the signed numbers expressed as described above can be expressed by a mathematical expression as follows.

【0023】[0023]

【数2】 A 11|11|11|00 × B 11|11|11|10 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−− (−2x) 00|00|00|00|00|00|10|00 ( 0x) 00|00|00|00|00|00|00 ( 0x) 00|00|00|00|00|00 ( 0x) 00|00|00|00|00 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− P 00|00|00|00|00|00|10|00## EQU00002 ## A 11 | 11 | 11 | 00 × B 11 | 11 | 11 | 10 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−− -(-2x) 00 | 00 | 00 | 00 | 00 | 00 | 10 | 00 (0x) 00 | 00 | 00 | 00 | 00 | 00 | 00 (0x) 00 | 00 | 00 | 00 | 00 | 00 (0x) 00 | 00 | 00 | 00 | 00 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− P 00 | 00 | 00 | 00 | 00 | 00 | 10 | 00

【0024】上記数式において中間ブロックの左側の
(−2x)と(0x)は乗数のリコード・デジットであ
る。このリコード・デジットを得るには、まず、乗数の
三つのビットを一つのビット組に纏め、各ビット組が所
定のリコード・デジットのどれに該当するか判別する。
そのビット組を判別するテーブルは次のとおりである。
In the above formula, (-2x) and (0x) on the left side of the intermediate block are the recoded digits of the multiplier. In order to obtain this recode digit, first, the three bits of the multiplier are combined into one bit set, and it is determined which of the predetermined recode digits each bit set corresponds to.
The table for determining the bit set is as follows.

【0025】[0025]

【表1】 ビット(i+1) ビットi ビット(i−1) リコード・デジット 0 0 0 0x 0 0 1 +1x 0 1 0 +1x 0 1 1 +2x 1 0 0 −2x 1 0 1 −1x 1 1 0 −1x 1 1 1 0xTable 1 Bit (i + 1) Bit i Bit (i-1) Recode Digit 0 0 0 0xx 0 0 1 + 1x 0 1 0 + 1x 0 1 1 + 2x 1 0 0 -2x 1 0 1 -1x 1 1 0 -1x 1 1 1 0x

【0026】上記表のリコード・デジット0xは、部分
積に0を加算する演算を行い、リコード・デジット1x
は、部分積に被乗数Aを加算する演算を行い、リコード
・デジット2xは、部分積に2倍の被乗数2Aを加算す
る演算を行い、リコード・デジット(−1x)は部分積
から被乗数Aを引算する演算を行い、リコード・デジッ
ト(−2x)は部分積から2倍の被乗数2Aを引算する
演算を行なう。
The recode digit 0x in the above table performs the operation of adding 0 to the partial product, and the recode digit 1x.
Is an operation for adding a multiplicand A to the partial product, a recode digit 2x is an operation for adding a double multiplicand 2A to the partial product, and a recode digit (-1x) is a subtraction of the multiplicand A from the partial product. The recode digit (−2x) subtracts the double multiplicand 2A from the partial product.

【0027】これによって、乗数Bの上位ビットからリ
コード・デジット0x、0x、0x、(−2x)が順に
得られる。そして、(−2x)のリコード・デジットに
対応して行なわれる演算に必要な−2Aを得るため、A
を反転した後1を加算し、左側に1ビットシフトさせ
る。
As a result, the recoded digits 0x, 0x, 0x, (-2x) are obtained in order from the upper bits of the multiplier B. Then, to obtain -2A necessary for the operation performed corresponding to the (-2x) recoded digit,
After inverting, add 1 and shift 1 bit to the left.

【0028】このようにして、前記乗算においては四つ
の部分積が得られ、結果Pは十進数8になる。
Thus, in the multiplication, four partial products are obtained, and the result P becomes the decimal number 8.

【0029】一方、符号なし数間の乗算のためには入力
の符号ビットの前に2ビットを拡張しなければならな
い。これを数式で表現すると次のようになる。
On the other hand, for multiplication between unsigned numbers, two bits must be extended before the sign bit of the input. This can be expressed as a mathematical expression as follows.

【0030】[0030]

【数3】 A 00|11|11|11|00 × B 00|11|11|11|10 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− (−2x) 11|11|11|10|00|00|10|00 ( 0x) 00|00|00|00|00|00|00 ( 0x) 00|00|00|00|00|00 ( 0x) 00|00|00|00|00 (+1x) 11|11|11|00 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− P 11|11|10|10|00|00|10|00 A 00 | 11 | 11 | 11 | 00 × B 00 | 11 | 11 | 11 | 10 −−−−−−−−−−−−−−−−−−−−−−−−−− −−−−−− (−2x) 11 | 11 | 11 | 10 | 00 | 00 | 10 | 00 (0x) 00 | 00 | 00 | 00 | 00 | 00 | 00 (0x) 00 | 00 | 00 | 00 | 00 | 00 (0x) 00 | 00 | 00 | 00 | 00 (+ 1x) 11 | 11 | 11 | 00 −−−−−−−−−−−−−−−−−−−−−−−−− −−−−−−−− P 11 | 11 | 10 | 10 | 00 | 00 | 10 | 00

【0031】上記数式におけるリコード・デジットも乗
数のビット組から生成され、符号付き数間の乗算に比べ
部分積が一つ増加して五つになっている。乗数のビット
組は、上記乗算を例にすると、(001111111
0)である乗数Bに対し、各ビット組が一つのビットを
重畳されるようにして、(001)、(111)、(1
11)、(111)、(100)というビット組に区分
される。なお、最後のビット組が2ビットである場合に
は、ビット組のうち三番目のビットは0であるとする。
The recode digit in the above equation is also generated from the bit set of the multiplier, and the partial product is increased by one compared with the multiplication between the signed numbers to become five. Taking the above multiplication as an example, the bit set of the multiplier is (001111111).
For each multiplier B which is 0), one bit is superposed on each bit set, and (001), (111), (1
11), (111), and (100). When the last bit set is 2 bits, the third bit of the bit set is 0.

【0032】前記符号なし数間の乗算は、以下に数式で
表現する一般的な乗算過程と比べてみると、結果が正確
で、かつ、効率的であることがわかる。
It can be seen that the multiplication between the unsigned numbers is accurate and efficient in comparison with the general multiplication process expressed by the following formula.

【0033】[0033]

【数4】 A 11|11|11|00 × B 11|11|11|10 −−−−−−−−−−−−−−−−−−−−−−−−−−−− 00|00|00|00 1|11|11|10|0 11|11|11|00| 1|11|11|10|0 11|11|11|00| 1|11|11|10|0 11|11|11|00 1|11|11|10|0 −−−−−−−−−−−−−−−−−−−−−−−−−−−− P 11|11|10|10|00|00|10|00 これを、十進数で表現すると、252×254=640
08となる。
## EQU00004 ## A 11 | 11 | 11 | 00 × B 11 | 11 | 11 | 10 −−−−−−−−−−−−−−−−−−−−−−−−−−−−− 00 | 00 | 00 | 00 1 | 11 | 11 | 10 | 0 11 | 11 | 11 | 00 | 1 | 11 | 11 | 10 | 0 11 | 11 | 00 | 1 | 11 | 11 | 10 | 0 11 | 11 | 11 | 00 1 | 11 | 11 | 10 | 0 −−−−−−−−−−−−−−−−−−−−−−−−−−−− P 11 | 11 | 10 | 10 | 00 | 00 | 10 | 00 When this is expressed by a decimal number, 252 × 254 = 640
It will be 08.

【0034】次に、前述した符号付き数間の乗算および
符号なし数間の乗算を選択的に行なえる本発明による乗
算器について図1を参照して説明する。図1は、本発明
による符号付き/符号なし数兼用乗算器の構成ブロック
図である。
Next, a multiplier according to the present invention which can selectively perform the multiplication between the signed numbers and the multiplication between the unsigned numbers will be described with reference to FIG. FIG. 1 is a block diagram showing the configuration of a signed / unsigned number-use multiplier according to the present invention.

【0035】図1に示すように、本発明による乗算器
は、選択器21、エンコーダ22、符号伝送ユニット2
3、シフト・反転ユニット24、第1ないし第4部分積
発生器25、26、27、28およびキャリー・ルック
・アヘッド加算器29からなる。なお、図1に示されて
いる乗算器は、8×8乗算器であり、Aは被乗数、Bは
乗数を表す。
As shown in FIG. 1, the multiplier according to the present invention comprises a selector 21, an encoder 22 and a code transmission unit 2.
3, a shift / inversion unit 24, first to fourth partial product generators 25, 26, 27, 28 and a carry look ahead adder 29. The multiplier shown in FIG. 1 is an 8 × 8 multiplier, where A is the multiplicand and B is the multiplier.

【0036】図1を参照すると、8ビットの乗数Bが3
ビットずつ区分されて入力されるエンコーダ22は、乗
数のビット組をコーディングしてビット組に対応するリ
コード・デジット(−2x, −1x, 0x, +1x, +
2x)の集合を生成する。リコード・デジットを生成す
る方法は前述したとおりである。
Referring to FIG. 1, the 8-bit multiplier B is 3
The encoder 22 that is divided into bits and inputs the coded bit sets of the multipliers corresponds to the recoded digits (-2x, -1x, 0x, + 1x, +) corresponding to the bit sets.
2x) set is generated. The method of generating the recoded digit is as described above.

【0037】前記リコード・デジット集合の各リコード
・デジットはシフト・反転ユニット24及び第1ないし
第4部分積発生器25〜28のうちの対応する一つに伝
達される。シフト・反転ユニット24と第1ないし第4
部分積発生器25〜28においては入力されたリコード
・デジットに従い8ビットの被乗数Aに対して該当する
演算が行なわれる。シフト・反転ユニット24はエンコ
ーダ22から提供されるリコード・デジットと3ビット
ずつ区分された被乗数Aが入力され、前記リコード・デ
ジットに該当する演算を前記被乗数Aの各3ビットに対
して行い、その結果から生成される和とキャリーを第1
部分積発生器25に出力する。この実施形態において、
部分積は和とキャリーを意味する。
Each recoded digit of the set of recoded digits is transmitted to a corresponding one of the shift / invert unit 24 and the first to fourth partial product generators 25-28. Shift / inversion unit 24 and first to fourth
In the partial product generators 25 to 28, the corresponding operation is performed on the 8-bit multiplicand A according to the input recoding digit. The shift / inversion unit 24 receives the recoded digit provided from the encoder 22 and the multiplicand A divided into 3 bits, performs an operation corresponding to the recoded digit on each 3 bits of the multiplicand A, and First sum and carry generated from the result
Output to the partial product generator 25. In this embodiment,
Partial product means sum and carry.

【0038】第1部分積発生器25は、シフト・反転ユ
ニット24から出力される和とキャリーが入力され、第
2ないし第4部分積発生器26、27、28は前段の部
分積発生器から出力される和とキャリーが入力される。
また、各部分積発生器25〜28はエンコーダ22から
対応するリコード・デジットが入力され、3ビットずつ
区分された被乗数Aが入力される。各部分積発生器25
〜28は、入力されたリコード・デジットに該当する演
算を前記入力された被乗数Aに対して行い、その結果を
前段から入力された和およびキャリーに加算して新しい
和とキャリーを生成し、この生成された和とキャリーを
次の段に出力する。このような機能を行なうため、各部
分積発生器25〜28は内部にシフト・反転ユニット2
4と同一の構造のシフト・反転手段と、前段から入力さ
れた和およびキャリーと前記シフト・反転手段の出力を
加算するための加算手段を含む。
The first partial product generator 25 receives the sum and carry output from the shift / inversion unit 24, and the second to fourth partial product generators 26, 27 and 28 are from the preceding partial product generators. The output sum and carry are input.
In addition, the corresponding recode digit is input from the encoder 22 to each of the partial product generators 25 to 28, and the multiplicand A divided into 3 bits is input. Each partial product generator 25
˜28 performs an operation corresponding to the input recode digit on the input multiplicand A and adds the result to the sum and the carry input from the previous stage to generate a new sum and carry. The generated sum and carry are output to the next stage. In order to perform such a function, each of the partial product generators 25 to 28 is internally provided with the shift / inversion unit 2.
4 includes a shift / inversion means having the same structure, and an addition means for adding the sum and carry input from the preceding stage and the output of the shift / inversion means.

【0039】次に、シフト・反転ユニット24または各
部分積発生器25〜28において行なわれる各リコード
・デジットに該当する演算動作を具体的にみてみると、
まず、リコード・デジットが(−2x)である場合に
は、被乗数Aから−2Aを得るため、Aを反転した後1
を加算し、左に1ビットシフトさせて得られるデータを
前段の中間結果である部分積に加算する。
Next, the operation of the shift / inversion unit 24 or each of the partial product generators 25 to 28 corresponding to each of the recoded digits will be described in detail.
First, when the recoded digit is (-2x), in order to obtain -2A from the multiplicand A, after inverting A, 1
Is added, and the data obtained by shifting left by 1 bit is added to the partial product which is the intermediate result of the previous stage.

【0040】また、リコード・デジットが(−1x)で
ある場合には、被乗数Aから−Aを得るため、Aを反転
した後、1を加算して得たデータを前段の中間結果であ
る部分積と加算する。リコード・デジットが0xである
場合には、0を前段の中間結果である部分積に加算する
が、0xによる実質的な演算の効果はない。リコード・
デジットが1xである場合には、Aを前段の中間結果で
ある部分積に加算する。リコード・デジットが2xであ
る場合には、被乗数Aから2Aを得るため、Aを左側に
1ビットシフトさせて得たデータを前段の部分積に加算
する。
When the recode digit is (-1x), in order to obtain -A from the multiplicand A, the data obtained by inverting A and adding 1 is the intermediate result of the previous stage. Add to product. When the recode digit is 0x, 0 is added to the partial product which is the intermediate result of the previous stage, but there is no substantial operation effect by 0x. Recode
When the digit is 1x, A is added to the partial product which is the intermediate result of the previous stage. When the recode digit is 2x, 2A is obtained from the multiplicand A, so that data obtained by shifting A to the left by 1 bit is added to the partial product of the preceding stage.

【0041】このように動作するシフト・反転ユニット
24と第1ないし第4部分積発生器25〜28の出力
は、キャリー・ルック・アヘッド加算器29を通じて外
部に出力される。
The outputs of the shift / inversion unit 24 and the first to fourth partial product generators 25 to 28 which operate in this way are output to the outside through the carry look ahead adder 29.

【0042】符号伝送ユニット23は、シフト・反転ユ
ニット24、第1ないし第3部分積発生器25、26、
27から出力される乗数Bおよび被乗数Aの拡張された
符号ビットに対する部分積を累積して加算し、その加算
結果を第4部分積発生器28に出力する。
The code transmission unit 23 includes a shift / inversion unit 24, first to third partial product generators 25 and 26,
The partial products of the expanded sign bit of the multiplier B and the multiplicand A output from 27 are accumulated and added, and the addition result is output to the fourth partial product generator 28.

【0043】キャリー・ルック・アヘッド加算器29
は、第4部分積発生器28において生成される和および
キャリーとシフト・反転ユニット24及び第1ないし第
3部分積発生器25、26、27から出力されるキャリ
ーを入力し、前記入力を順に加算して16ビットの出力
を生成する。このようなキャリー・ルック・アヘッド加
算器29は回路の全体的な演算速度を速くする。
Carry Look-Ahead Adder 29
Is the sum and carry generated in the fourth partial product generator 28 and the carry output from the shift / inversion unit 24 and the first to third partial product generators 25, 26, 27, and the inputs are input in order. Add to produce a 16-bit output. Such a carry look ahead adder 29 speeds up the overall operation speed of the circuit.

【0044】本発明による乗算器においては選択器21
により符号なし数間の乗算と符号付き数間の乗算が選択
できる。例えば、選択信号selが「1」であると符号
付き数間の乗算であり、選択信号selが「0」である
と符号なし数間の乗算であるとする。
In the multiplier according to the present invention, the selector 21
Can select multiplication between unsigned numbers and multiplication between signed numbers. For example, if the selection signal sel is “1”, it is a multiplication between signed numbers, and if the selection signal sel is “0”, it is a multiplication between unsigned numbers.

【0045】この場合、選択信号selが「0」である
と乗数Bと被乗数Aの拡張された符号ビットが常に
「0」にセットされる。すなわち、選択器21から出力
されるA〈9〉、A〈8〉およびB〈9〉、B〈8〉は
「0」になる。
In this case, when the selection signal sel is "0", the extended sign bit of the multiplier B and the multiplicand A is always set to "0". That is, A <9>, A <8> and B <9>, B <8> output from the selector 21 become “0”.

【0046】一方、選択信号selが「1」であると、
乗数Bと被乗数Aの符号ビットである最上位ビットA
〈7〉、B〈7〉の状態に従って拡張符号ビットの値が
決まる。すなわち、A〈7〉またはB〈7〉が「1」で
あると、選択器21から出力されるA〈9〉A〈8〉ま
たはB〈9〉B〈8〉はそれぞれ「11」になり、A
〈7〉またはB〈7〉が「0」であると、選択器21か
ら出力されるA〈9〉A〈8〉またはB〈9〉B〈8〉
はそれぞれ「00」になる。従って、外部から選択信号
selを制御すると、選択器21は符号付き数間の乗算
であるか符号なし数間の乗算であるかに従い適切に拡張
ビットを乗数Bおよび被乗数Aに提供し、これによっ
て、この発明による乗算器においては符号付き数間の乗
算及び符号なし数間の乗算を処理できるようになる。
On the other hand, if the selection signal sel is "1",
Most significant bit A, which is the sign bit of multiplier B and multiplicand A
The value of the extension sign bit is determined according to the states of <7> and B <7>. That is, when A <7> or B <7> is “1”, A <9> A <8> or B <9> B <8> output from the selector 21 becomes “11”, respectively. , A
When <7> or B <7> is “0”, A <9> A <8> or B <9> B <8> output from the selector 21.
Respectively become "00". Therefore, when the selection signal sel is controlled from the outside, the selector 21 appropriately provides the extension bits to the multiplier B and the multiplicand A according to whether the multiplication is between signed numbers or unsigned numbers, thereby In the multiplier according to the present invention, multiplication between signed numbers and multiplication between unsigned numbers can be processed.

【0047】[0047]

【発明の効果】以上詳細に説明したように、本発明によ
れば、修正ブース・アルゴリズムを適用した符号付き数
間の乗算および符号なし数間の乗算を選択的に行なえる
乗算器を提供できる。特に、本発明においては符号なし
数間の乗算の際、選択器を通じて入力の拡張ビットを提
供することにより符号付き数間の乗算ばかりでなく符号
なし数間の乗算をも行なうことができ、回路の構成が簡
単で演算処理速度を低下させずかつ集積回路に実装した
時に比較的少ない面積を占めるようにすることができ
る。
As described above in detail, according to the present invention, it is possible to provide a multiplier which selectively applies multiplication between signed numbers and unsigned numbers to which the modified Booth algorithm is applied. . In particular, in the present invention, when multiplying between unsigned numbers, it is possible to perform not only multiplication between signed numbers but also multiplication between unsigned numbers by providing an extension bit of an input through a selector. The configuration is simple, does not reduce the operation processing speed, and can occupy a relatively small area when mounted on an integrated circuit.

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

【図1】本発明による符号付き/符号なし数兼用乗算器
の構成ブロック図である。
FIG. 1 is a block diagram showing the configuration of a signed / unsigned number-use multiplier according to the present invention.

【図2】通常の2の補数乗算器の構成ブロック図であ
る。
FIG. 2 is a configuration block diagram of a normal 2's complement multiplier.

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

21 選択器 22 エンコーダ 23 符号伝送ユニット 24 シフト・反転ユニット 25、26、27、28 第1〜第4部分積発生器 29 キャリー・ルック・アヘッド加算器 21 selector 22 encoder 23 code transmission unit 24 shift / inversion unit 25, 26, 27, 28 first to fourth partial product generator 29 carry-look-ahead adder

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 M×Nの乗算を行なう乗算器において、 乗数のビット組をコーディングして各ビット組に対応す
るリコード・デジットを生成するエンコーダと、 該エンコーダから伝送されるリコード・デジットによっ
て被乗数のシフト及び反転動作を行い部分積を生成する
シフト・反転ユニットと、 前記エンコーダから伝送されるリコード・デジットに従
いそれに対応する演算を被乗数に対して行い、この演算
結果を前記シフト・反転ユニットから出力される部分積
と加算して所定の部分積を生成する第1部分積発生器
と、 該第1部分積発生器の出力に順に連結されて前段の出力
データと伝送されたリコード・デジットに従った被乗数
に対する演算結果を加算して部分積をそれぞれ生成する
第2ないし第4部分積発生器と、 前記シフト・反転ユニットと前記第1ないし第4部分積
発生器に接続され、被乗数の拡張符号ビットに対する部
分積を累積して加算する符号伝送ユニットと、 入力される選択信号によって符号付き数間の乗算である
か符号なし数間の乗算であるかを判別し、該判別結果に
基づいて乗数と被乗数に拡張符号ビットを提供する選択
器とからなることを特徴とする符号付き/符号なし数兼
用乗算器。
1. A multiplier for performing M × N multiplication, wherein: an encoder for coding a bit set of a multiplier to generate a recode digit corresponding to each bit set; and a multiplicand by a recode digit transmitted from the encoder. Shift / inversion unit for performing partial shift and inversion operations of the above, and a corresponding operation on the multiplicand according to the recode digit transmitted from the encoder, and the operation result is output from the shift / inversion unit. A first partial product generator for adding the generated partial product to generate a predetermined partial product, and an output data of the first partial product generator, which is connected to the output of the first partial product generator in accordance with the transmitted decoding digit of the preceding stage. Second to fourth partial product generators for generating partial products by adding the calculation results for the multiplicands, respectively, A code transmission unit connected to the unit and the first to fourth partial product generators, for accumulating and adding partial products for the extended code bits of the multiplicand, and multiplying between signed numbers by an input selection signal A signed / unsigned number combined multiplier comprising: a selector that determines whether or not multiplication is between unsigned numbers and provides an extension sign bit to a multiplier and a multiplicand based on the determination result.
【請求項2】 前記部分積は、和とキャリーとからなる
ことを特徴とする請求項1に記載の符号付き/符号なし
数兼用乗算器。
2. The signed / unsigned number-combined multiplier according to claim 1, wherein the partial product comprises a sum and a carry.
【請求項3】 前記シフト・反転ユニット及び第1ない
し第3部分積発生器から出力されるキャリーと第4部分
積発生器から出力される和およびキャリーを入力し、こ
れを累積して加算するキャリー・ルック・アヘッド加算
器を更に含むことを特徴とする請求項2に記載の符号付
き/符号なし数兼用乗算器。
3. The carry output from the shift / inversion unit and the first to third partial product generators and the sum and the carry output from the fourth partial product generator are input, and accumulated and added. 3. The signed / unsigned number multiplier as claimed in claim 2, further comprising a carry look ahead adder.
【請求項4】 前記M×Nの乗算は、8×8の乗算であ
ることを特徴とする請求項1に記載の符号付き/符号な
し数兼用乗算器。
4. The signed / unsigned number-combined multiplier according to claim 1, wherein the M × N multiplication is an 8 × 8 multiplication.
JP8117487A 1995-05-22 1996-05-13 Multiplier used for both number with sign and number withoutsign Pending JPH08314697A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1019950012754A KR0158647B1 (en) 1995-05-22 1995-05-22 Multiplier using both signed number and unsigned number
KR1995-12754 1996-05-22

Publications (1)

Publication Number Publication Date
JPH08314697A true JPH08314697A (en) 1996-11-29

Family

ID=19415048

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8117487A Pending JPH08314697A (en) 1995-05-22 1996-05-13 Multiplier used for both number with sign and number withoutsign

Country Status (4)

Country Link
JP (1) JPH08314697A (en)
KR (1) KR0158647B1 (en)
CN (1) CN1086816C (en)
DE (1) DE19545900B4 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007094223A1 (en) 2006-02-15 2007-08-23 Matsushita Electric Industrial Co., Ltd. Multiplier, digital filter, signal processing device, synthesis device, synthesis program, and synthesis program recording medium
CN113656751A (en) * 2021-08-10 2021-11-16 上海新氦类脑智能科技有限公司 Method, device, equipment and medium for realizing signed operation of unsigned DAC (digital-to-analog converter)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004092946A1 (en) * 2003-04-17 2004-10-28 Zhizhong Li Digital engineering method and processor of the mixed q n-ary and carry line
US7797366B2 (en) * 2006-02-15 2010-09-14 Qualcomm Incorporated Power-efficient sign extension for booth multiplication methods and systems
US7809783B2 (en) * 2006-02-15 2010-10-05 Qualcomm Incorporated Booth multiplier with enhanced reduction tree circuitry
US8495125B2 (en) * 2009-05-27 2013-07-23 Microchip Technology Incorporated DSP engine with implicit mixed sign operands
CN101944009B (en) * 2009-07-06 2012-04-18 北京中电华大电子设计有限责任公司 Device for processing quotient of divider in integrated circuit
CN106897046B (en) * 2017-01-24 2019-04-23 青岛专用集成电路设计工程技术研究中心 A kind of fixed-point multiply-accumulator

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4831577A (en) * 1986-09-17 1989-05-16 Intersil, Inc. Digital multiplier architecture with triple array summation of partial products
US4868778A (en) * 1987-05-19 1989-09-19 Harris Corporation Speed enhancement for multipliers using minimal path algorithm
US4926371A (en) * 1988-12-28 1990-05-15 International Business Machines Corporation Two's complement multiplication with a sign magnitude multiplier
JP2597736B2 (en) * 1990-07-17 1997-04-09 株式会社東芝 Fast multiplier
US5153850A (en) * 1990-08-24 1992-10-06 Mass Microsystems Method and apparatus for modifying two's complement multiplier to perform unsigned magnitude multiplication
JPH05150950A (en) * 1991-11-29 1993-06-18 Sony Corp Multiplier circuit
TW421757B (en) * 1996-06-06 2001-02-11 Matsushita Electric Ind Co Ltd Arithmetic processor

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007094223A1 (en) 2006-02-15 2007-08-23 Matsushita Electric Industrial Co., Ltd. Multiplier, digital filter, signal processing device, synthesis device, synthesis program, and synthesis program recording medium
CN113656751A (en) * 2021-08-10 2021-11-16 上海新氦类脑智能科技有限公司 Method, device, equipment and medium for realizing signed operation of unsigned DAC (digital-to-analog converter)
CN113656751B (en) * 2021-08-10 2024-02-27 上海新氦类脑智能科技有限公司 Method, apparatus, device and medium for realizing signed operation by unsigned DAC

Also Published As

Publication number Publication date
CN1136680A (en) 1996-11-27
KR960042336A (en) 1996-12-21
DE19545900A1 (en) 1996-11-28
CN1086816C (en) 2002-06-26
DE19545900B4 (en) 2005-08-25
KR0158647B1 (en) 1998-12-15

Similar Documents

Publication Publication Date Title
US6233597B1 (en) Computing apparatus for double-precision multiplication
US4868777A (en) High speed multiplier utilizing signed-digit and carry-save operands
JPS62229330A (en) Multiplication circuit
JPS62280930A (en) Digital multiplier
JPH08314697A (en) Multiplier used for both number with sign and number withoutsign
US5870322A (en) Multiplier to selectively perform unsigned magnitude multiplication or signed magnitude multiplication
JPS5856033A (en) Multiplying circuit
JP2000056949A (en) 4-2 compressor circuit and multiplier
JPH11134175A (en) Multiplier/adder/subtracter and computing element
JPH10111791A (en) Division device
JPS58129653A (en) Multiplication system
JP3190826B2 (en) Product-sum operation unit
JP2734438B2 (en) Multiplier
JP3071607B2 (en) Multiplication circuit
JPH1115641A (en) Multiplier using redundant binary adder
JP3130797B2 (en) Product-sum operation processing method and apparatus
JPH0869372A (en) Binary multiplier
JP2606339B2 (en) Multiplier
JPH10333885A (en) Multiplying circuit
JP3230349B2 (en) Decimal multiplier
JPS60160438A (en) Dividing device
JPH0582609B2 (en)
JPH07114454A (en) Multiplication circuit and multiplication method
JPH04287220A (en) Multiplier circuit
JPS63208938A (en) Flag generating circuit

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20041014

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20041019

A601 Written request for extension of time

Free format text: JAPANESE INTERMEDIATE CODE: A601

Effective date: 20050119

A602 Written permission of extension of time

Free format text: JAPANESE INTERMEDIATE CODE: A602

Effective date: 20050126

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050405

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20050809