JPH06180640A - Device and method for division - Google Patents

Device and method for division

Info

Publication number
JPH06180640A
JPH06180640A JP4331799A JP33179992A JPH06180640A JP H06180640 A JPH06180640 A JP H06180640A JP 4331799 A JP4331799 A JP 4331799A JP 33179992 A JP33179992 A JP 33179992A JP H06180640 A JPH06180640 A JP H06180640A
Authority
JP
Japan
Prior art keywords
value
divisor
result
multiplier
filter 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
Application number
JP4331799A
Other languages
Japanese (ja)
Inventor
Hidekazu Matsuzaki
英一 松崎
Toshiyuki Nobutani
俊行 信谷
Masami Shimakura
正美 島倉
Junichi Tanahashi
淳一 棚橋
Hajime Morimoto
はじめ 森本
Kenichiro Ono
研一郎 小野
Tatsuya Sakashita
達也 坂下
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 JP4331799A priority Critical patent/JPH06180640A/en
Publication of JPH06180640A publication Critical patent/JPH06180640A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To cope with optional divisors and dividends by providing a calculating means for obtaining the reciprocal of the divisor in a decimal number, a means for multiplying an arithmetic result and the dividend together and the means for deleting only the number of digits of the arithmetic result from multiplied result. CONSTITUTION:This device is provided with a filter circuit 101 for deleting the low- order bits of the dividend based on the filter value of a prime number resolver 102, the resolver 102 for obtaining the power of two from the inputted divisor, obtaining its exponent as the filter value to be inputted to the filter circuit 101, deleting only the value of the exponent of the power of two within the low-order bits of the inputted divisor and obtaining the remaining bits as the input value of a reciprocal computing element 103, the computing element 103 for obtaining the filter value in order to obtain a divisor result from the result of the multiplication for obtaining the reciprocal of a value inputted from the resolver 102 as a multiplier to be inputted to a multiplier 104, the multiplier 104 for multiplying the multiplier of the computing element 103 and the multiplicand of the filter circuit 101 together and the filter circuit 105 for deleting the low-order bits of the multiplied result of the multiplier 104 based arm the filter value of the computing element 103 and obtaining a divided result.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、除算装置及び方法、詳
しくは乗算器を使用して除算演算を行う除算装置及び方
法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a division apparatus and method, and more particularly to a division apparatus and method for performing a division operation using a multiplier.

【0002】[0002]

【従来の技術】一般に、二進数の除算において除数が2
のべき乗に類する場合、被除数の下位の桁を、2のべき
乗の指数分だけ削除すれば除算結果が求まることは知ら
れている。
2. Description of the Related Art Generally, a binary divisor has a divisor of 2
It is known that in the case of a power of, the lower digit of the dividend is deleted by the exponent of a power of 2 to obtain the division result.

【0003】除数が2のべき乗に類さない場合には、あ
らかじめ除算結果をROM(Read OnlyMem
ory)等のメモリに記憶しておき、被除数をメモリに
入力することにより除算結果が求まるようにしている。
If the divisor is not a power of 2, the division result is previously stored in a ROM (Read Only Mem).
ory) and the like, and the dividend is input to the memory so that the division result can be obtained.

【0004】[0004]

【発明が解決しようとする課題】ところが、以上のよう
な手段では、除算演算を行うだけのために演算結果を記
憶しておくメモリが必要となり、更にそのメモリを制御
するための回路が必要となるため、回路が複雑になると
ともに、回路を構成する素子の数が多くなる。また、メ
モリをアクセスする時間が必要となるため除算結果が求
まるまでに時間がかかる。
However, in the above means, a memory for storing the operation result is required only for performing the division operation, and a circuit for controlling the memory is required. Therefore, the circuit becomes complicated and the number of elements constituting the circuit increases. Further, since it takes time to access the memory, it takes time to obtain the division result.

【0005】更に、従来の手段ではメモリに記憶されて
いる内容でしか除算結果を求めることはできず、除数の
変化には対応できないという欠点を持っている。
Further, the conventional means has a drawback that the division result can be obtained only with the contents stored in the memory, and the change of the divisor cannot be dealt with.

【0006】[0006]

【課題を解決するための手段及び作用】そのために本発
明では、任意の除数と被除数に対応するとともに、除数
と被除数を入力すれば除算結果が求まる回路構成を提供
する。
To this end, the present invention provides a circuit configuration that corresponds to arbitrary divisors and dividends and that obtains the division result by inputting the divisors and dividends.

【0007】本発明は、除算演算を行うのに乗算器を用
いることを特徴とする。除数の逆数を小数で求める演算
手段と、前記演算結果と被除数の乗算を行う手段と、乗
算結果から前記演算結果の桁数分だけ削除する手段を具
える。
The present invention is characterized in that a multiplier is used to perform a division operation. It comprises arithmetic means for obtaining the reciprocal of the divisor as a decimal number, means for multiplying the arithmetic result by the dividend, and means for deleting from the multiplication result by the number of digits of the arithmetic result.

【0008】また、後段での演算回路を簡単にするため
に、あらかじめ除数に含まれる2のべき乗要因を求める
手段と、除数と被除数の下位の桁を前記手段により得ら
れる2のべき乗要因に含まれる指数分だけ削除すること
により、2のべき乗による除算を行う手段を具える。
Further, in order to simplify the arithmetic circuit in the subsequent stage, means for obtaining a power factor of 2 included in the divisor in advance, and lower digits of the divisor and dividend are included in the power factor of 2 obtained by the means. A means for dividing by a power of 2 is provided by deleting only the exponents that are stored.

【0009】上記構成により、任意の除数と被除数に対
応することができ、更に除数結果を記憶しておくメモリ
が不要となるため、回路の簡素化が図れるとともに、演
算処理の高速化が図れる。
With the above configuration, any divisor and dividend can be dealt with, and since a memory for storing the divisor result is not required, the circuit can be simplified and the arithmetic processing can be speeded up.

【0010】[0010]

【実施例】以下、図面を参照して本発明の一実施例を詳
細に説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described in detail below with reference to the drawings.

【0011】(実施例1)図1に、本発明における除算
器のブロック図を示す。図1は、除数と被除数が除算器
に入力されてから除算結果が得られるまでの流れを示し
ている。図において、101は素数分解器102から入
力されるフィルタ値を基に、被除数の下位ビットを削除
するフィルタ回路(1)、102は入力される除数から
2のべき乗を求め、その指数をフィルタ回路(1)10
1に入力するフィルタ値として求めるともに、入力され
た除数の下位ビットのうち2のべき乗の指数の値だけ削
除し、残ったビットを逆数演算器103の入力値として
求める素数分解器、103は乗算器104に入力される
乗数として、素数分解器102から入力される値の逆数
を求めるとともに、乗算器104から得られる乗算結果
から除数結果を求めるために、フィルタ回路(2)10
5へ入力するフィルタ値を求めるための逆数演算器、1
04は逆数演算器103から与えられる乗数とフィルタ
回路(1)101から与えられる被乗数の乗算を行う乗
算器、105は逆数演算器103より与えられるフィル
タ値を基に、乗算器104から得られる乗算結果の下位
ビットを削除し除算結果を求めるフィルタ回路(2)で
ある。フィルタ回路(1)101及び素数分解器102
を設けることにより、あらかじめ除数に含まれる2のべ
き乗による除算を、除数と被除数に対して下位ビットを
削除することで行われ、後段での演算処理を簡単にする
ことができる。
(Embodiment 1) FIG. 1 shows a block diagram of a divider according to the present invention. FIG. 1 shows the flow from the input of the divisor and the dividend to the divider to the obtaining of the division result. In the figure, 101 is a filter circuit (1) that removes the lower bits of the dividend based on the filter value that is input from the prime number decomposer 102, and 102 is a power of 2 that is calculated from the input divisor, and the exponent is the filter circuit. (1) 10
A prime number decomposer that obtains the filter value input to 1 and deletes only the exponent value of the power of 2 of the lower bits of the input divisor and obtains the remaining bits as the input value of the reciprocal calculator 103, 103 is a multiplier In order to obtain the reciprocal of the value input from the prime factorization unit 102 as a multiplier input to the multiplier 104, and also to obtain the divisor result from the multiplication result obtained from the multiplier 104, the filter circuit (2) 10
Inverse calculator for obtaining the filter value to be input to 5
Reference numeral 04 is a multiplier for multiplying the multiplier given by the reciprocal calculator 103 and the multiplicand given by the filter circuit (1) 101, and 105 is the multiplication obtained by the multiplier 104 based on the filter value given by the reciprocal calculator 103. It is a filter circuit (2) that deletes the lower bits of the result and obtains the division result. Filter circuit (1) 101 and prime number decomposer 102
By providing, the division by the power of 2 included in the divisor in advance is performed by deleting the lower bits of the divisor and the dividend, and the arithmetic processing in the subsequent stage can be simplified.

【0012】図2に素数分解器102の詳細なブロック
図を示す。除数が素数分解器102に入力されると、そ
の値は除数レジスタ108にいったん記憶される。除数
レジスタ108に記憶された値はプライオリティエンコ
ーダ(1)109及びフィルタ回路(3)111に入力
される。プライオリティエンコーダ(1)109へは、
除数レジスタ108の上位ビットと下位ビットが逆転し
て入力され、その結果、除数レジスタ108に記憶され
ている値のうち上位ビットから見て何ビット目に“1”
が現れているかがプライオリティエンコーダ(1)10
9の結果として得られる。減算器(1)110にはあら
かじめ入力される除数の桁数を2進数で表現された値、
例えば16桁であれば“1111”がセットされてお
り、その値からプライオリティエンコーダ(1)109
から得られる値を削除する。その結果、除数レジスタ1
08に記憶されている値のうち下位ビットで連続してい
る“0”の桁数、すなわち、除数に含まれる2のべき乗
要因を求めることができる。減算器(1)110で得ら
れた値は、フィルタ値としてフィルタ回路(1)101
及びフィルタ回路(3)111に与えられる。
FIG. 2 shows a detailed block diagram of the prime number decomposer 102. When the divisor is input to the prime number decomposer 102, its value is temporarily stored in the divisor register 108. The value stored in the divisor register 108 is input to the priority encoder (1) 109 and the filter circuit (3) 111. To the priority encoder (1) 109,
The high-order bit and the low-order bit of the divisor register 108 are inverted and input, and as a result, the 1st bit of the value stored in the divisor register 108 when viewed from the high-order bit is "1".
Priority encoder (1) 10
9 results. In the subtractor (1) 110, the number of digits of the divisor input in advance is represented by a binary number,
For example, if there are 16 digits, “1111” is set, and from that value, the priority encoder (1) 109 is set.
Delete the value obtained from. As a result, divisor register 1
It is possible to find the number of digits of "0" consecutive in the lower bits of the value stored in 08, that is, the power of 2 included in the divisor. The value obtained by the subtracter (1) 110 is used as a filter value in the filter circuit (1) 101.
And the filter circuit (3) 111.

【0013】図3にフィルタ回路(1)101,フィル
タ回路(2)104,フィルタ回路(3)111の詳細
なブロック図を示す。フィルタ回路(1)101,フィ
ルタ回路(2)104,フィルタ回路(3)111で
は、入力された値のうち下位何ビットを削除するかとい
う情報をフィルタ値として削除レジスタ106にいった
ん記憶する。更にセレクタ107を、出力しようとする
ビット数に、削除レジスタ106に記憶されている値を
加え、 得られた値に相当するビットを、入力される値
から選択して出力する。例えば削除レジスタ106に
“0011”がセットされていた場合、ビット0の出力
値は、入力される値の3ビット目に相当する値が、ビッ
ト1の出力値は入力される値の4ビット目に相当する値
が出力される。すなわち、フィルタ回路(1)101,
フィルタ回路(2)104,フィルタ回路(3)111
では、入力される値から削除レジスタ106に記憶され
ている値だけ下位ビットを削除した結果が出力として得
られる。フィルタ回路(3)111では、除数レジスタ
108に記憶されている値のうち、減算器(1)110
で得られた値だけ下位ビットを削除(すなわち、下位ビ
ットのうち連続する“0”の部分を削除)し、母数とし
て逆数演算器103に入力する。
FIG. 3 shows a detailed block diagram of the filter circuit (1) 101, the filter circuit (2) 104, and the filter circuit (3) 111. In the filter circuit (1) 101, the filter circuit (2) 104, and the filter circuit (3) 111, the deletion register 106 temporarily stores information about how many lower bits of the input value should be deleted. Further, the selector 107 adds the value stored in the deletion register 106 to the number of bits to be output, selects the bit corresponding to the obtained value from the input value, and outputs it. For example, when “0011” is set in the deletion register 106, the output value of bit 0 is the value corresponding to the third bit of the input value, and the output value of bit 1 is the fourth bit of the input value. The value corresponding to is output. That is, the filter circuit (1) 101,
Filter circuit (2) 104, filter circuit (3) 111
Then, the result obtained by deleting the lower bits by the value stored in the deletion register 106 from the input value is obtained as the output. In the filter circuit (3) 111, of the values stored in the divisor register 108, the subtracter (1) 110
The lower bits are deleted by the value obtained in (i.e., the continuous "0" part of the lower bits is deleted), and the result is input to the reciprocal calculator 103 as a parameter.

【0014】図4に逆数演算器103の詳細なブロック
図を示す。母数が逆数演算器103に入力されると、プ
ライオリティエンコーダ(2)113にて母数の有効桁
数が判断される。プライオリティエンコーダ(2)11
3で得られた結果は、加算器(1)122で逆数演算器
103にて求めようとする値の桁数を加算し、フィルタ
回路(2)104のフィルタ値を求めるとともに、アジ
ャスタ114に入力されて“1”にプライオリティエン
コーダ(2)113で得られた値だけ“0”の連続した
値を生成する。例えばプライオリティエンコーダ113
の値が“0011”の場合、アジャスタ114からは
“1”に“0”が4個連続した値“10000”が得ら
れる。減算器(2)115では、アジャスタ114にて
求まった値から母数を減算し、その結果を演算ユニット
116に与える。演算ユニット116では、まず減算器
(2)115から得られた値をシフタ117にて最下位
ビットに“0”を付加され、セレクタ119, 減算器
(3)118及びコンパレータ120に与えられる。減
算器(3)118では、シフタ117にて得られた値か
ら母数を減算し、その結果をセレクタ119に与える。
コンパレータ120では、シフタ117にて得られた値
と母数とを比較し、その結果がセレクタ119及びビッ
ト生成器121に入力され、セレクタ119では、(シ
フタ117の値)≧(母数)の場合には減算器(3)1
18の値が、(シフタ117の値)<(母数)の場合に
はシフタ117の値が選択され、次の演算ユニットに渡
される。ビット生成器121では、その演算ユニットの
演算結果として、(シフタ117の値)≧(母数)の場
合には“1”を、(シフタ117の値)<(母数)の場
合には“0”を発生する。以下、最上位ビットを“1”
と固定し、乗算器104の乗数として求めたい桁数分だ
け、演算ユニット116による演算が繰り返される。加
算器(2)112では、計算されずに切り捨てられる桁
数分を考慮し、最下位ビットに“1”を加算し、その結
果を乗数として乗算器104に与える。
FIG. 4 shows a detailed block diagram of the reciprocal calculator 103. When the parameter is input to the reciprocal calculator 103, the priority encoder (2) 113 determines the number of significant digits of the parameter. Priority encoder (2) 11
The result obtained in 3 is added to the number of digits of the value to be obtained by the reciprocal calculator 103 by the adder (1) 122 to obtain the filter value of the filter circuit (2) 104 and input to the adjuster 114. Then, a continuous value of "0" is generated for "1" by the value obtained by the priority encoder (2) 113. For example, the priority encoder 113
When the value of is "0011", the adjuster 114 obtains a value of "10000", which is a series of four "0" s. The subtractor (2) 115 subtracts the parameter from the value obtained by the adjuster 114 and gives the result to the arithmetic unit 116. In the arithmetic unit 116, first, the value obtained from the subtractor (2) 115 is added with “0” to the least significant bit by the shifter 117, and the value is given to the selector 119, the subtractor (3) 118 and the comparator 120. The subtracter (3) 118 subtracts the parameter from the value obtained by the shifter 117, and supplies the result to the selector 119.
The comparator 120 compares the value obtained by the shifter 117 with the parameter, and the result is input to the selector 119 and the bit generator 121. In the selector 119, (value of the shifter 117) ≧ (parameter) If subtractor (3) 1
When the value of 18 is (value of shifter 117) <(parameter), the value of shifter 117 is selected and passed to the next arithmetic unit. In the bit generator 121, as the calculation result of the calculation unit, “1” is given if (value of shifter 117) ≧ (parameter), and “1” if (value of shifter 117) <(parameter). 0 "is generated. Below, the most significant bit is "1"
The calculation by the arithmetic unit 116 is repeated by the number of digits desired to be obtained as the multiplier of the multiplier 104. In the adder (2) 112, "1" is added to the least significant bit in consideration of the number of digits that are truncated without being calculated, and the result is given to the multiplier 104 as a multiplier.

【0015】被除数がフィルタ回路(1)101に入力
されると、素数分解器102により与えられるフィルタ
値分、下位ビットが削除され、その結果が被乗数として
乗算器104に与えられる。すなわち、除数と被除数が
同じ値で割られた後に、乗算器に入力されることとな
る。乗算器104にて得られた結果は、フィルタ回路
(2)105にて小数要因が削除され、除算結果が求ま
る。
When the dividend is input to the filter circuit (1) 101, lower bits are deleted by the filter value given by the prime number decomposer 102, and the result is given to the multiplier 104 as the multiplicand. That is, the divisor and the dividend are divided by the same value and then input to the multiplier. The filter circuit (2) 105 removes the fractional factor from the result obtained by the multiplier 104, and obtains the division result.

【0016】以下、実際に値を用いて本実施例を説明す
る。
The present embodiment will be described below by actually using values.

【0017】図5及び図6に、本発明の除算器にて実際
に数値が処理されていく過程を示す。本例では、除数を
5120(二進数表示では“101000000000
0”)、被除数を40204(二進数表示では“100
1110100001100”)とし、40204が5
120で割られる様子を示している。本例では除数と被
除数が16ビットの二進数で与えられ、除算結果も16
ビットの二進数で求まるものとする。
5 and 6 show a process in which a numerical value is actually processed by the divider of the present invention. In this example, the divisor is 5120 (“101000000000000 in binary notation”).
0 ”), the dividend is 40204 (“ 100 in binary notation ”)
11110100001100 ") and 40204 is 5
It shows how it is divided by 120. In this example, the divisor and dividend are given as 16-bit binary numbers, and the division result is also 16
It shall be obtained as a binary number of bits.

【0018】除数である5120が16ビットの二進数
“0001010000000000”として素数分解
器102に入力されると、プライオリティエンコーダ
(1)109では、上位ビットと下位ビットが逆転した
値“0000000000101000”をエンコード
し、4ビットの二進数“0101”が求まる。減算器
(1)110では、入力される16ビットの除数がエン
コードされる最大の値として“1111”があらかじめ
記憶されており、その値とプライオリティエンコーダ
(1)110から求まる値“0101”の減算を行い
“1010”が求まり、フィルタ回路(1)101及び
フィルタ回路(3)111にフィルタ値として与えられ
る。フィルタ回路(3)111では、除数“00010
10000000000”のうち、減算器(1)110
から与えられるフィルタ値“1010”に従い下位10
ビットが削除され、“000000000000010
1”が求まる。逆数演算器103では、フィルタ回路
(3)111から与えられる“00000000000
00101”がプライオリティエンコーダ(2)113
に入力され、4ビットの二進数“0010”が求まる。
加算器(1)122では、求める乗数のビット数16の
二進数表示“1000”があらかじめ記憶されており、
この値とプライオリティエンコーダ(2)113から与
えられる“0010”の加算を行い“1010”が求ま
り、フィルタ回路(2)105にフィルタ値として与え
られる。また、アジャスタ114では、プライオリティ
エンコーダ(2)113から求まる“0010”に従い
“1”に“0”を3つ付加した値“1000”が求ま
り、16ビット表現“000000000000100
0”として減算器(2)115に与える。減算器(2)
115では、アジャスタ114で得られた値“0000
000000001000”からフィルタ回路(3)1
11で得られた値“000000000000010
1”を減算し、求まった値“000000000000
0011”を演算ユニット116に与える。本例では逆
数演算器から求める桁数として16ビットとしているた
め、16から1を引いた15個の演算ユニットを必要と
する。逆数演算器にて求める桁数は、除算結果として必
要とする演算精度に合わせて、任意の桁数として構わな
い。演算ユニット116にて乗算器104に与える乗数
が求まるまでの過程を図14に示し、以下図を参照して
説明する。
When the divisor 5120 is input to the prime number decomposer 102 as a 16-bit binary number "0001010000000", the priority encoder (1) 109 encodes a value "0000000000101000" in which the upper bit and the lower bit are reversed. A 4-bit binary number "0101" is obtained. In the subtracter (1) 110, “1111” is stored in advance as the maximum value for encoding the input 16-bit divisor, and that value is subtracted from the value “0101” obtained from the priority encoder (1) 110. Then, “1010” is obtained, and is given to the filter circuit (1) 101 and the filter circuit (3) 111 as a filter value. In the filter circuit (3) 111, the divisor “00010”
Subtractor (1) 110 out of 10000000 "
Lower 10 according to the filter value “1010” given by
Bits are deleted, and "00000000000010"
1 ”is obtained. In the reciprocal calculator 103,“ 0000000000 ”given from the filter circuit (3) 111 is obtained.
00101 "is the priority encoder (2) 113
Is input to a 4-bit binary number "0010".
In the adder (1) 122, the binary number display “1000” of the bit number 16 of the multiplier to be calculated is stored in advance,
This value and "0010" given from the priority encoder (2) 113 are added to obtain "1010", which is given to the filter circuit (2) 105 as a filter value. Further, the adjuster 114 obtains a value “1000” obtained by adding three “0” s to “1” according to “0010” obtained from the priority encoder (2) 113, and the 16-bit expression “000000000000100” is obtained.
0 ”is given to the subtractor (2) 115. Subtractor (2)
At 115, the value “0000” obtained by the adjuster 114
Filter circuit (3) 1 from 000000001000 "
The value obtained in 11 is "00000000000010"
The value obtained by subtracting "1" is "000000000000"
0011 "is given to the arithmetic unit 116. In this example, the number of digits obtained from the reciprocal arithmetic unit is 16 bits, so 15 arithmetic units obtained by subtracting 1 from 16 are required. May be an arbitrary number of digits according to the calculation precision required as a result of division.The process until the multiplier to be given to the multiplier 104 in the calculation unit 116 is shown in FIG. explain.

【0019】まず、減算器(2)115からの結果“0
000000000000011”を一つ目の演算ユニ
ット116(これを演算ユニットNo.1とする)が受
け取ると、内部のシフタ117にて最下位ビットに
“0”を付加して“000000000000011
0”とし、この値とフィルタ回路(3)111から与え
られた値“0000000000000101”を減算
器(3)118にて引いた値“00000000000
00001”をセレクタ119に入力する。コンパレー
タ120では、シフタ117の値とフィルタ回路(3)
111の値を比較し、二つの状態(シフタ117の値)
≧(フィルタ回路(3)111の値)及び(シフタ11
7の値)<(フィルタ回路(3)111の値)をセレク
タ119及びビット生成器121に与える。本例では真
の状態を“1”、偽の状態を“0”とすると、演算ユニ
ットNo.1ではシフタ117の値が“0000000
000000110”で、フィルタ回路(3)111の
値が“0000000000000101”であるた
め、(シフタ117の値)≧(フィルタ回路(3)11
1の値)を示す信号が“1”、(シフタ117の値)<
(フィルタ回路(3)111の値)を示す信号が“0”
となる。セレクタ119では(シフタ117の値)≧
(フィルタ回路(3)111の値)を示す信号が“1”
の時には減算器(3)118からの入力を、(シフタ1
17の値)<(フィルタ回路(3)111の値)を示す
信号が“1”の時にはシフタ117からの入力を選択し
て出力する。演算ユニットNo.1では、(シフタ11
7の値)≧(フィルタ回路(3)111の値)を示す信
号が”1”であるため、減算器(3)118からの出
力”0000000000000001”を演算ユニッ
トNo.1の結果として次の演算ユニットに与える。ビ
ット生成器121では、(シフタ117の値)≧(フィ
ルタ回路(3)111の値)を示す信号が“1”の時に
は“1”を、(シフタ117の値)<(フィルタ回路
(3)111の値)を示す信号が“1”の時には“0”
を演算結果として出力する。演算ユニットNo.1では
“1”を出力する。次の演算ユニット116を演算ユニ
ットNo.2とすると、演算ユニットNo.2では演算
ユニットNo.1からの値“000000000000
0001”を受け取り、演算ユニットNo.1と同様の
処理を行う。コンパレータ120では、シフタ117で
得られる値“0000000000000010”とフ
ィルタ回路(3)111から与えられる値“00000
00000000101”を比較し、フィルタ回路
(3)111の値が大きいため、(シフタ117の値)
<(フィルタ回路(3)111の値)を示す信号を
“1”とする。すると、セレクタ119では次の演算ユ
ニットに与える値としてシフタ117の出力“0000
000000000010”を選択して出力し、ビット
生成器121は演算結果として“0”を出力する。以
下、同様に15番目の演算ユニットまで繰り返され、そ
の演算結果の最上位ビットに“1”を付加した値“11
00110011001100”が求まる。加算器
(2)112では、演算を行われずに切り捨てられた1
6個目以降の演算ユニット分の誤差を考慮し、上述の演
算ユニットにて得られた“1100110011001
100”の最下位ビットに“1”を付加する。このよう
にして得られた16ビットの二進数の値“110011
0011001101”を、乗数として乗算器104に
与える。
First, the result "0" from the subtracter (2) 115.
When the first arithmetic unit 116 (which is referred to as arithmetic unit No. 1) receives "00000000000011", the internal shifter 117 adds "0" to the least significant bit and outputs "00000000000011".
"0", and this value and the value "0000000000000101" given from the filter circuit (3) 111 are subtracted by the subtractor (3) 118 to obtain "0000000000".
00001 ″ is input to the selector 119. In the comparator 120, the value of the shifter 117 and the filter circuit (3) are input.
Comparing the values of 111, two states (value of shifter 117)
≧ (value of the filter circuit (3) 111) and (shifter 11
7 value) <(value of filter circuit (3) 111) is given to the selector 119 and the bit generator 121. In this example, assuming that the true state is “1” and the false state is “0”, the arithmetic unit No. When 1, the value of shifter 117 is "0000000".
000000110 ”and the value of the filter circuit (3) 111 is“ 0000000000000101 ”, (value of shifter 117) ≧ (filter circuit (3) 11
The value indicating 1) is “1”, (the value of shifter 117) <
The signal indicating (the value of the filter circuit (3) 111) is “0”.
Becomes In selector 119 (value of shifter 117) ≧
The signal indicating (the value of the filter circuit (3) 111) is "1".
When, the input from the subtracter (3) 118 is (shifter 1
17) <(value of filter circuit (3) 111) is "1", the input from the shifter 117 is selected and output. Arithmetic unit No. In 1, (shifter 11
7) ≧ (value of filter circuit (3) 111) is “1”, the output “0000000000000001” from the subtractor (3) 118 is set to the arithmetic unit No. The result of 1 is given to the next arithmetic unit. In the bit generator 121, when the signal indicating (value of shifter 117) ≧ (value of filter circuit (3) 111) is “1”, “1” is set, (value of shifter 117) <(filter circuit (3)) When the signal indicating the value of 111) is "1", it is "0"
Is output as the calculation result. Arithmetic unit No. At 1, "1" is output. The next arithmetic unit 116 is the arithmetic unit No. 2, the arithmetic unit No. In No. 2, the calculation unit No. Value from 1 "000000000000
0001 ”is received and the same processing as that of the arithmetic unit No. 1 is performed. In the comparator 120, the value“ 00000000000010 ”obtained by the shifter 117 and the value“ 00000 ”given from the filter circuit (3) 111.
00000000101 ", and the value of the filter circuit (3) 111 is large, so (the value of the shifter 117)
A signal indicating <(value of filter circuit (3) 111) is set to “1”. Then, the selector 119 outputs the output "0000" of the shifter 117 as a value to be given to the next arithmetic unit.
"000000000010" is selected and output, and the bit generator 121 outputs "0" as the operation result. Hereinafter, similarly, the operation is repeated up to the fifteenth operation unit, and "1" is added to the most significant bit of the operation result. Value "11"
00110011001100 "is obtained. In the adder (2) 112, 1 which has been rounded down without being calculated
In consideration of the error for the sixth and subsequent arithmetic units, "11001100011001" obtained by the above arithmetic unit.
"1" is added to the least significant bit of 100. The 16-bit binary value "110011" thus obtained.
0011001101 ″ is given to the multiplier 104 as a multiplier.

【0020】被除数である“100111010000
1100”は、フィルタ回路(1)101に入力される
と、素数分解器102内の減算器(1)111から与え
られるフィルタ値“1010”に従い、下位10ビット
が削除され“0000000000100111”とな
り、被乗数として乗算器104に入力される。
The dividend is "100111010000.
When 1100 ″ is input to the filter circuit (1) 101, the lower 10 bits are deleted according to the filter value “1010” given from the subtractor (1) 111 in the prime number decomposer 102 to become “000000000000101111”, and the multiplicand is obtained. Is input to the multiplier 104.

【0021】乗算器104では、与えられる乗数“11
00110011001101”と被乗数“00000
00000100111”の乗算演算を行い、32ビッ
トの2進数“0000000000011111001
1001100111011”が求まる。フィルタ回路
(2)105では、乗算器104の結果から、小数要因
として逆数演算器103から得られるフィルタ値“10
010”に従い、下位18ビットが削除され“0000
000000000111”、すなわち40204を5
120で割った値7(小数点以下は切り捨て)が求ま
る。
In the multiplier 104, the given multiplier "11"
00110011001101 "and multiplicand" 00000
32-bit binary number "000000000000111111001"
In the filter circuit (2) 105, the filter value “10” obtained from the reciprocal calculator 103 as a decimal factor is obtained from the result of the multiplier 104 in the filter circuit (2) 105.
According to "010", the lower 18 bits are deleted to "0000".
000000000111 ", that is, 40204 to 5
The value 7 divided by 120 (rounding down after the decimal point) is obtained.

【0022】また、除算演算を行う除数が、本例の51
20のように2のべき乗要因を多分に持っており、更に
決まった値の除数でしか除算演算を行わない場合には、
あらかじめ除数及び被除数を、除数に含まれる2のべき
乗要因で除算演算を行ってしまうために、以下のように
回路の簡素化を行うことができる。
The divisor for the division operation is 51 in this example.
If there are many factors of powers of 2, such as 20, and if the division operation is performed only with a divisor of a fixed value,
Since the division operation is performed in advance on the divisor and the dividend by the power-of-two factor included in the divisor, the circuit can be simplified as follows.

【0023】図7及び図8に、除数を5120のように
2のべき乗要因として少なくとも2の10乗以上含んで
いる場合の最適化した本発明の除算器により、実際に数
値が処理されていく過程を示す。本例では、除数及び被
除数のうち下位10ビットが削除され、除数の逆数とし
ては、除算結果として求めようとする6ビットに誤差を
考慮して1ビット加算し、7ビットの値を求めれば良
い。すなわち本実施例で使用する乗算器としては、乗数
が7ビット , 被乗数が6ビット , 得られる乗算
結果が13ビットのもので、13ビットの結果から小数
要因として7ビット削除し、6ビットの除算結果が得ら
れることとなる。
In FIGS. 7 and 8, numerical values are actually processed by the optimized divider of the present invention in the case where the divisor contains at least 2 to the 10th power as a power factor of 2 like 5120. Show the process. In this example, the lower 10 bits of the divisor and the dividend are deleted. As the reciprocal of the divisor, 1 bit is added to the 6 bits to be obtained as the division result in consideration of the error, and the value of 7 bits may be obtained. . That is, as the multiplier used in this embodiment, the multiplier is 7 bits, the multiplicand is 6 bits, and the obtained multiplication result is 13 bits. 7 bits are deleted from the result of 13 bits as a decimal factor, and 6 bits are divided. The result will be obtained.

【0024】除数がプライオリティエンコーダ(1)1
09及び減算器(1)110に入力されてフィルタ値
(1)が得られるまでは、前述の手段と同じである。フ
ィルタ回路(3)111では、除数“00010100
00000000”のうち、フィルタ値(1)に従い下
位10ビットが削除され、“000101”が求まる。
ここで、除数には2のべき乗要因として最低10ビット
含まれており、10ビットは必ず削除されるため、フィ
ルタ回路(3)111の出力としては16ビットから1
0ビット引いた6ビットとすることができる。逆数演算
器103では、フィルタ回路(3)111から与えられ
る“000101”がプライオリティエンコーダ(2)
113に入力され、4ビットの二進数“0010”が求
まる。加算器(1)122では、求める乗数のビット数
7の二進数表現“0111”があらかじめ記憶されてお
り、この値とプライオリティエンコーダ(2)113か
ら与えられる“0010”の加算を行い“1001”が
求まり、フィルタ回路(2)105にフィルタ値として
与えられる。また、アジャスタ114では、プライオリ
ティエンコーダ(2)113から求まる“0010”に
従い、“1”に“0”を3つ付加した値“1000”が
求まり、6ビット表現“001000”として減算器
(2)115に与える。減算器(2)115では、アジ
ャスタ114で得られた値“001000”からフィル
タ回路(3)111で得られた値“000101”を減
算し、求まった値“000011”を減算ユニット11
6に与える。演算ユニット116にて演算される様子は
前述の手段と同様であるが、本実施例で乗数として求め
ようとする桁数は7ビットであるため、必要とする演算
ユニットは6個で済む。また、演算ユニットを構成する
減算器も、16ビットではなく6ビットで済むことにな
る。以上により、6個の演算ユニット116の結果の最
上位ビットに“1”を付加した7ビットの値“1100
110”が求まる。加算器(2)112では、演算を行
われずに切り捨てられた7個目以降の演算ユニット分の
誤差を考慮し、上述の演算ユニットにて得られた“11
00110”の最下位ビットに“1”を付加する。この
ようにして得られた7ビットの二進数“110011
1”を乗数として乗算器104に与える。
The divisor is the priority encoder (1) 1
09 and the input to the subtractor (1) 110 to obtain the filter value (1), which is the same as the above-mentioned means. In the filter circuit (3) 111, the divisor “00010100”
The lower 10 bits of “00000000” are deleted according to the filter value (1), and “000101” is obtained.
Here, at least 10 bits are included in the divisor as a power factor of 2, and 10 bits are always deleted. Therefore, the output of the filter circuit (3) 111 is from 16 bits to 1
It can be 6 bits minus 0 bits. In the reciprocal calculator 103, “000101” given from the filter circuit (3) 111 is the priority encoder (2).
It is input to 113 and a 4-bit binary number “0010” is obtained. In the adder (1) 122, the binary number expression “0111” of the bit number 7 of the multiplier to be obtained is stored in advance, and this value is added to “0010” given from the priority encoder (2) 113 to obtain “1001”. Is obtained and is given to the filter circuit (2) 105 as a filter value. Further, the adjuster 114 obtains a value “1000” obtained by adding three “0” s to “1” according to “0010” obtained from the priority encoder (2) 113, and the subtractor (2) as a 6-bit expression “001000”. Give to 115. The subtractor (2) 115 subtracts the value “000101” obtained by the filter circuit (3) 111 from the value “001000” obtained by the adjuster 114, and the obtained value “000011” is obtained by the subtraction unit 11
Give to 6. The operation performed by the operation unit 116 is the same as that described above, but the number of digits to be obtained as the multiplier in this embodiment is 7 bits, and therefore only 6 operation units are required. Further, the subtractor forming the arithmetic unit is also 6 bits instead of 16 bits. As described above, the 7-bit value “1100” in which “1” is added to the most significant bit of the results of the six arithmetic units 116
110 "is obtained. The adder (2) 112 takes into account the error for the seventh and subsequent arithmetic units that have been truncated without performing the arithmetic operation, and takes" 11 "obtained by the above arithmetic unit.
"1" is added to the least significant bit of "00110." The 7-bit binary number "110011" thus obtained.
1 ”is given to the multiplier 104 as a multiplier.

【0025】被除数である“100111010000
1100”は、フィルタ回路(1)101に入力される
と、素数分解器102内の減算器(1)111から与え
られるフィルタ値“1010”に従い、下位10ビット
が削除され、6ビットの値“100111”が被乗数と
して乗算器104に入力される。
The dividend is "100111010000.
When 1100 ″ is input to the filter circuit (1) 101, the lower 10 bits are deleted according to the filter value “1010” given from the subtractor (1) 111 in the prime number decomposer 102, and the 6-bit value “1100”. 100111 ″ is input to the multiplier 104 as a multiplicand.

【0026】乗算器104では、与えられる乗数“11
00111”と被乗数“100111”の乗算演算を行
い、13ビットの二進数“011111011000
1”が求まる。フィルタ回路(2)105では、乗算器
104の結果から、小数要因として逆数演算器103か
ら得られるフィルタ値“1001”に従い、下位9ビッ
トが削除され、“0111”すなわち40204を51
20で除算した値“7”が求まる。
In the multiplier 104, the given multiplier "11"
The multiplication operation of 00111 "and multiplicand" 100111 "is performed to obtain a 13-bit binary number" 011111011000 ".
In the filter circuit (2) 105, the lower 9 bits are deleted from the result of the multiplier 104 according to the filter value “1001” obtained from the reciprocal calculator 103 as a decimal factor, and “0111”, that is, 40204 is obtained. 51
The value “7” divided by 20 is obtained.

【0027】以上のように、本実施例では、除算結果を
求めるのに、入力される除数の値が限られており、除数
に含まれる2のべき乗要因が多分にある場合には、あら
かじめ除数及び被除数から除数に含まれる2のべき乗要
因の指数の値だけ下位の桁を削除することにより、後段
の演算回路の簡素化が図られる。
As described above, in the present embodiment, the value of the divisor to be input is limited to obtain the division result, and when there are many power factors of 2 included in the divisor, the divisor is previously calculated. Also, the arithmetic circuit in the subsequent stage can be simplified by deleting the lower digit from the dividend by the value of the exponent of the power of 2 included in the divisor.

【0028】(実施例2)実施例1では、除算を行う除
数に含まれる2のべき乗要因を算出し、あらかじめ除数
及び被除数を除数に含まれる2のべき乗要因で除算演算
を行ってしまい、後段の演算回路を簡単にする手段につ
いて説明した。実施例1の手段は、除数に含まれる2の
べき乗要因が多い場合には、乗算器及び逆数演算器の構
成を簡素化できるという利点がある。しかし、除数に含
まれる2のべき乗要因が少ない場合には、あらかじめ除
数に含まれる2のべき乗要因で除数及び被除数の除算演
算を行うという利点が無くなってしまう。
(Embodiment 2) In the embodiment 1, a power factor of 2 included in a divisor for division is calculated, and a divisor and a dividend are divided in advance by a power factor of 2 included in the divisor, and the latter stage is performed. The means for simplifying the arithmetic circuit of 1. has been described. The means of the first embodiment has an advantage that the configurations of the multiplier and the reciprocal calculator can be simplified when there are many power-of-two factors included in the divisor. However, when the power of 2 factor included in the divisor is small, the advantage of performing the division operation of the divisor and the dividend by the power of 2 factor included in the divisor in advance is lost.

【0029】本実施例2では、除数に含まれる2のべき
乗要因が少ない演算を行う場合に有利な手段について説
明する。
In the second embodiment, means which is advantageous when performing an operation in which the power factor of 2 included in the divisor is small will be described.

【0030】図9に実施例2における除算装置のブロッ
ク図を示す。図において逆数演算器102,乗算器10
4及びフィルタ回路(2)105は、実施例の構成と同
じ構成である。
FIG. 9 shows a block diagram of the dividing device in the second embodiment. In the figure, the reciprocal calculator 102 and the multiplier 10
4 and the filter circuit (2) 105 have the same configuration as that of the embodiment.

【0031】図10及び図11に本実施例にて実際に数
値を用いた処理の過程を示す。本例では、除数を25
(二進数表示では“0000000011001”)、
被除数を40204(二進数表示では“1001110
100001100”)とし、40204が25で割ら
れる様子を示している。本例では除数と被除数が16ビ
ットの二進数で与えられ、除算結果も16ビットの二進
数で求まるものとする。
FIG. 10 and FIG. 11 show the steps of processing using numerical values in this embodiment. In this example, the divisor is 25
(“00000000011001” in binary display),
The dividend is 40204 ("1001110" in binary notation)
100001100 ″) and 40204 is divided by 25. In this example, the divisor and dividend are given as 16-bit binary numbers, and the division result is also obtained as 16-bit binary numbers.

【0032】除数である25が、16ビットの二進数
“0000000000011001”として逆数演算
器103に入力されると、プライオリティエンコーダ
(2)113にて4ビットの二進数“0100”が求ま
る。加算器(1)122では、入力される乗数のビット
数16の二進数表示“10000”があらかじめ記憶さ
れており、この値とプライオリティエンコーダ(2)1
13から与えられる“0100”の加算を行い“101
00”が求まり、フィルタ回路(2)105にフィルタ
値として与えられる。また、アジャスタ114ではプラ
イオリティエンコーダ(2)113から求まる“010
0”に従い、“1”に“0”を5個付加した値“100
000”が求まり、16ビット表現“00000000
00100000”として減算器(2)115に与え
る。減算器(2)115では、アジャスタ114で得ら
れた値“0000000000100000”から除数
“0000000000011001”を減算し、求ま
った値“0000000000000111”を演算ユ
ニット116に与える。本例では逆数演算器103から
求める桁数として16ビットとしているため、16から
1を引いた15個の演算ユニットを必要とする。逆数演
算器103にて求める桁数は、除算結果として必要とす
る演算精度に合わせて任意の桁数として構わない。演算
ユニット116にて乗算器104に与える乗数が求まる
までの過程を図15に示し、以下図を参照して説明す
る。
When the divisor 25 is input to the reciprocal calculator 103 as a 16-bit binary number "00000000001001001," the 4-bit binary number "0100" is obtained by the priority encoder (2) 113. In the adder (1) 122, the binary number display “10000” of the input multiplier 16 bits 16 is stored in advance, and this value and the priority encoder (2) 1 are stored.
Add “0100” given from 13 to “101
00 "is obtained and given to the filter circuit (2) 105 as a filter value. Further, in the adjuster 114," 010 "obtained from the priority encoder (2) 113.
The value "100", which is obtained by adding five "0" s to "1" according to "0"
000 "is obtained, and the 16-bit expression" 00000000 "is obtained.
It is given to the subtracter (2) 115 as "00100000". In the subtractor (2) 115, the divisor "00000000001011001" is subtracted from the value "0000000000100000" obtained by the adjuster 114, and the obtained value "0000000000000111" is given to the arithmetic unit 116. In this example, since the number of digits to be obtained from the reciprocal calculator 103 is 16 bits, 15 arithmetic units are required by subtracting 1 from 16. The number of digits to be obtained by the reciprocal calculator 103 is obtained as a division result. Any number of digits may be used according to the required calculation accuracy.The process until the multiplier to be given to the multiplier 104 in the calculation unit 116 is shown in FIG.

【0033】まず、減算器(2)115からの結果“0
000000000000111”を一つ目の演算ユニ
ット116(これを演算ユニットNo.1とする)が受
け取ると、内部のシフタ117にて最下位ビットに
“0”を付加して“000000000000111
0”とし、この値と除数“0000000000011
001”を減算器(3)118にて引いた値“1111
111111110101”をセレクタ119に入力す
る。コンパレータ120では、シフタ117の値と除数
を比較し、二つの状態(シフタ117の値)≧(除数)
及び(シフタ117の値)<(除数)をセレクタ119
及びビット生成器121に与える。本例では真の状態を
“1”、偽の状態を“0”とすると、演算ユニットN
o.1では、シフタ117の値が“000000000
0001110”で、除数が“00000000000
11001”であるため、(シフタ117の値)≧(除
数)を示す信号が“0”、(シフタ117の値)<(除
数)を示す信号が“1”となる。セレクタ119では、
(シフタ117の値)≧(除数)を示す信号が“1”の
時には減算器(3)118からの入力を、(シフタ11
7の値)<(除数)を示す信号が“1”の時にはシフタ
117からの入力を選択して出力する。演算ユニットN
o.1では、(シフタ117の値)<(除数)を示す信
号が“1”であるため、シフタ117からの入力“00
00000000001110”を演算ユニットNo.
1の結果として次の演算ユニットに与える。ビット生成
器121では、(シフタ117の値)≧(除数)を示す
信号が“1”の時には“1”を、(シフタ117の値)
<(除数)を示す信号が“1”の時には“0”を演算結
果として出力する。演算ユニットNo.1では、“0”
を出力する。次の演算ユニット116を演算ユニットN
o.2とすると、演算ユニットNo.2では演算ユニッ
トNo.1からの値“000000000000111
0”を受け取り、演算ユニットNo.1と同様の処理を
行う。コンパレータ120では、シフタ117で得られ
る値“0000000000011100”と除数“0
000000000011001”を比較し、シフタ1
17の値が大きいため(シフタ117の値)≧(除数)
を示す信号を“1”とする。すると、セレクタ119で
は、次の演算ユニットに与える値として、減算器118
からの入力“0000000000000011”を選
択して出力し、ビット生成器121は演算結果として
“1”を出力する。以下、同様に15番目の演算ユニッ
トまで繰り返され、その演算結果の最上位ビットに
“1”を付加した値“101000111101100
0”が求まる。加算器(2)112では、演算を行われ
ずに切り捨てられた16個目以降の演算ユニット分の誤
差を考慮し、上述の演算ユニットにて得られた“101
0001111010111”の最下位ビットに“1”
を付加する。このようにして得られた16ビットの二進
数の値“1010001111011000”を乗数と
して乗算器104に与える。
First, the result "0" from the subtracter (2) 115.
When the first arithmetic unit 116 (this is arithmetic unit No. 1) receives "000000000000111", the internal shifter 117 adds "0" to the least significant bit and outputs "00000000000011".
0 ", and this value and divisor" 00000000000011 "
The value obtained by subtracting "001" by the subtractor (3) 118 is "1111".
111111110101 ″ is input to the selector 119. In the comparator 120, the value of the shifter 117 is compared with the divisor, and two states (value of the shifter 117) ≧ (divisor)
And (value of shifter 117) <(divisor) is set to selector 119
And the bit generator 121. In this example, assuming that the true state is “1” and the false state is “0”, the arithmetic unit N
o. When 1, the value of the shifter 117 is “000000000000”.
0001110 "and the divisor is" 0000000000 "
Since 11001 ”, the signal indicating (value of shifter 117) ≧ (divisor) is“ 0 ”, and the signal indicating (value of shifter 117) <(divisor) is“ 1 ”.
When the signal indicating (value of shifter 117) ≧ (divisor) is “1”, the input from the subtractor (3) 118 is changed to (shifter 11).
When the signal indicating (value of 7) <(divisor) is "1", the input from the shifter 117 is selected and output. Arithmetic unit N
o. In the case of 1, the signal indicating (value of shifter 117) <(divisor) is “1”, so the input from shifter 117 is “00”.
00000000000011110 "is the arithmetic unit No.
The result of 1 is given to the next arithmetic unit. In the bit generator 121, when the signal indicating (value of shifter 117) ≧ (divisor) is “1”, “1” is set, and (value of shifter 117)
When the signal indicating <(divisor) is "1", "0" is output as the operation result. Arithmetic unit No. 1 means “0”
Is output. The next arithmetic unit 116 is changed to the arithmetic unit N
o. 2, the arithmetic unit No. In No. 2, the calculation unit No. Value from 1 "00000000000011
0 "is received and processing similar to that of the arithmetic unit No. 1 is performed. In the comparator 120, the value" 00000000000011100 "obtained by the shifter 117 and the divisor" 0 "are obtained.
00000000000011 1001 "and shifter 1
17 is large (value of shifter 117) ≧ (divisor)
Is set to "1". Then, in the selector 119, as the value to be given to the next arithmetic unit, the subtractor 118
The input "00000000000011" is selected and output, and the bit generator 121 outputs "1" as the operation result. Hereinafter, similarly, the processing is repeated up to the fifteenth operation unit, and the value "101000111101100" is obtained by adding "1" to the most significant bit of the operation result.
0 "is obtained. The adder (2) 112 takes into account the error for the 16th and subsequent arithmetic units that have been truncated without performing the arithmetic operation, and take" 101 "obtained by the above arithmetic unit.
"1" in the least significant bit of 0001111010111 "
Is added. The 16-bit binary value "1010001111011000" thus obtained is supplied to the multiplier 104 as a multiplier.

【0034】被除数である“100111010000
1100”は、そのまま被乗数として乗算器104に入
力される。
The dividend is "100111010000"
1100 ″ is directly input to the multiplier 104 as a multiplicand.

【0035】乗算器104では、与えられる乗数“10
10001111011000”と被乗数“10011
10100001100”の乗算を行い、32ビットの
二進数“011001001000001100100
11000100000”が求まる。フィルタ回路
(2)105では、乗算器104の結果から、小数要因
として逆数演算器103から得られるフィルタ値“10
100”に従い、下位20ビットが削除され“0110
01001000”、すなわち40204を25で割っ
た値“1608”(小数点以下は切り捨て)が求まる。
In the multiplier 104, the given multiplier "10"
10001111011000 "and multiplicand" 10011 "
32-bit binary number "011001001000001100100"
In the filter circuit (2) 105, the filter value “10” obtained from the reciprocal calculator 103 as a decimal factor is obtained from the result of the multiplier 104.
According to "100", the lower 20 bits are deleted to "0110".
01001000 ", that is, a value" 1608 "obtained by dividing 40204 by 25 (fractions below the decimal point are truncated) is obtained.

【0036】以上述べたように、本実施例では除数に含
まれる2のべき乗要因が少ない場合に、実施例1におけ
る逆演算器,乗算器及びフィルタ回路(2)を使用し、
しかも、除数に含まれる2のべき乗要因で除数及び被除
数を除算するためのフィルタ回路(1)及び素数分解器
が不要となるため、回路の簡素化が図れる。
As described above, in this embodiment, when the power factor of 2 included in the divisor is small, the inverse calculator, the multiplier and the filter circuit (2) in the first embodiment are used,
Moreover, since the filter circuit (1) and the prime number decomposer for dividing the divisor and the dividend by the power-of-two factor included in the divisor are not required, the circuit can be simplified.

【0037】(実施例3)実施例1及び実施例2では、
除数の逆数を求めたり、乗算結果に含まれる小数要因の
桁数を求めるのに、全て演算回路により構成されている
実施例について説明した。
(Example 3) In Example 1 and Example 2,
The embodiment has been described in which the arithmetic circuit is used to obtain the reciprocal of the divisor and the number of digits of the decimal factor included in the multiplication result.

【0038】実施例3では、除数の逆数を求めたり、乗
算結果に含まれる小数要因の桁数を求めるのに、演算を
専門に行うマイクロプロセッサーを利用した例について
説明する。
In the third embodiment, an example will be described in which a microprocessor specialized in arithmetic is used to obtain the reciprocal of the divisor or the number of digits of the fractional factor included in the multiplication result.

【0039】図12に実施例3におけるブロック図を示
す。図において、301は除算演算を行うために与えら
れる除数及び被除数から、乗算器104に与える乗数及
び被乗数と、乗算器から得られた結果に含まれる小数要
因の桁数を求める演算を専用に行うためのマイクロプロ
セッサーである。マイクロプロセッサー301は、RO
M302に格納されたプログラムに基づいて、図13に
示すフローチャートの処理を行う。
FIG. 12 shows a block diagram in the third embodiment. In the figure, reference numeral 301 is dedicated to an operation for obtaining a multiplier and a multiplicand to be given to the multiplier 104 and a number of digits of a decimal factor included in a result obtained from the multiplier, from a divisor and a dividend to be given for performing a division operation. Is a microprocessor for. Microprocessor 301 is RO
The processing of the flowchart shown in FIG. 13 is performed based on the program stored in M302.

【0040】本実施例によれば、マイクロプロセッサー
が、除数の逆数を求めたり、乗算結果に含まれる小数要
因の桁数を求めてくれるため、実施例1及び実施例2に
て使用していたフィルタ回路(1)や素数分解器,逆数
演算器が不要となり、回路の簡素化が図れる。
According to the present embodiment, the microprocessor calculates the reciprocal of the divisor and the number of digits of the fractional factor included in the multiplication result, so that it is used in the first and second embodiments. Since the filter circuit (1), the prime number decomposer, and the reciprocal number calculator are not required, the circuit can be simplified.

【0041】以上説明したように、本実施例によれば、
除算演算を行うに当り、除数に含まれる2のべき乗要因
を計数する手段を設け、前記手段により得られた値に従
い、あらかじめ除数と被除数の除算を実行する手段を持
ち、かつ、除数の逆数を求める手段を設けることによ
り、被除数と除数の除算を乗算器を用いることにより実
現し、更に、乗算結果に含まれる小数要因の桁数を計数
する手段を持つことにより正確に除算結果が求まり、以
上のような簡単な回路構成で任意の除数と被除数に対応
した除算装置を実現することができる。
As described above, according to this embodiment,
In performing the division operation, means for counting the power of two factors included in the divisor is provided, and means for executing division of the divisor and dividend according to the value obtained by the means is provided, and the reciprocal of the divisor is calculated. By providing the means for obtaining, the division of the dividend and the divisor is realized by using the multiplier, and further, the means for counting the number of digits of the decimal factor included in the multiplication result can accurately obtain the division result. With such a simple circuit configuration, it is possible to realize a division device corresponding to an arbitrary divisor and dividend.

【0042】[0042]

【発明の効果】以上説明したように本発明によれば、任
意の除数と被除数に対応することができ、更に除算結果
を記憶しておくメモリが不要となるため、演算処理の高
速化が図れる。
As described above, according to the present invention, an arbitrary divisor and dividend can be dealt with, and a memory for storing the result of division is unnecessary, so that the arithmetic processing can be speeded up. .

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

【図1】本発明の実施例1における除算装置の構成を示
すブロック図、
FIG. 1 is a block diagram showing the configuration of a dividing device according to a first embodiment of the present invention,

【図2】素数分解器の構成例を示すブロック図、FIG. 2 is a block diagram showing a configuration example of a prime number decomposer,

【図3】フィルタ回路(1),(2),(3)の構成例
を示すブロック図
FIG. 3 is a block diagram showing a configuration example of filter circuits (1), (2), and (3).

【図4】逆数演算器の構成例を示すブロック図FIG. 4 is a block diagram showing a configuration example of an inverse calculator.

【図5】実施例1の除算装置にて各ブロック毎に具体例
の処理過程を示した概念図、
FIG. 5 is a conceptual diagram showing the processing steps of a concrete example for each block in the dividing device according to the first embodiment;

【図6】実施例1の除算装置にて各ブロック毎に具体例
の処理過程を示した概念図、
FIG. 6 is a conceptual diagram showing the processing steps of a concrete example for each block in the division device according to the first embodiment;

【図7】実施例1の除算装置にて、回路を簡素化した場
合の各ブロック毎に具体例の処理過程を示したデータ処
理図、
FIG. 7 is a data processing diagram showing processing steps of a specific example for each block when the circuit is simplified in the division device of the first embodiment;

【図8】実施例1の除算装置にて、回路を簡素化した場
合の各ブロック毎に具体例の処理過程を示したデータ処
理図、
FIG. 8 is a data processing diagram showing the processing steps of a specific example for each block when the circuit is simplified in the division device of the first embodiment;

【図9】実施例2における除算装置の構成を示すブロッ
ク図
FIG. 9 is a block diagram showing a configuration of a dividing device according to a second embodiment.

【図10】実施例2の除算装置にて各ブロック毎に具体
例の処理過程を示したデータ処理図、
FIG. 10 is a data processing diagram showing the processing steps of a specific example for each block in the dividing device according to the second embodiment;

【図11】本発明の第2実施例の除算装置にて各ブロッ
ク毎に具体例の処理過程を示したデータ処理図、
FIG. 11 is a data processing diagram showing the processing steps of a specific example for each block in the dividing device according to the second embodiment of the present invention;

【図12】実施例3における除算装置の構成を示すブロ
ック図である。
FIG. 12 is a block diagram showing a configuration of a dividing device according to a third embodiment.

【図13】実施例3における除算装置のマイクロコンピ
ュ−タの動作を示すフローチャート
FIG. 13 is a flowchart showing the operation of the microcomputer of the division device in the third embodiment.

【図14】実施例1の演算ユニットにおける処理の概念
FIG. 14 is a conceptual diagram of processing in the arithmetic unit according to the first embodiment.

【図15】実施例2の演算ユニットに置ける処理の概念
FIG. 15 is a conceptual diagram of processing that can be performed in the arithmetic unit according to the second embodiment.

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

101 フィルタ回路(1) 102 素数分解器 103 逆数演算器 104 乗算器 105 フィルタ回路(2) 106 削除レジスタ 107 セレクタ 108 除算レジスタ 109 プライオリティエンコーダ(1) 110 減算器 111 フィルタ回路(3) 112 加算器(2) 113 プライオリティエンコーダ(2) 114 アジャスタ 115 減算器(2) 116 演算ユニット 117 シフタ 118 減算器(3) 119 セレクタ 120 コンパレータ 121 ビット生成器 122 加算器(1) 301 マイクロプロセッサ 101 filter circuit (1) 102 prime number decomposer 103 reciprocal operator 104 multiplier 105 filter circuit (2) 106 deletion register 107 selector 108 division register 109 priority encoder (1) 110 subtractor 111 filter circuit (3) 112 adder ( 2) 113 priority encoder (2) 114 adjuster 115 subtractor (2) 116 arithmetic unit 117 shifter 118 subtractor (3) 119 selector 120 comparator 121 bit generator 122 adder (1) 301 microprocessor

───────────────────────────────────────────────────── フロントページの続き (72)発明者 棚橋 淳一 東京都大田区下丸子3丁目30番2号キヤノ ン株式会社内 (72)発明者 森本 はじめ 東京都大田区下丸子3丁目30番2号キヤノ ン株式会社内 (72)発明者 小野 研一郎 東京都大田区下丸子3丁目30番2号キヤノ ン株式会社内 (72)発明者 坂下 達也 東京都大田区下丸子3丁目30番2号キヤノ ン株式会社内 ─────────────────────────────────────────────────── ─── Continuation of front page (72) Inventor Junichi Tanahashi 3-30-2 Shimomaruko, Ota-ku, Tokyo Canon Inc. (72) Inventor Morimoto Hajime 3-30-2 Shimomaruko, Ota-ku, Tokyo Canon Incorporated (72) Inventor Kenichiro Ono 3-30-2 Shimomaruko, Ota-ku, Tokyo Canon Inc. (72) Inventor Tatsuya Sakashita 3-30-2 Shimomaruko, Ota-ku, Tokyo Canon Inc.

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 二進数で与えられる除数と被除数とから
除算演算を行い、その結果を求める除算装置において、 除数の逆数と有効桁数とを求める手段と、 該手段により得られる除数の逆数と被除数とを乗算演算
する手段と、 求められた乗算結果から前記有効桁数に基づいて小数要
因を削除して除算結果を求める手段とを具えたことを特
徴とする除算装置。
1. A division device for performing a division operation from a divisor and a dividend given by a binary number and obtaining the result, means for obtaining the reciprocal of the divisor and the number of significant digits, and a reciprocal of the divisor obtained by the means. A division device comprising means for multiplying a dividend and a means for obtaining a division result by deleting a fractional factor from the obtained multiplication result based on the number of significant digits.
【請求項2】 請求項1記載の除算装置において、 あらかじめ除数に含まれる2のべき乗要因を計数する計
数手段と、 除数と被除数とから前記計数手段にて得られた2のべき
乗の指数に相当する下位の桁を削除する手段と、 を具えたことを特徴とする除算装置。
2. The dividing device according to claim 1, wherein the counting means counts factors of powers of 2 included in the divisor in advance, and an exponent of 2 obtained by the counting means from the divisor and dividend. A dividing device, characterized in that it comprises a means for deleting the lower digit.
【請求項3】 二進数で与えられる除数と被除数とから
除算演算を行い、その結果を求める除算方法において、 除数の逆数と有効桁数を求め、 求めた除数の逆数と被除数とを乗算演算し、 得られた乗算結果から有効桁数に基づいて小数要因を削
除して除算結果を求めることを特徴とする除算方法。
3. A division method is carried out from a divisor and a dividend given by a binary number, and in a division method for obtaining the result, the reciprocal of the divisor and the number of significant digits are obtained, and the reciprocal of the obtained divisor and the dividend are multiplied. A division method characterized in that a fractional factor is deleted from the obtained multiplication result based on the number of significant digits to obtain a division result.
JP4331799A 1992-12-11 1992-12-11 Device and method for division Pending JPH06180640A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4331799A JPH06180640A (en) 1992-12-11 1992-12-11 Device and method for division

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4331799A JPH06180640A (en) 1992-12-11 1992-12-11 Device and method for division

Publications (1)

Publication Number Publication Date
JPH06180640A true JPH06180640A (en) 1994-06-28

Family

ID=18247774

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4331799A Pending JPH06180640A (en) 1992-12-11 1992-12-11 Device and method for division

Country Status (1)

Country Link
JP (1) JPH06180640A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005004755A (en) * 2003-06-10 2005-01-06 Korea Advanced Inst Of Science & Technology Division unit of three-dimensional computer graphic system
JP2020160704A (en) * 2019-03-26 2020-10-01 日本電産株式会社 Integer division device and motor control device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005004755A (en) * 2003-06-10 2005-01-06 Korea Advanced Inst Of Science & Technology Division unit of three-dimensional computer graphic system
JP2020160704A (en) * 2019-03-26 2020-10-01 日本電産株式会社 Integer division device and motor control device

Similar Documents

Publication Publication Date Title
US5500812A (en) Multiplication circuit having rounding function
EP0158530B1 (en) Nonrestoring divider
EP0149248A2 (en) Method and apparatus for division using interpolation approximation
JPS6347874A (en) Arithmetic unit
JPH01125626A (en) Reciprocal calculating method
TW200532552A (en) Methods and apparatus for performing mathematical operations using scaled integers
US5648924A (en) Method and apparatus for finding arctangents
JPS5939774B2 (en) Exponential function calculation method
JPH06180640A (en) Device and method for division
JPH0831024B2 (en) Arithmetic processor
WO1999067704A1 (en) System for division using small-capacity memory
JP3074910B2 (en) Division device
JP2972326B2 (en) Square root calculator
JPH0225924A (en) Floating point arithmetic processor
JP2777265B2 (en) High radix square root arithmetic unit
JP3277220B2 (en) Operation method of remainder multiplication device
JP3068640B2 (en) Computing device
JP2010033275A (en) Data processing method and data processor
JP3078696B2 (en) Reciprocal arithmetic unit
JPH0769785B2 (en) Divider
JPH08249161A (en) Cubic root arithmetic unit
JPH0368414B2 (en)
JPH0695855A (en) Inverse number generating circuit and digital signal processor using the same
JPH0754458B2 (en) Multiplication circuit
JPH0414173A (en) Fixed point product sum computing element

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060221

RD04 Notification of resignation of power of attorney

Effective date: 20060221

Free format text: JAPANESE INTERMEDIATE CODE: A7424

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20081014

A601 Written request for extension of time

Free format text: JAPANESE INTERMEDIATE CODE: A601

Effective date: 20090113

A602 Written permission of extension of time

Free format text: JAPANESE INTERMEDIATE CODE: A602

Effective date: 20090116

A601 Written request for extension of time

Free format text: JAPANESE INTERMEDIATE CODE: A601

Effective date: 20090216

A602 Written permission of extension of time

Free format text: JAPANESE INTERMEDIATE CODE: A602

Effective date: 20090219

A521 Written amendment

Effective date: 20090316

Free format text: JAPANESE INTERMEDIATE CODE: A523

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090508

A601 Written request for extension of time

Effective date: 20090810

Free format text: JAPANESE INTERMEDIATE CODE: A601

A602 Written permission of extension of time

Effective date: 20090813

Free format text: JAPANESE INTERMEDIATE CODE: A602

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090908

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20091006

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20091105

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121113

Year of fee payment: 3

R150 Certificate of patent (=grant) or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121113

Year of fee payment: 3

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20131113

Year of fee payment: 4

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250