JPS6314233A - Decimal multplying circuit - Google Patents
Decimal multplying circuitInfo
- Publication number
- JPS6314233A JPS6314233A JP61156489A JP15648986A JPS6314233A JP S6314233 A JPS6314233 A JP S6314233A JP 61156489 A JP61156489 A JP 61156489A JP 15648986 A JP15648986 A JP 15648986A JP S6314233 A JPS6314233 A JP S6314233A
- Authority
- JP
- Japan
- Prior art keywords
- register
- digit
- multiplier
- multiplicand
- circuit
- 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
Links
- 238000000034 method Methods 0.000 abstract 1
- 238000007792 addition Methods 0.000 description 19
- 238000010586 diagram Methods 0.000 description 7
- 239000013067 intermediate product Substances 0.000 description 5
- 238000004364 calculation method Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 239000000047 product Substances 0.000 description 2
Abstract
Description
【発明の詳細な説明】
[概 要コ
電子計算機において、十進乗算を高速化するため、乗数
の倍数テーブルを作成し、1回の加算で(被乗数の1桁
×乗数)を行うように構成したもので、これにより加算
回数を低減し乗算速度を向上したものである。[Detailed Description of the Invention] [Overview] In order to speed up decimal multiplication, an electronic computer is configured to create a multiplier table and perform (1 digit of the multiplicand x multiplier) in one addition. This reduces the number of additions and increases the multiplication speed.
[産業上の利用分野]
本発明は計算機の演算回路に係わり、特に十進の乗算回
路に関する。[Industrial Field of Application] The present invention relates to an arithmetic circuit for a computer, and particularly to a decimal multiplication circuit.
計算機の演算速度は直接計算機の性能に結びつき、高速
性が要求される。十進乗算は、十進加算に展開して行わ
れるため時間がかがり、より高速な演算方法が要望され
ている。The calculation speed of a computer is directly related to the performance of the computer, and high speed is required. Since decimal multiplication is performed by expanding into decimal addition, it takes time, and a faster calculation method is desired.
[従来の技術] 従来の十進乗算は、次のようにして行われていた。[Conventional technology] Conventional decimal multiplication is performed as follows.
まず、被乗数の最下位桁を見て、その値だけ乗数を乗数
に加算して乗数の倍数を作り中間積とする。First, look at the least significant digit of the multiplicand and add that value to the multiplier to create a multiple of the multiplier and use it as the intermediate product.
次に被乗数の次の桁を見てその値の倍乗数を作り中間倍
乗数とする。中間積を1桁右ヘシフトし中間倍乗数を加
え、新しい中間積を作る。Next, look at the next digit of the multiplicand, create a multiplier for that value, and use it as the intermediate multiplier. Shift the intermediate product one place to the right and add the intermediate multiplier to create a new intermediate product.
次に、被乗数の次の桁を見て以下同様に中間積を作り、
被乗数の最上位の桁まで繰り返す。Next, look at the next digit of the multiplicand and create the intermediate product in the same way,
Repeat until the most significant digit of the multiplicand.
[発明が解決しようとする問題点コ
被乗数の各桁の値の平均値を4とすると、1回の乗算に
必要な加算回数は次式で求まる。[Problems to be Solved by the Invention] Assuming that the average value of the values of each digit of the multiplicand is 4, the number of additions required for one multiplication is determined by the following equation.
加算回数=被乗数の桁数×4−1
(ただし乗数の桁数は加算器の桁数より1桁以上少ない
こと)
例えば、10桁の掛算は39回の加算が必要になる。Number of additions = number of digits in the multiplicand x 4-1 (however, the number of digits in the multiplier must be at least one digit less than the number of digits in the adder) For example, 10-digit multiplication requires 39 additions.
従って、従来技術によれば、多くの加算回数が必要であ
り、演算時間も多くかかることになる。Therefore, according to the prior art, a large number of additions are required and a large amount of calculation time is required.
本発明は、このような従来の乗算回路に比べ、加算回数
を大幅に低減しだ新規な十進乗算回路を提供しようとす
るものである。The present invention aims to provide a novel decimal multiplication circuit that can significantly reduce the number of additions compared to such conventional multiplication circuits.
[問題点を解決するための手段]
第1図は本発明の十進乗算回路の原理ブロック図を示す
。[Means for Solving the Problems] FIG. 1 shows a block diagram of the principle of a decimal multiplication circuit according to the present invention.
第1図において、Aは中間結果が入る中間結果レジスタ
であり、Bは十進加算器であり、Cは乗数の倍数を入れ
る記憶回路である。In FIG. 1, A is an intermediate result register into which intermediate results are stored, B is a decimal adder, and C is a storage circuit into which multiples of multipliers are stored.
Dは被乗数レジスタであって、その内容によって記憶回
路Cをアドレスする。D is a multiplicand register, and the memory circuit C is addressed according to its contents.
被乗数レジスタDによってアドレスされた乗数の倍数が
加算器Bに入り、中間結果レジスタAがらの中間結果と
加算され、再び中間結果レジスタAに入れられる。The multiple of the multiplier addressed by multiplicand register D enters adder B, is added with the intermediate result from intermediate result register A, and is placed back into intermediate result register A.
[作用]
第1図の構成において、被乗数レジスタDに入っている
被乗数の各桁がOから9までのいずれの値であっても、
各桁の中間積を求めるのに、桁ごとに1回の加算で済む
。[Operation] In the configuration shown in FIG. 1, regardless of whether each digit of the multiplicand stored in the multiplicand register D has any value from O to 9,
To find the intermediate product of each digit, only one addition is required for each digit.
1回の乗算に必要な加算回数は次式で求まる。The number of additions required for one multiplication is determined by the following equation.
加算回数−8+被乗数の桁数−1
上式において“8”は、乗数の倍数テーブル作成するた
め必要な加算回数である。Number of additions - 8 + number of digits of multiplicand - 1 In the above equation, "8" is the number of additions required to create the multiplier table.
[実施例]
以下第2図および第3図に示す実施例により、本発明を
さらに具体的に説明する。[Example] The present invention will be described in more detail below with reference to Examples shown in FIGS. 2 and 3.
第2図は本発明の実施例回路図である。FIG. 2 is a circuit diagram of an embodiment of the present invention.
第2図において、Eは中間結果が入る中間結果レジスタ
であり、Fは中間結果レジスタEの出力を右1桁シフト
させるかそのまま送るかの切替回路である。In FIG. 2, E is an intermediate result register into which intermediate results are stored, and F is a switching circuit for shifting the output of the intermediate result register E by one digit to the right or sending it as is.
Gは十進加算器であり、Hは記憶回路にの読出しデータ
を保持するレジスタである。G is a decimal adder, and H is a register that holds read data to the storage circuit.
Kは乗数の0倍から9倍までが入る記憶回路であり、被
乗数レジスタIの最下位桁またはレジスタしによりアド
レスされる。K is a storage circuit into which multipliers from 0 times to 9 times are stored, and are addressed by the least significant digit or register of multiplicand register I.
■は被乗数が入る被乗数レジスタである。■ is a multiplicand register into which the multiplicand is stored.
Jは1桁右シフト回路である。J is a one-digit right shift circuit.
Lはレジスタであり、この内容は+1加算器により増加
される。L is a register whose contents are incremented by a +1 adder.
以下に、本実施例回路の動作を説明する。The operation of the circuit of this embodiment will be explained below.
(1)まず、乗数の倍数テーブルが作られる。(1) First, a multiple table of multipliers is created.
(11)レジスタEは“0”にされ、切替回路Fからは
レジスタEの値がそのまま出力される。(11) Register E is set to "0" and the value of register E is output as is from switching circuit F.
(12)レジスタHには乗数が入れられ、記憶回路には
レジスタしによってアドレスされ、レジスタしは“0″
となっている。(12) A multiplier is stored in register H, the memory circuit is addressed by a register, and the register is “0”.
It becomes.
(13)レジスタEの出力が記憶回路Kに書き込まれ、
レジスタEにはE+Hが入れられ、Lは1が加えられる
。(13) The output of register E is written to memory circuit K,
E+H is placed in register E, and 1 is added to L.
(14) (13)の動作を10回繰り返すことにより
、記憶回路Kにはアドレス0から9までに、乗数の0倍
から9倍が記憶される。(14) By repeating the operation in (13) 10 times, the multipliers 0 to 9 times are stored in the memory circuit K at addresses 0 to 9.
(2)次に、乗算ループが行われる。(2) Next, a multiplication loop is performed.
(21)レジスタEは“0″にされ、切替回路Fは右1
桁シフトとされる。(21) Register E is set to “0” and switching circuit F is set to right 1.
It is considered a digit shift.
(22)レジスタ■には被乗数が右詰めで入れられ、記
憶回路にはレジスタIの最下位桁によってアドレスされ
る。(22) The multiplicand is stored in register (2) right-justified, and the storage circuit is addressed by the least significant digit of register (I).
(23)レジスタ■の最下位桁によってアドレスされた
乗数の倍数がレジスタHに入り、レジスタEの出力はF
により右1桁シフトされて、レジスタHの出力と加算さ
れ、出力は再びしジスタEに入れられる。(23) The multiple of the multiplier addressed by the least significant digit of register ■ enters register H, and the output of register E becomes F
It is shifted one digit to the right by , and is added to the output of register H, and the output is put into register E again.
(24)レジスタEの最下位桁は、レジスタ■の出力が
Jにより右1桁シフトされると同時にレジスタIの最上
位桁に入れられる。(24) The least significant digit of register E is put into the most significant digit of register I at the same time as the output of register 2 is shifted by J by one digit to the right.
(25)再びレジスタIの最下位桁によってアドレスさ
れた乗数の倍数がレジスタHに入り、演算が繰り返され
る。(25) Again, the multiple of the multiplier addressed by the least significant digit of register I enters register H, and the operation is repeated.
(26)このループを被乗数の桁数だけ行えば、レジス
タ已に積の上位、レジスタIの上位に積の下位が生成さ
れる。(26) If this loop is repeated for the number of digits of the multiplicand, the upper part of the product is generated in the register I, and the lower part of the product is generated in the upper part of the register I.
第3図は、本発明による加算回数と従来例による加算回
数の比較を示す図である。FIG. 3 is a diagram showing a comparison between the number of additions according to the present invention and the number of additions according to the conventional example.
図より明らかのように、桁数の小さい場合は倍数テーブ
ル作成に要する加算回数のため加算回数低減の効果は少
ないが、桁数が大きくなると必要加算回数は大幅に低減
され′る。As is clear from the figure, when the number of digits is small, the effect of reducing the number of additions is small because of the number of additions required to create a multiple table, but as the number of digits becomes large, the number of required additions is significantly reduced.
[発明の効果]
以上説明のように本発明によれば、従来技術に比べ加算
回数を大幅に低減して、乗算速度を向上することができ
、計算機の性能向上乙こ寄与する効果は極めて大である
。[Effects of the Invention] As explained above, according to the present invention, the number of additions can be significantly reduced compared to the conventional technology, and the multiplication speed can be improved, and the effect of contributing to the improvement of computer performance is extremely large. It is.
第1図は本発明の原理ブロック図、
第2図は本発明の実施例の回路図、
第3図は本発明と従来例による加算回数の比較を示す図
である。
図面において、
A、D、E、H,I、Lはレジスタ、
B、Gは加算器、 C,には記憶回路、Fは切替
回路、 Jはシフト回路、をそれぞれ示す。
本発明のfflブロック図
第1図FIG. 1 is a principle block diagram of the present invention, FIG. 2 is a circuit diagram of an embodiment of the present invention, and FIG. 3 is a diagram showing a comparison of the number of additions between the present invention and a conventional example. In the drawings, A, D, E, H, I, and L are registers, B and G are adders, C is a storage circuit, F is a switching circuit, and J is a shift circuit, respectively. ffl block diagram of the present invention Fig. 1
Claims (1)
する中間結果とを十進加算し、加算結果を中間結果レジ
スタ(A)に入力する加算器(B)と、被乗数を保持し
、記憶回路(C)をアドレスする被乗数レジスタ(D)
とを備え、 予め乗数の倍数を記憶回路(C)に記憶させておき、1
回の加算により(被乗数の1桁×乗数)を行うよう構成
したことを特徴とする十進乗算回路。[Claims] An intermediate result register (A) that holds an intermediate result of multiplication; a storage circuit (C) that stores a multiple of a multiplier; and an output of the storage circuit (C) and storage of the intermediate result register (A). an adder (B) that performs decimal addition of the intermediate results and inputs the addition result to the intermediate result register (A); and a multiplicand register (D) that holds the multiplicand and addresses the storage circuit (C).
A multiple of the multiplier is stored in advance in the memory circuit (C), and 1
A decimal multiplication circuit characterized in that it is configured to perform (1 digit of multiplicand x multiplier) by adding times.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP61156489A JPS6314233A (en) | 1986-07-03 | 1986-07-03 | Decimal multplying circuit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP61156489A JPS6314233A (en) | 1986-07-03 | 1986-07-03 | Decimal multplying circuit |
Publications (1)
Publication Number | Publication Date |
---|---|
JPS6314233A true JPS6314233A (en) | 1988-01-21 |
Family
ID=15628872
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP61156489A Pending JPS6314233A (en) | 1986-07-03 | 1986-07-03 | Decimal multplying circuit |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPS6314233A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH04241623A (en) * | 1991-01-14 | 1992-08-28 | Nec Corp | Decimal multiplication processor |
-
1986
- 1986-07-03 JP JP61156489A patent/JPS6314233A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH04241623A (en) * | 1991-01-14 | 1992-08-28 | Nec Corp | Decimal multiplication processor |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JPH0831025B2 (en) | Multiplication circuit | |
US5363322A (en) | Data processor with an integer multiplication function on a fractional multiplier | |
JPS6314233A (en) | Decimal multplying circuit | |
JPS6226723B2 (en) | ||
JPH05197525A (en) | Method and circuit for negating operand | |
JPH02287874A (en) | Product sum arithmetic unit | |
Balakrishnan et al. | Arbitrary precision arithmetic-SIMD style | |
JP2675087B2 (en) | Microcomputer | |
Erdogan et al. | Low power multiplication schemes for single multiplier CMOS based FIR digital filter implementations | |
JPS61156434A (en) | Digital multiplier for series operation | |
JPS6259828B2 (en) | ||
JPH0580978A (en) | Arithmetic processing circuit | |
JPH0784762A (en) | Multiplication circuit | |
JPH02178833A (en) | Adder for adding data different in bit length | |
MINTZER | Mechanization of Digital Signal Processors | |
JPS60129834A (en) | Multiplier and divider | |
JPS6224365A (en) | Product sum arithmetic unit | |
JPS61177544A (en) | Serial multiplying device | |
JPH04242425A (en) | Decimal multiplier | |
JPH05257647A (en) | Integer multiplying method and integer dividing method | |
GB1090596A (en) | Multiplier | |
JPH04205525A (en) | Multiplier applying pipeline system | |
JPH04182731A (en) | Arithmetic method and arithmetic unit | |
JPS62172430A (en) | Division circuit | |
JPH02146621A (en) | Arithmetic processing unit |