JPH0612237A - Multiplication circuit over integer - Google Patents

Multiplication circuit over integer

Info

Publication number
JPH0612237A
JPH0612237A JP4167084A JP16708492A JPH0612237A JP H0612237 A JPH0612237 A JP H0612237A JP 4167084 A JP4167084 A JP 4167084A JP 16708492 A JP16708492 A JP 16708492A JP H0612237 A JPH0612237 A JP H0612237A
Authority
JP
Japan
Prior art keywords
bit
integer
output
full adder
multiplier
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
JP4167084A
Other languages
Japanese (ja)
Inventor
Keiichi Iwamura
恵市 岩村
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP4167084A priority Critical patent/JPH0612237A/en
Priority to EP93304879A priority patent/EP0576262B1/en
Priority to DE69329260T priority patent/DE69329260T2/en
Publication of JPH0612237A publication Critical patent/JPH0612237A/en
Priority to US08/512,620 priority patent/US5524090A/en
Withdrawn legal-status Critical Current

Links

Abstract

PURPOSE:To provide the efficient circuit considering carry by using a multiplier with the small number of digits in the case of separately calculating an input value with the large number of digits in the multiplication circuit. CONSTITUTION:This circuit is provided with multipliers B10-B13 of mXm bits which input an integer A from the high-order digit while dividing it into (n) clocks for every (m) bits and multiply the prescribed (m) bits of an integer B to the respective (m) bits of the integer A, three-input (m) bit full adders +10-+13 with carries for adding the low-order (m) bits of outputs from the high-order digit multiplier, the high-order (m) bits of outputs from the same digit multiplier, the output of the (m) bit full adder with carry at the following digit in the case of the last clock, and the carry bit of the (m) bit full adder with carry at wo digits behind in the case of the last clock, (m+1) bit registers R10-R13 connected between two of three-input (m) bit full adders with carries. Then, the content of the (m+1) bit register in the final step after each clock is defined as the output of a multiplied result A.B from the high-order digit.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は整数上の乗算回路に関
し、特に小さな桁数の乗算器を用いて大きな桁数の乗算
を行う回路及びその方法に関するものである。本発明
は、大きな桁数の乗算を必要とするRSA暗号(池野信
一,小山謙二:“現代暗号学”,電子情報通信学会,1
986,6章)のような暗号化技術をはじめとして多く
の整数演算に利用することができる。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an integer multiplication circuit, and more particularly to a circuit and method for performing multiplication with a large number of digits by using a multiplier with a small number of digits. The present invention is an RSA cipher that requires multiplication of a large number of digits (Shinichi Ikeno, Kenji Koyama: "Modern Cryptography", IEICE, 1
It can be used for many integer operations, including encryption techniques such as 980, 6).

【0002】[0002]

【従来の技術】ゲートアレイの設計や基板設計におい
て、小さな桁数の整数上の乗算器は、セルライブラリや
TTL等が用意されているため手軽に構成することがで
きる。しかし、大きな桁数の乗算回路を実現しようとし
た場合には、セルライブラリ等がないので自分で設計し
なければならない。ところが、大きな桁数の乗算器を自
分で設計する場合、小さな桁数の乗算器の回路構成をそ
のまま拡張したのでは、回路構成が非常に複雑になり実
現が難しい。
2. Description of the Related Art In a gate array design or substrate design, a multiplier on an integer having a small number of digits can be easily constructed because a cell library, TTL, etc. are prepared. However, when trying to realize a multiplication circuit with a large number of digits, there is no cell library or the like, so it is necessary to design by yourself. However, in the case of designing a multiplier with a large number of digits by itself, if the circuit configuration of the multiplier with a small number of digits is expanded as it is, the circuit configuration becomes very complicated and difficult to realize.

【0003】また、入力値を所定ビツト毎に分割して複
数クロツクで乗算を行おうとする場合、入力値を多項式
と見なすと、ガロア体(宮川洋,岩垂好裕,今井秀樹:
“符号理論”,昭晃堂,1973,4章)のような桁上
がりのない演算系では、図3のような回路によつて乗算
が行われることが知られている。図3中、*Bi はB i
(i=0,…,n−1)を乗数としたmビツト*mビツ
トのガロア体上の乗算器、EXはmビツトのEXOR、
rはmビツトのレジスタである。
Further, the input value is divided into predetermined bits and duplicated.
If you want to multiply by a few clocks, you can
Considering that, Galois body (Hiro Miyakawa, Yoshihiro Iwadari, Hideki Imai:
Carriage such as "Code theory", Shokodo, 1973, Chapter 4)
In an arithmetic system without burrs, multiply by a circuit as shown in Fig. 3.
Is known to take place. In Figure 3, * Bi Is B i 
M bits * m bits with (i = 0, ..., N-1) as a multiplier
The multiplier on the Galois field of G, EX is the EXOR of m bits,
r is an m-bit register.

【0004】しかし、整数上の乗算では、図2のような
分割演算を行うと分割演算した桁毎に桁上がりが生じる
ため、効率的な乗算器を実現することは難しい。
However, in the multiplication on an integer, carrying out a division operation as shown in FIG. 2 causes a carry for each digit of the division operation, so that it is difficult to realize an efficient multiplier.

【0005】[0005]

【発明が解決しようとしている課題】本発明は、上述の
欠点を除去し、乗算回路において大きな桁数の入力値を
分割して演算する場合に、小さな桁数の乗算器を用いて
桁上がりを考慮した効率的な整数上の乗算回路を提供す
ることを目的とする。
SUMMARY OF THE INVENTION The present invention eliminates the above-mentioned drawbacks, and when a multiplication circuit divides an input value having a large number of digits for arithmetic operation, a carry with a carry having a small number of digits is used. It is an object of the present invention to provide an efficient multiplication circuit on an integer.

【0006】[0006]

【課題を解決するための手段】この課題を解決するため
に、本発明の整数上の乗算回路は、h,m,nを正の整
数とする場合に、(n×m)ビツトの整数Aと(h×
m)ビツトの整数Bとの乗算を行う整数上の乗算回路で
あつて、整数Aがmビツト毎にnクロツクに分けて上位
桁から入力され、該整数Aの各mビツトに整数Bの所定
のmビツトを乗算する前記整数Aに対して並列につなが
れるmビツト×mビツトの乗算器と、上位桁の該乗算器
の出力の下位mビツトと、同じ桁の該乗算器の出力の上
位mビツトと、前回のクロツク時の1つ下位桁のキヤリ
ー付きmビツトフルアダーの出力と、前回のクロツク時
の2つ下位桁のキヤリー付きmビツトフルアダーのキヤ
リービツトとを加算する前記キヤリー付き3入力mビツ
トフルアダーと、前記キヤリー付きmビツトフルアダー
のm+1ビツトの出力を同時に入出力する、2つの前記
キヤリー付きmビツトフルアダー間につながれるm+1
ビツトのレジスタとを備え、各クロツク後の最終段の前
記m+1ビツトのレジスタの内容を乗算結果A・Bの上
位桁からの出力とする。
To solve this problem, the integer multiplication circuit of the present invention uses an integer A of (n × m) bits when h, m, and n are positive integers. And (h ×
m) A multiplication circuit on an integer which multiplies the bit B by an integer B. The integer A is divided into n clocks for every m bits and is input from the upper digit, and the integer B is assigned to each m bit of the integer A. Of m bits multiplied by m bits, which are connected in parallel to the integer A, a lower m bits of the output of the higher-order multiplier, and a higher order of the output of the same-order multiplier. 3 with the above-mentioned carrier that adds the m bit and the output of the m-bit full adder with one lower digit at the previous clock and the carrier bit of the m-bit full adder with two lower digits at the previous clock An input m bitful adder and an m + 1 bit output of the m-bit full adder with carrier are simultaneously input / output, and m + 1 connected between the two m-bit full adder with carrier.
And the contents of the m + 1-bit register at the final stage after each clock are output from the upper digits of the multiplication results A and B.

【0007】ここで、整数Bの最下位桁のmビツトを乗
算する前記mビツト×mビツトの乗算器の下位mビツト
に対応する前記キヤリー付き3入力mビツトフルアダー
が、削除される。また、前記キヤリー付き3入力mビツ
トフルアダーは、複数の2入力フルアダーまたはハーフ
アダーによつて実現される。また、前記m+1ビツトの
レジスタは、任意の数の領域を有するメモリである。
Here, the carrier-added 3-bit m-bit full adder corresponding to the lower m-bit of the m-bit × m-bit multiplier that multiplies the m-bit of the least significant digit of the integer B is deleted. The carrier-equipped 3-input m-bit full adder is realized by a plurality of 2-input full adders or half adders. The m + 1-bit register is a memory having an arbitrary number of areas.

【0008】又、本発明の整数上の乗算回路は、h,n
を正の整数とする場合に、nビツトの整数Aとhビツト
の整数Bとの乗算を行う整数上の乗算回路であつて、整
数Aが1ビツト毎にnクロツクに分けて上位桁から入力
され、該整数Aの各1ビツトに整数Bの所定の1ビツト
を乗算する前記整数Aに対して並列につながれる1ビツ
ト×1ビツトの乗算器と、該乗算器の出力と、前回のク
ロツク時の1つ下位桁のキヤリー付き1ビツトフルアダ
ーの出力と、前回のクロツク時の2つ下位桁のキヤリー
付き1ビツトフルアダーのキヤリービツトとを加算する
前記キヤリー付き1ビツトフルアダーと、 前記キヤリ
ー付き1ビツトフルアダーの2ビツトの出力を同時に入
出力する、2つの前記キヤリー付き1ビツトフルアダー
間につながれる2ビツトのレジスタとを備え、各クロツ
ク後の最終段の前記2ビツトのレジスタの内容を乗算結
果A・Bの上位桁からの出力とする。
In addition, the integer multiplication circuit of the present invention uses h, n
Where n is a positive integer, an n-bit integer A is multiplied by an h-bit integer B, and the integer A is divided into n clocks every 1 bit and input from the upper digit. A 1-bit by 1-bit multiplier connected in parallel to the integer A for multiplying each 1-bit of the integer A by a predetermined 1-bit of the integer B, the output of the multiplier, and the previous clock. The 1-bit full adder with a carrier for adding the output of the 1-bit full-adder with a carrier at the time of the last time and the carry bit of the 1-bit full-adder with a carry for the last 2 low-order digits, and the carrier A 2-bit register connected between the two 1-bit full adders with a carrier for simultaneously inputting and outputting the 2-bit outputs of a 1-bit full adder with a clock, and the last stage after each clock. The contents of the bits of the register multiplication result as an output from the upper digit of A · B.

【0009】ここで、整数Bの最下位桁の1ビツトを乗
算する前記1ビツト×1ビツトの乗算器の下位ビツトに
対応する前記1ビツトフルアダーが、削除される。ま
た、前記キヤリー付き1ビツトフルアダーは、複数の2
入力フルアダーまたはハーフアダーによつて実現され
る。また、前記2ビツトのレジスタは、任意の数の領域
を有するメモリである。
Here, the 1-bit full adder corresponding to the lower bit of the 1-bit by 1-bit multiplier for multiplying the 1-bit of the least significant digit of the integer B is deleted. In addition, the 1-bit full adder with a carrier has a plurality of 2
It is realized by an input full adder or a half adder. The 2-bit register is a memory having an arbitrary number of areas.

【0010】[0010]

【実施例】本実施例ではn・mビツトの整数Aとh・m
ビツトの整数Bとの乗算器を想定するが、簡単のために
h=nとして説明する。この限定により一般性が失われ
ることはない。すなわち、n・mビツトの2つの整数を
A,Bとし、A・B=Cの演算を実行することを考え
る。ここで、mビツトの2つの整数a,bの乗算a・b
=cを実行する乗算器は公知の構成、例えばセルライブ
ラリやTTL等によつて簡単に実現できる。
[Embodiment] In this embodiment, an integer A of n · m bits and h · m
A multiplier with a bit integer B is assumed, but for the sake of simplicity, it will be described as h = n. This limitation does not lose generality. That is, it is considered that the two integers of n · m bits are A and B, and the operation of A · B = C is executed. Here, the multiplication a · b of two integers a and b of m bits
The multiplier for executing = c can be easily realized by a known structure such as a cell library or TTL.

【0011】整数A,Bを各々mビツト毎にn分割する
と、次のように表せる。
If the integers A and B are each divided into m bits, the result can be expressed as follows.

【0012】A=An-1 ・Xn-1 +An-2 ・Xn-2 +…
+A1 ・X+A0 B=Bn-1 ・Xn-1 +Bn-2 ・Xn-2 +…+B1 ・X+
0 ここで、X=2m-1 とし、A,Bについてmビツト毎に
上位桁から分割したビツト系列を、各々Ai ,Bi (i
=n−1,…,0)とする。この場合、整数A,Bは多
項式とみなすことができるので、A・Bは次のように表
すことができる。
A = A n- 1.X n-1 + A n- 2.X n-2 + ...
+ A 1 · X + A 0 B = B n-1 · X n-1 + B n-2 · X n-2 + ... + B 1 · X +
B 0 Here, assuming that X = 2 m−1 , the bit sequences obtained by dividing the high-order digit by m bits for A and B are A i and B i (i
= N-1, ..., 0). In this case, since the integers A and B can be regarded as polynomials, A · B can be expressed as follows.

【0013】[0013]

【数1】 ここでは、一般性を失うことはないので、n=4の場合
を考える。
[Equation 1] Here, since the generality is not lost, the case of n = 4 is considered.

【0014】[0014]

【数2】 A・B=A3 ・(B3 ・X6 +B2 ・X5 +B1 ・X4 +B0 ・X3 ) +A2 ・(B3 ・X5 +B2 ・X4 +B1 ・X3 +B0 ・X2 ) +A1 ・(B3 ・X4 +B2 ・X3 +B1 ・X2 +B0 ・X) +A0 ・(B3 ・X3 +B2 ・X2 +B1 ・X+B0 ) =C6 ・X6 +C5 ・X5 +C4 ・X4 +C3 ・X3 +C2 ・X2 +C1 ・X+C0 =C7'X7 +C6'X6 +C5'X5 +C4'X4 +C3'X3 +C2'X2 +C1'X+C0' Ci'=up(Ci-1 )+down(Ci ) (実施例1)これを、図1のような回路で乗算器を構成
する。図1はm×mビツトの乗算a・b=cを実行する
乗算器4個(×B10〜×B13)と、3入力のmビツトの
キヤリー付きフルアダー4個(+10〜+13)と、m+1
ビツトのレジスタ4個(R10〜R13)から構成される。
図1において各レジスタの初期状態はオール“0”とす
る。
[Formula 2] A · B = A 3 · (B 3 · X 6 + B 2 · X 5 + B 1 · X 4 + B 0 · X 3 ) + A 2 · (B 3 · X 5 + B 2 · X 4 + B 1 · X 3 + B 0 · X 2 ) + A 1 · (B 3 · X 4 + B 2 · X 3 + B 1 · X 2 + B 0 · X) + A 0 · (B 3 · X 3 + B 2 · X 2 + B 1 · X + B 0) = C 6 · X 6 + C 5 · X 5 + C 4 · X 4 + C 3 · X 3 + C 2 · X 2 + C 1 · X + C 0 = C 7 'X 7 + C 6' X 6 + C 5 'X 5 + C 4 'X 4 + C 3' X 3 + C 2 'X 2 + C 1' X + C 0 'C i' = up (C i-1) + down (C i) ( example 1) which, circuit as shown in FIG. 1 Constitutes a multiplier with. Figure 1 is a multiplier 4 which performs multiplication a · b = c of m × m bits and (× B 10 ~ × B 13), four the carry with the full adder of m bits of the 3-input (+ 10 ~ + 13) And m + 1
It is composed of four bit registers (R 10 to R 13 ).
In FIG. 1, the initial state of each register is all "0".

【0015】最初のクロツクでA3 が入力されると、
式の各項の係数A3 ・Bi (i=3,…,0)が各乗算
器から出力される。乗算器から出力されるA3 ・Bi
2mビツトの出力(22m=X2 桁分の出力)であるの
で、右の乗算器(B1i)の下位mビツトと左の乗算器
(B1i-1)の上位mビツトは同じ桁の出力となる。従つ
て、図1に示すフルアダー(+1i-1)において、その左
右の乗算器の上位mビツトと下位mビツトとを同時に加
え、加算結果を各レジスタ(R1i)に入力し、X桁毎の
演算結果を格納する。
When A 3 is input at the first clock,
The coefficients A 3 · B i (i = 3, ..., 0) of each term in the equation are output from each multiplier. Since A 3 .B i output from the multiplier is an output of 2 m bits (2 2 m = X 2 digit output), the lower m bits of the right multiplier (B 1i ) and the left multiplier (B 1 i ). The upper m bits of 1i-1 ) output the same digit. Therefore, in the full adder (+ 1i-1 ) shown in FIG. 1, the upper m bits and the lower m bits of the left and right multipliers are added at the same time, and the addition result is input to each register (R 1i ) for each X digit. Stores the calculation result of.

【0016】これを上の式のように、上位mビツトを
up( Ci-1 )、下位mビツトをdown( Ci )と表す。従
つて、式に示されるA・Bの最上位桁であるX7 の係
数C 7'が右端のフルアダー(+13)を通つて出力され
る。このとき、上位と下位のmビツトの和に桁上がりが
あれば各レジスタのm+1ビツト目は、その桁上がりビ
ツトを格納することになる。この桁上がりを意味するm
+1ビツト目は右隣のレジスタの最下位ビツトと同じ桁
である。
As shown in the above equation, the upper m bits are
up (Ci-1 ), The lower m bits are down (Ci ). Servant
X, which is the most significant digit of A and B shown in the formula7 Person in charge
Number C 7'Is the full adder (+13) Is output through
It At this time, a carry is added to the sum of the upper and lower m bits.
If so, the m + 1th bit of each register is the carry bit.
It will store the dots. M which means this carry
The + 1st bit is the same digit as the least significant bit of the register on the right.
Is.

【0017】次のクロツクでA2 が入力されたとき、図
1の右端のフルアダー(+13)では右端の乗算器出力の
2 ・B3 の上位mビツトと左隣のレジスタR13の加算
が行われ、式のX6 の係数C6'が出力される。そのと
き、他のフルアダー(+10〜+12)では、前述の左右の
乗算器の上位と下位のmビツト出力と、そのフルアダー
の左隣にあるレジスタの下位mビツト出力の和が演算さ
れ、その出力は各々右隣のレジスタに入力される。
[0017] When the next A 2 is entered in clock, the addition of the right end of the full adder (+ 13), the right end of the multiplier output A 2 · B 3 of the upper m bits and immediate left of the register R 13 in FIG. 1 Is performed and the coefficient C 6 'of X 6 in the equation is output. Then, the other of the full adder (+ 10 ~ + 12), the high and low m bits output of the left and right above multipliers, the sum of the lower m bits output from the register to the left next to the full adder is calculated, The outputs are input to the registers on the right.

【0018】更に、2つ左隣のレジスタのm+1ビツト
目をキヤリーとしてフルアダーに加える。これによつ
て、式と式との各項の係数の和が計算されたことに
なる。ここで、レジスタと乗算器からの出力は各々mビ
ツトであるので、2桁の桁上がりが考えられ、フルアダ
ーからの出力を格納するレジスタのビツト数はm+2ビ
ツト必要になる。
Further, the m + 1th bit of the register on the left of the two registers is added to the full adder as a carrier. As a result, the sum of the coefficients of the terms of the equation and the equation is calculated. Here, since the outputs from the register and the multiplier are m bits respectively, carry of two digits can be considered, and the number of bits of the register for storing the output from the full adder must be m + 2 bits.

【0019】次のクロツクでA1 が入力されたとき、右
端のフルアダー(+13)からはX5の係数C5'が出力さ
れる。このとき、各フルアダーには左隣のレジスタの下
位2ビツトと同じ桁である2つ左隣のレジスタの上位2
ビツトがキヤリーとして入力され、各フルアダーは加算
を実行してm+2ビツトの出力を行う。
[0019] When A 1 is entered in the next clock, the coefficient C 5 'of X 5 is output from the right end of the full adder (+ 13). At this time, each full adder has the same digit as the lower 2 bits of the register on the left, and the upper 2 of the register on the left of 2
Bits are input as carriers, and each full adder performs addition and outputs m + 2 bits.

【0020】次のクロツクで最後の入力A0 が入力され
たとき、右端のフルアダー(+13)からはX4 の係数で
あるC4'が出力され、各フルアダーではX3 〜X0 に対
する係数C3'〜C0'が演算されて、各レジスタに格納さ
れる。
[0020] When the last input A 0 is entered in the next clock, from the right end of the full adder (+ 13) are output C 4 'is the coefficient of X 4, coefficients for X 3 to X 0 in each full adder C 3 ′ to C 0 ′ are calculated and stored in each register.

【0021】以後、“0”を4クロツク入力し同じ動作
を繰り返すことによつて、各レジスタの中の値C3'〜C
0'が右端のフルアダー(+13)から順次出力され、乗算
結果の全てが出力される。これによつてAの値が分割入
力されるときA・Bの演算が効率的に行われる。
Thereafter, by inputting four clocks of "0" and repeating the same operation, the values C 3 'to C in each register are repeated.
0 'are sequentially outputted from the right end of the full adder (+ 13), all of the multiplication result is output. Thus, when the value of A is divided and input, the calculation of A and B is efficiently performed.

【0022】[0022]

【他の実施例】次に、図2のような回路で乗算器を構成
する。図2はAi ,Bi (i=n−1,…,0)が1ビ
ツト単位のときの乗算回路である。図2は1×1ビツト
の乗算器4個(×B20〜×B23)と、1ビツトのキヤリ
ー付きフルアダー4個(+20〜+23)と、2ビツトのレ
ジスタ4個(R20〜R23)から構成される。図2におい
て各レジスタの初期状態をオール“0”とする。
[Other Embodiments] Next, a multiplier is constructed by a circuit as shown in FIG. FIG. 2 shows a multiplication circuit when A i and B i (i = n-1, ..., 0) are in 1-bit units. 2 four 1 × 1 bit multiplier and (× B 20 ~ × B 23), 1 the carry with full adder four bits and (+ 20 ~ + 23), the four 2-bit register (R 20 - consisting of R 23). In FIG. 2, the initial state of each register is all "0".

【0023】最初のクロツクでA3 が入力されると、
式の各項の係数A3 ・Bi (i=3,…,0)が各乗算
器から出力され、各フルアダーを通して各々のレジスタ
に格納される。
When A 3 is input at the first clock,
The coefficient A 3 · B i (i = 3, ..., 0) of each term in the equation is output from each multiplier and stored in each register through each full adder.

【0024】次のクロツクでA2 が入力されたとき、A
・Bの最上位桁であるX6 の係数C 6 (=A3 ・B3
が右端のレジスタR23からフルアダー(+23)を通して
出力される。そのとき、他のフルアダー(+20〜+22
ではそのフルアダーの左端にあるレジスタ出力A3 ・B
i-1 (i=3,…,0)と乗算器からの出力A2 ・B i
(i=3,…,0)の和である(A3 ・Bi-1 +A2
i )(i=3,…,0)が演算され、その出力は各々
右隣のレジスタに入力される。
A at the next clock2 When is input, A
・ X, which is the most significant digit of B6 Coefficient C 6 (= A3 ・ B3 )
Is the rightmost register Rtwenty threeTo full adder (+twenty three) Through
Is output. At that time, another full adder (+20~ +twenty two)
Then the register output A at the left end of the full adder3 ・ B
i-1 (I = 3, ..., 0) and the output A from the multiplier2 ・ B i 
It is the sum of (i = 3, ..., 0) (A3 ・ Bi-1 + A2 ・
Bi ) (I = 3, ..., 0) is calculated, and the output is
It is input to the register on the right.

【0025】これは、上式において式と式の各項の
係数の和を計算することを意味する。ただし、Bi (i
=−1,…,−n)は常に“0”とする。ここで、A3
・B i-1 ,A2 ・Bi の各項は、各々1ビツトであるの
でフルアダーからの出力は桁上がりがあれば2ビツトに
なる。従つて、各レジスタは2ビツト必要になる。レジ
スタの各ビツトは桁を意味し、各レジスタの上位ビツト
は右隣のレジスタの下位ビツトと同じ桁になる。
In the above equation, this is
Means to calculate the sum of the coefficients. However, Bi (I
= -1, ..., -n) is always "0". Where A3 
・ B i-1 , A2 ・ Bi Each term in is one bit each
The output from the full adder is 2 bits if there is a carry.
Become. Therefore, each register requires 2 bits. cash register
Each bit of the star means a digit, and the upper bit of each register.
Has the same digit as the lower bit of the register on the right.

【0026】次のクロツクでA1 が入力されたとき、図
2の回路の右端のフルアダー(+23)からはX5 の係数
に当たるC5 (=A3 ・B2 +A2 ・B3 )が出力され
る。このとき、C5 の最下位ビツトと同じ桁である2つ
左隣のレジスタR22の上位ビツトも加算されて出力され
る。このとき、他のフルアダーは左隣のレジスタからの
1ビツト出力と乗算器からの1ビツト出力の他に、2つ
左隣のレジスタから桁上がり出力である最上位ビツトを
キヤリーとして加えることによつて、2ビツトの出力を
行う。これによつて、上の〜式までの各項の係数を
加えたことになる。
[0026] When A 1 is entered in the next clock, C 5 (= A 3 · B 2 + A 2 · B 3) which corresponds to the coefficient of X 5 from full adder (+ 23) of the right end of the circuit of FIG. 2 Is output. At this time, the upper bit of the register R 22 on the left side, which is the same digit as the lowest bit of C 5 , is also added and output. At this time, the other full adders add one bit output from the register on the left and one bit output from the multiplier by adding the highest bit which is a carry output from the register on the left on the left as a carrier. Then, it outputs 2 bits. As a result, the coefficients of the respective terms up to the above equation are added.

【0027】次のクロツクで最後の入力A0 が入力され
たとき、同様に右端のフルアダー(+23)からX4 の係
数であるC4 が出力され、各乗算器では上の式の各項
の係数A0 ・Bi (i=3,…,0)が出力される。そ
の出力を受けて、各フルアダー(+23〜+20)ではX3
〜X0 に対する係数C3 〜C0 が演算され、各レジスタ
に格納される。
[0027] When the last input A 0 is entered in the next clock, as well as C 4 is the coefficient of X 4 from full adder (+ 23) of the right end is output, each term of the above equation in each of the multipliers The coefficient A 0 · B i (i = 3, ..., 0) of is output. In response to the output, the full adder (+ 23 ~ + 20), the X 3
Factor C 3 -C 0 for to X 0 are computed and stored in each register.

【0028】以後、“0”を4クロツク入力し同じ動作
を繰り返すことによつて、各レジスタの中の値C3 〜C
0 が右端のフルアダー(+23)から順次出力され、乗算
結果の全てが出力される。これによつてAの値が分割入
力されるときのA・Bの演算が効率的に行われる。
[0028] Thereafter, Yotsute repeats the four clock input the same operation "0", the value C 3 -C in each register
0 are sequentially outputted from the right end of the full adder (+ 23), all of the multiplication result is output. Thereby, the calculation of A and B when the value of A is divided and input is efficiently performed.

【0029】以上によつて、入力値がmビツト毎にn分
割されて入力されるとき、mビツト×mビツトの乗算器
を用いてn・mビツトの乗算回路が効率的に実現できる
ことが示せた。n≠4の場合、更にn≠hの場合にも、
同様の回路で乗算が実行できることは明かである。
From the above, it can be shown that when the input value is divided into m bits and input, the n · m bit multiplication circuit can be efficiently realized by using an m bit × m bit multiplier. It was When n ≠ 4, and when n ≠ h,
It is clear that multiplication can be performed with a similar circuit.

【0030】尚、図1においてビツトのキヤリーを持つ
3入力のmビツトフルアダーは複数の2入力フルアダー
とハーフアダーの組合せによつて実現できることも明か
である。また、図1,2において右端のフルアダーとレ
ジスタを省いたり、更に右端にフルアダーとレジスタを
付け加えても同様の乗算器が構成できるのは明かであ
る。また、図2は1×1ビツトの乗算であるので、乗算
器出力からの桁の重複がなく、図1の回路に比べてより
簡単な回路構成でよい。また、図1,2のような同一の
演算素子の繰り返しによる構成はVLSI等の大規模回
路を構成しやすいという利点もある。
In FIG. 1, it is also apparent that the 3-input m-bit full adder having bit carry can be realized by a combination of a plurality of 2-input full adders and a half adder. Further, it is apparent that the same multiplier can be configured by omitting the full adder and the register at the right end in FIGS. 1 and 2 or adding the full adder and the register at the right end. Further, since FIG. 2 shows multiplication by 1 × 1 bit, there is no overlap of digits from the multiplier output, and a simpler circuit configuration than that of the circuit of FIG. 1 is sufficient. Further, the configuration in which the same arithmetic element is repeated as shown in FIGS. 1 and 2 has an advantage that a large-scale circuit such as VLSI can be easily configured.

【0031】更に、本発明は、複数の機器から構成され
るシステムに適用しても、1つの機器から成る装置に適
用しても良い。また、本発明はシステム或は装置にプロ
グラムを供給することによつて達成される場合にも適用
できることは言うまでもない。
Further, the present invention may be applied to a system composed of a plurality of devices or an apparatus composed of one device. Further, it goes without saying that the present invention can be applied to the case where it is achieved by supplying a program to a system or an apparatus.

【0032】[0032]

【発明の効果】本発明により、乗算回路において大きな
桁数の入力値を分割して演算する場合に、小さな桁数の
乗算器を用いて桁上がりを考慮した効率的な整数上の乗
算回路を提供できる。
According to the present invention, when an input value having a large number of digits is divided and operated in a multiplying circuit, a multiplier having a small number of digits is used to provide an efficient integer multiplication circuit considering carry. Can be provided.

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

【図1】第1実施例の整数上の乗算回路を示す図であ
る。
FIG. 1 is a diagram illustrating an integer multiplication circuit according to a first embodiment.

【図2】他の実施例の整数上の乗算回路を示す図であ
る。
FIG. 2 is a diagram illustrating an integer multiplication circuit according to another embodiment.

【図3】公知のガロア体上の多項項の乗算回路を示す図
である。
FIG. 3 is a diagram showing a known polynomial multiplication circuit on a Galois field.

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

10〜R13…2m+1ビツトレジスタ、R20〜R23…2
ビツトレジスタ、+10〜+13…キヤリー付き3入力mビ
ツトフルアダー、+20〜+23…キヤリー付き1ビツトフ
ルアダー、×B1i…Bi (i=0…n−1)を乗数とし
たmビツト×mビツトの整数上の乗算器、×B2i…Bi
(i=0…n−1)を乗数とした1ビツト×1ビツトの
整数上の乗算器、*Bi …Bi (i=0…n−1)を乗
数としたmビツト*mビツトのガロア体上の乗算器、E
X…mビツトのEXOR、r…mビツトレジスタ
R 10 ~R 13 ... 2m + 1 bit register, R 20 ~R 23 ... 2
Bit registers, + 10 ~ + 13 ... the carry with 3 input m-bit full adder, + 20 ~ + 23 ... the carry with 1 bit full adder and a multiplier of × B 1i ... B i (i = 0 ... n-1) Multiplier on an integer of m bits × m bits, × B 2i ... B i
(I = 0 ... n-1) multiplier, 1-bit x 1-bit integer multiplier, * B i ... B i (i = 0 ... n-1) m-bit * m-bit multiplier Multiplier over Galois field, E
X ... m bit EXOR, r ... m bit register

Claims (8)

【特許請求の範囲】[Claims] 【請求項1】 h,m,nを正の整数とする場合に、
(n×m)ビツトの整数Aと(h×m)ビツトの整数B
との乗算を行う整数上の乗算回路であつて、 整数Aがmビツト毎にnクロツクに分けて上位桁から入
力され、該整数Aの各mビツトに整数Bの所定のmビツ
トを乗算する前記整数Aに対して並列につながれるmビ
ツト×mビツトの乗算器と、 上位桁の該乗算器の出力の下位mビツトと、同じ桁の該
乗算器の出力の上位mビツトと、前回のクロツク時の1
つ下位桁のキヤリー付きmビツトフルアダーの出力と、
前回のクロツク時の2つ下位桁のキヤリー付きmビツト
フルアダーのキヤリービツトとを加算する前記キヤリー
付き3入力mビツトフルアダーと、 前記キヤリー付きmビツトフルアダーのm+1ビツトの
出力を同時に入出力する、2つの前記キヤリー付きmビ
ツトフルアダー間につながれるm+1ビツトのレジスタ
とを備え、 各クロツク後の最終段の前記m+1ビツトのレジスタの
内容を乗算結果A・Bの上位桁からの出力とすることを
特徴とする整数上の乗算回路。
1. When h, m, and n are positive integers,
(N × m) bit integer A and (h × m) bit integer B
A multiplication circuit on an integer for multiplying with, the integer A is divided into n clocks for every m bits and inputted from the upper digit, and each m bit of the integer A is multiplied by a predetermined m bit of the integer B. An m-bit × m-bit multiplier connected in parallel to the integer A, a lower m-bit of the output of the multiplier of the upper digit, an upper m-bit of the output of the multiplier of the same digit, and 1 at the time of clock
The output of the m-bit full adder with the carrier of the two lower digits,
Simultaneously input and output the 3-input m-bit full adder with the carrier and the m + 1 bit output of the m-bit full adder with the carrier, which adds the carry bit of the m-bit full adder with the lower two digits at the last clock And an m + 1-bit register connected between the two m-bit full adders with the carrier, and the contents of the m + 1-bit register at the final stage after each clock are output from the upper digit of the multiplication result A / B. A multiplication circuit on an integer characterized by the above.
【請求項2】 整数Bの最下位桁のmビツトを乗算する
前記mビツト×mビツトの乗算器の下位mビツトに対応
する前記キヤリー付き3入力mビツトフルアダーが、削
除されることを特徴とする請求項1記載の整数上の乗算
回路。
2. The 3-input m-bit full adder with carrier corresponding to the lower m bits of the m-bit × m-bit multiplier that multiplies the m-bit of the least significant digit of the integer B is deleted. The integer multiplication circuit according to claim 1.
【請求項3】 前記キヤリー付き3入力mビツトフルア
ダーは、複数の2入力フルアダーまたはハーフアダーに
よつて実現されることを特徴とする請求項1記載の整数
上の乗算回路。
3. The multiplication circuit on an integer according to claim 1, wherein the 3-input m-bit full adder with carrier is realized by a plurality of 2-input full adders or half adders.
【請求項4】 前記m+1ビツトのレジスタは、任意の
数の領域を有するメモリであることを特徴とする請求項
1記載の整数上の乗算回路。
4. An integer multiplication circuit according to claim 1, wherein the m + 1-bit register is a memory having an arbitrary number of areas.
【請求項5】 h,nを正の整数とする場合に、nビツ
トの整数Aとhビツトの整数Bとの乗算を行う整数上の
乗算回路であつて、 整数Aが1ビツト毎にnクロツクに分けて上位桁から入
力され、該整数Aの各1ビツトに整数Bの所定の1ビツ
トを乗算する前記整数Aに対して並列につながれる1ビ
ツト×1ビツトの乗算器と、 該乗算器の出力と、前回のクロツク時の1つ下位桁のキ
ヤリー付き1ビツトフルアダーの出力と、前回のクロツ
ク時の2つ下位桁のキヤリー付き1ビツトフルアダーの
キヤリービツトとを加算する前記キヤリー付き1ビツト
フルアダーと、 前記キヤリー付き1ビツトフルアダーの2ビツトの出力
を同時に入出力する、2つの前記キヤリー付き1ビツト
フルアダー間につながれる2ビツトのレジスタとを備
え、 各クロツク後の最終段の前記2ビツトのレジスタの内容
を乗算結果A・Bの上位桁からの出力とすることを特徴
とする整数上の乗算回路。
5. An integer multiplication circuit for multiplying an n-bit integer A and an h-bit integer B when h and n are positive integers, wherein the integer A is n for every 1 bit. A 1-bit by 1-bit multiplier which is divided into clocks and is inputted from the upper digit, and each 1-bit of the integer A is multiplied by a predetermined 1-bit of the integer B, which is connected in parallel to the integer A; With the above-mentioned carrier that adds the output of the vessel and the output of the 1-bit full adder with a carry of the last lower digit at the previous clock and the output of the 1-bit full adder with a carry of the lower digit at the previous clock It is equipped with a 1-bit full adder and a 2-bit register connected between two 1-bit full adders with a carrier for simultaneously inputting and outputting the 2-bit output of the 1-bit full adder with a carrier. A multiplication circuit on an integer, wherein the contents of the 2-bit register at the final stage after the packing is output from the upper digit of the multiplication result A / B.
【請求項6】 整数Bの最下位桁の1ビツトを乗算する
前記1ビツト×1ビツトの乗算器の下位ビツトに対応す
る前記1ビツトフルアダーが、削除されることを特徴と
する請求項5記載の整数上の乗算回路。
6. The 1-bit full adder corresponding to the lower bit of the 1-bit by 1-bit multiplier for multiplying the 1-bit of the least significant digit of the integer B is deleted. A multiplication circuit on the described integer.
【請求項7】 前記キヤリー付き1ビツトフルアダー
は、複数の2入力フルアダーまたはハーフアダーによつ
て実現されることを特徴とする請求項5記載の整数上の
乗算回路。
7. The multiplication circuit on integers according to claim 5, wherein the one bit full adder with carrier is realized by a plurality of two-input full adders or half adders.
【請求項8】 前記2ビツトのレジスタは、任意の数の
領域を有するメモリであることを特徴とする請求項5記
載の整数上の乗算回路。
8. A multiplication circuit on an integer according to claim 5, wherein the 2-bit register is a memory having an arbitrary number of areas.
JP4167084A 1992-06-25 1992-06-25 Multiplication circuit over integer Withdrawn JPH0612237A (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP4167084A JPH0612237A (en) 1992-06-25 1992-06-25 Multiplication circuit over integer
EP93304879A EP0576262B1 (en) 1992-06-25 1993-06-23 Apparatus for multiplying integers of many figures
DE69329260T DE69329260T2 (en) 1992-06-25 1993-06-23 Device for multiplying integers by many digits
US08/512,620 US5524090A (en) 1992-06-25 1995-08-08 Apparatus for multiplying long integers

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4167084A JPH0612237A (en) 1992-06-25 1992-06-25 Multiplication circuit over integer

Publications (1)

Publication Number Publication Date
JPH0612237A true JPH0612237A (en) 1994-01-21

Family

ID=15843119

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4167084A Withdrawn JPH0612237A (en) 1992-06-25 1992-06-25 Multiplication circuit over integer

Country Status (1)

Country Link
JP (1) JPH0612237A (en)

Similar Documents

Publication Publication Date Title
US6049815A (en) Method and apparatus for finite field multiplication
EP2283417B1 (en) Implementation of arbitrary galois field arithmetic on a programmable processor
JP5866128B2 (en) Arithmetic processor
US5764554A (en) Method for the implementation of modular reduction according to the Montgomery method
JP3784156B2 (en) Modular multiplication method
JP2744091B2 (en) Data processing method and apparatus for calculating multiplicative reciprocal element of finite field
US6009450A (en) Finite field inverse circuit
IL97413A (en) Microcircuit for the implementation of rsa algorithm and ordinary and modular arithmetic in particular exponentiation with large operands
US5121429A (en) Digital signal processing
US7395295B2 (en) Pipeline core in Montgomery multiplier
JP3726966B2 (en) Multiplier and encryption circuit
US20010054053A1 (en) Method and apparatus for finite field multiplication
US7607165B2 (en) Method and apparatus for multiplication and/or modular reduction processing
JP3210420B2 (en) Multiplication circuit over integers
KR100480997B1 (en) APPARATUS OF FIELD MULTIPLICATION OVER GF(p) AND GF(2^m)
JPH0612237A (en) Multiplication circuit over integer
EP1504335A2 (en) Fast multiplication circuits
JP2000207387A (en) Arithmetic unit and cipher processor
JP3129525B2 (en) Multiplication circuit over integers
WO2017037729A1 (en) Concurrent architecture of vedic multiplier-an accelerator scheme for high speed computing
JP3129524B2 (en) Multiplication circuit on integer and multiplication method
JP3129526B2 (en) Multiplication circuit over integers
WO2003096182A1 (en) “emod” a fast modulus calculation for computer systems
JPH0612232A (en) Multiplication circuit over integer
JPH0612235A (en) Circuit and method for multiplication over integer

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: 19990831