JPH04170637A - Divider circuit - Google Patents
Divider circuitInfo
- Publication number
- JPH04170637A JPH04170637A JP2299303A JP29930390A JPH04170637A JP H04170637 A JPH04170637 A JP H04170637A JP 2299303 A JP2299303 A JP 2299303A JP 29930390 A JP29930390 A JP 29930390A JP H04170637 A JPH04170637 A JP H04170637A
- Authority
- JP
- Japan
- Prior art keywords
- dividend
- circuit
- divisor
- difference
- bits
- 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
- 238000010586 diagram Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 3
- 238000000034 method Methods 0.000 description 3
- 238000011410 subtraction method Methods 0.000 description 1
Abstract
Description
【発明の詳細な説明】
〔産業上の利用分野〕
本発明は除算回路に関し、特に2進数での除算回路に関
する。DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a division circuit, and particularly to a division circuit in binary numbers.
第2図は従来の除算回路の一例を示すブロック図である
。FIG. 2 is a block diagram showing an example of a conventional division circuit.
第2図に示す本例における除算方法は10進数での減算
と同じ方法である。すなわち、mビット被除数X1をシ
フト回路16により最上位から左に1ビツトずつシフト
していき、得られた被除数X′とインバータ回路18を
通ったnビット除数Yとを加算回路19において加算を
行う。X /。The division method in this example shown in FIG. 2 is the same as the decimal subtraction method. That is, the m-bit dividend X1 is shifted bit by bit from the most significant bit to the left by the shift circuit 16, and the obtained dividend X' and the n-bit divisor Y passed through the inverter circuit 18 are added together in the adder circuit 19. . X/.
Y比較器17では被除数X′と除数Yとを比較し、被除
数X′が除数7以上の値になった時に加算した値を選び
、商に「1」を立てる。このとき加算した値の後ろには
、まだシフトしていない被除数Xの残りを追加する。除
数7未満の値の時は被除数X′そのものを選び、商に「
0」を立てて次のビットをシフトする。The Y comparator 17 compares the dividend X' and the divisor Y, selects the added value when the dividend X' becomes a value greater than or equal to the divisor 7, and sets "1" to the quotient. After the added value at this time, the remainder of the dividend X that has not yet been shifted is added. When the value of the divisor is less than 7, select the dividend X' itself and enter "
0" and shift the next bit.
そして、また同様に1ビツトずつシフトしながら減算で
きなくなるまでこれを繰り返して演算を行っている。最
終的な商3の値は、被除数Xをシフトする毎にX’、Y
比較器17で商にたてた値をシフト回路21でシフトし
て得られる。剰余4の値は減算できなくなった時点での
値となる。Then, in the same manner, the calculation is repeated by shifting one bit at a time until subtraction is no longer possible. The final value of quotient 3 is X', Y every time the dividend X is shifted.
It is obtained by shifting the value determined by the comparator 17 as a quotient in the shift circuit 21. The value of remainder 4 is the value at the time when subtraction is no longer possible.
この従来の除算回路では、左に1ビツトシフトした被除
数Xを減算するため除数Yをインバートして加算したも
のと単にシフトした被除数Xとを、シフトした被除数X
が除数Y以上か未満かでセレクトしているため、回路ブ
ロックはインバータ、加算、セレクタの3段構成となり
、次の被除数を求めるためにかなりの演算時間を要して
いた。In this conventional division circuit, in order to subtract the dividend X shifted by 1 bit to the left, the result obtained by inverting and adding the divisor Y and the simply shifted dividend X is subtracted from the shifted dividend X.
Since the selection is made based on whether the number is greater than or less than the divisor Y, the circuit block has a three-stage configuration of an inverter, an adder, and a selector, and it takes a considerable amount of calculation time to find the next dividend.
CMO8G/Aで被除数を4ビツト、除数を3ビツトと
した例をとると、インバータで約0.4n S +加算
で約5 n s v セレクタで約1.2nsと次の被
除数を求めるのに全体で約8.8nsもかかるというよ
うな問題点があった。Taking an example in which the dividend is 4 bits and the divisor is 3 bits in a CMO8G/A, the inverter takes about 0.4n S + the addition takes about 5 n s v The selector takes about 1.2 ns, and it takes the entire time to find the next dividend. There was a problem that it took about 8.8 ns.
現今、信号処理に用いているクロックの1周期は約20
nsという高速なものなので、演算時間の短い構成の除
算回路が要求されているが、従来の回路ではこの要求を
満足できない。Currently, one cycle of the clock used for signal processing is approximately 20
Since it is a high-speed device of ns, a division circuit with a short calculation time is required, but conventional circuits cannot satisfy this requirement.
本発明の目的は、次の被除数を求めるための演算時間の
短い除算回路を提供することにある。SUMMARY OF THE INVENTION An object of the present invention is to provide a division circuit that takes a short calculation time to obtain the next dividend.
本発明の除算回路は、除数を1桁増やして最上位桁を“
1″、それ以外の桁をすべて“O”にすることにより被
除数と前記除数の差分を求める第1の回路と、前記1桁
増えた除数を前記被除数と桁数をあわせた後排他的論理
和回路で差分を求める第2の回路と、前記1桁増えた除
数と前記光の除数との差分を排他的否定論理和回路及び
1を加算する1加算回路により求める第3の回路と、前
記それぞれの差分を加算して次の被除数を求める第4の
回路とを備えることを特徴とする。The division circuit of the present invention increases the divisor by one digit and sets the most significant digit to “
1'', a first circuit that calculates the difference between the dividend and the divisor by setting all other digits to "O", and an exclusive OR after adding the divisor increased by one digit to the dividend and the number of digits. a second circuit that calculates the difference using a circuit; a third circuit that calculates the difference between the divisor increased by one digit and the divisor of light using an exclusive NOR circuit and a 1 addition circuit that adds 1; and a fourth circuit that calculates the next dividend by adding the differences between the numbers.
第1図は本発明の一実施例を示す除算側路のブロック図
である。FIG. 1 is a block diagram of a division circuit showing one embodiment of the present invention.
mビット被除数X1をnビット除数Y2で除算する時、
まずnビットの除数Y2を2 n+1作成回路5で2″
+1の形に置き換えて除数Y′を作り、被除数X1が除
数Y′以上ならm−(n+1)ビットシフト回路7で左
にシフトしてmビットの被除数X1と桁数を合わせる。When dividing the m-bit dividend X1 by the n-bit divisor Y2,
First, the n-bit divisor Y2 is 2'' by the 2 n+1 creation circuit 5.
+1 to create a divisor Y', and if the dividend X1 is greater than or equal to the divisor Y', it is shifted to the left by the m-(n+1) bit shift circuit 7 to match the number of digits with the m-bit dividend X1.
そして、各桁を排他的論理和回路(EX−OR)11を
通すことにより、被除数X1と除数Y′との差分Vを求
める。Then, by passing each digit through an exclusive OR circuit (EX-OR) 11, the difference V between the dividend X1 and the divisor Y' is determined.
次に21″+1と除数Y2との差分Wを求める。これは
nビット以下の桁についてそれぞれ排他的否定論理和回
路(EX−NOR)8と1加算回路9とを通すことによ
り求まる。そして、この差分Wはm−(n+1)ビット
シフト回路10でシフトされ、被除数X′作成加算回路
12で差分Vと加算することにより、次の被除数X′が
求まる。除算の商はm−(n+1)ビット左にシフトし
たことにあたり、2′′″−110作成回路θにより求
まる。Next, find the difference W between 21''+1 and the divisor Y2. This is found by passing the digits of n bits or less through an exclusive NOR circuit (EX-NOR) 8 and a 1 adder circuit 9, respectively. Then, This difference W is shifted by the m-(n+1) bit shift circuit 10, and the next dividend X' is obtained by adding it to the difference V in the dividend X' creation adding circuit 12.The quotient of the division is m-(n+1). The bit shift to the left is determined by the 2''''-110 generation circuit θ.
次に、今度の被除数X′が2 n+1以上かを調べる。Next, it is checked whether the current dividend X' is greater than or equal to 2n+1.
以上であれば上述と同様のことを繰り返し、新たに求ま
った商を加算回路13で前の商に加算していく。未満の
時は除数Yとの比較を行う。除数Y以上であれば、X’
−Y減算回路15で減算することにより最終的な剰余
4が求まる。未満の時は、今の被除数X′が剰余そのも
のとなる。商については減算された時に、累積されてき
た商に1加算回路14で「1」を加算することにより最
終的な商3が求まる。減算されない時は「1」は加算さ
れず、その状態が最終的な商3となる。If the above is the case, the same process as described above is repeated, and the newly found quotient is added to the previous quotient by the addition circuit 13. If it is less than Y, a comparison is made with the divisor Y. If the divisor Y or more, X'
The final remainder 4 is determined by subtraction in the -Y subtraction circuit 15. When it is less than, the current dividend X' becomes the remainder itself. When the quotient is subtracted, the 1 addition circuit 14 adds "1" to the accumulated quotient to obtain the final quotient 3. When it is not subtracted, "1" is not added, and this state becomes the final quotient 3.
次に、本発明の一実施例の具体的動作について説明する
。Next, the specific operation of one embodiment of the present invention will be explained.
被除数はr21J 、除数は「5」の時の演算を示す。The calculation is shown when the dividend is r21J and the divisor is "5".
ここで、それぞれの数を2進数で表現しておくと、「2
1」は“1otoi”の5ビツト。Here, if we express each number in binary, we get “2
1” is 5 bits of “1otoi”.
「5」は“101”の3ビツトである。"5" is 3 bits of "101".
まず、3ビツトの除数“101”を2fi+1作成回路
5で2341の形、つまり“1000”に置き換える。First, the 3-bit divisor "101" is replaced by the 2fi+1 generating circuit 5 into the form 2341, that is, "1000".
そして被除数“10101”が“1000”以上かを調
べ、以上ならば被除数“10101”の桁数に合わせる
ためm−(n+1)ビットシフト回路7で“1000”
を5−(3+1)ビット、つまり1ビツト左にシフトし
て“10000”とし、被除数“10101”との差分
VをEX−ORIIにより求めて“101”を得る。ま
た、もともとの除数“101”と“1000”との差分
Wを下位3ビツトにおいてEX−NOR8と1加算回路
9を通すことにより“11”を得、m−(n+1)ビッ
トシフト回路10により1ビツトシフトして“110”
が求まる。Then, it is checked whether the dividend number "10101" is greater than or equal to "1000", and if it is, it is changed to "1000" by the m-(n+1) bit shift circuit 7 in order to match the number of digits of the dividend number "10101".
is shifted to the left by 5-(3+1) bits, that is, 1 bit, to make it "10000", and the difference V with the dividend "10101" is found by EX-ORII to obtain "101". Furthermore, the difference W between the original divisors "101" and "1000" is passed through EX-NOR8 and the 1 addition circuit 9 in the lower three bits to obtain "11", and the m-(n+1) bit shift circuit 10 is used to obtain "11". Bit shift to “110”
is found.
ここで双方の差分を被除数X′作成加算回路12により
加算し、次の被除数“1011”が求まる。商において
は、2m−1n+11作成回路6により「2」が求まる
。この時点で
21=5X2+11
の関係が成り立つ。Here, the difference between the two is added by the dividend X' creation/addition circuit 12 to obtain the next dividend "1011". For the quotient, "2" is found by the 2m-1n+11 creation circuit 6. At this point, the relationship 21=5X2+11 holds true.
次に、今度の被除数“1011”について同様の処理を
繰り返すため“1000”以上かを調べ“11”と求ま
る。また差分Wもシフトせずそのまま差分Vと加算して
次の被除数“110”が求まる。商においては2 m−
(n+11作成回路6により“1”が得られ、加算回路
13で前に求まった「2」に加算して「3」が求まる。Next, in order to repeat the same process for the next dividend "1011", it is checked whether it is greater than or equal to "1000" and "11" is found. Further, the difference W is not shifted and is directly added to the difference V to obtain the next dividend "110". In the quotient, 2 m-
(The n+11 generation circuit 6 obtains "1", and the adder circuit 13 adds it to the previously obtained "2" to obtain "3".
この時点で21=5X6 の関係が成り立つ。At this point 21=5X6 The relationship holds true.
次に、今度の被除数“110”が“1000”以上かを
調べる。′110”は“1000”より小さいので本来
の除数“101”との比較をし、以上であればx’ −
y減算回路15により被除数から除数を減算する。ここ
では以上であるので減算を行い、その答えが剰余となり
「1」となる。Next, it is checked whether the current dividend number "110" is "1000" or more. '110' is smaller than '1000', so it is compared with the original divisor '101', and if it is greater than x' -
The y subtraction circuit 15 subtracts the divisor from the dividend. Here, since the above is the case, subtraction is performed, and the answer becomes the remainder, which becomes "1".
商は減算できたことにより1加算回路14で、「1」を
加算して「4」となる。最終的には21=5X4+ 1
の関係が成り立つ。Since the quotient has been successfully subtracted, the 1 addition circuit 14 adds "1" to the quotient, resulting in "4". Ultimately, the relationship 21=5X4+1 holds true.
以上説明したように本発明は、nビットの除数を2n+
1の形にして被除数と桁数をそろえることニヨリ、EX
−ORでの差分V系とEX−NORでの差分W系とをそ
れぞれ加算してやる2段構成で次の被除数を求めること
ができるという効果を有する。CMO8G/Aで被除数
を4ビツト、除数を3ビツトとした例をとるとEX−O
R1EX−NORで約1.2ns+加算で約5nsと全
体では約6.2nsとなり、従来のインバータ、加算、
セレクタの3段構成の演算よりも約0.4ns早く、次
の被除数を求めることができる。As explained above, in the present invention, the n-bit divisor is set to 2n+
Make the number 1 and match the number of digits with the dividend, EX
This has the effect that the next dividend can be determined using a two-stage configuration in which the difference V system in -OR and the difference W system in EX-NOR are respectively added. Taking an example of CMO8G/A with a dividend of 4 bits and a divisor of 3 bits, EX-O
Approximately 1.2 ns for R1EX-NOR + approximately 5 ns for addition, resulting in a total of approximately 6.2 ns, compared to conventional inverters, addition,
The next dividend can be determined approximately 0.4 ns faster than the calculation using the three-stage selector configuration.
第1図は本発明の一実施例を示す除算回路のブロック図
、第2図は従来の除算回路の一例を示すブロック図であ
る。
1・・・mビット被除数X、2・・・nビット除数Y1
3・・・商、4・・・剰余、5・・・2 m+1作成回
路、6・・・2m−3n+11作成回路、7・・・m−
(n+1)ビットシフト回路、8・・・排他的否定論理
和回路(EX−NOR)、9−1加算回路、10・・・
m−(n+1)ビットシフト回路、11・・・排他的論
理和回路(EX−OR)、12・・・被除数X′作成加
算回路、13・・・加算回路、14・・・1加算回路、
15・・・X′−Y減算回路、16・・・シフト回路、
17・・・X I。
Y比較器、1訃・・インバータ回路、19川加算回路、
20・・・セレクト回路、21・・・シフト回路。FIG. 1 is a block diagram of a division circuit showing an embodiment of the present invention, and FIG. 2 is a block diagram showing an example of a conventional division circuit. 1... m-bit dividend X, 2... n-bit divisor Y1
3...quotient, 4...remainder, 5...2 m+1 creation circuit, 6...2m-3n+11 creation circuit, 7...m-
(n+1) bit shift circuit, 8... exclusive NOR circuit (EX-NOR), 9-1 addition circuit, 10...
m-(n+1) bit shift circuit, 11... Exclusive OR circuit (EX-OR), 12... Dividend X' creation addition circuit, 13... Addition circuit, 14... 1 addition circuit,
15...X'-Y subtraction circuit, 16...shift circuit,
17...X I. Y comparator, 1 inverter circuit, 19 river adder circuit,
20...Select circuit, 21...Shift circuit.
Claims (1)
すべて“0”にすることにより被除数と前記除数の差分
を求める第1の回路と、前記1桁増えた除数を前記被除
数と桁数をあわせた後排他的論理和回路で差分を求める
第2の回路と、前記1桁増えた除数と前記元の除数との
差分を排他的否定論理和回路及び1を加算する1加算回
路により求める第3の回路と、前記それぞれの差分を加
算して次の被除数を求める第4の回路とを備えることを
特徴とする除算回路。A first circuit that calculates the difference between the dividend and the divisor by increasing the divisor by one digit and setting the most significant digit to "1" and all other digits to "0"; A second circuit that calculates the difference using an exclusive OR circuit after matching the number of digits, and an exclusive NOR circuit that calculates the difference between the divisor increased by one digit and the original divisor, and a 1 addition that adds 1. A division circuit comprising: a third circuit that calculates the next dividend; and a fourth circuit that adds the respective differences to calculate the next dividend.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2299303A JPH04170637A (en) | 1990-11-05 | 1990-11-05 | Divider circuit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2299303A JPH04170637A (en) | 1990-11-05 | 1990-11-05 | Divider circuit |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH04170637A true JPH04170637A (en) | 1992-06-18 |
Family
ID=17870791
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2299303A Pending JPH04170637A (en) | 1990-11-05 | 1990-11-05 | Divider circuit |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH04170637A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8179580B2 (en) | 2010-05-20 | 2012-05-15 | Ricoh Company, Ltd. | Optical scanning device and image forming apparatus |
-
1990
- 1990-11-05 JP JP2299303A patent/JPH04170637A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8179580B2 (en) | 2010-05-20 | 2012-05-15 | Ricoh Company, Ltd. | Optical scanning device and image forming apparatus |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US4953115A (en) | Absolute value calculating circuit having a single adder | |
CN102231101B (en) | Divider and division processing method | |
JP3714570B2 (en) | Division circuit for parallel processing | |
JPH0573269A (en) | Adder | |
JPH0342715A (en) | Approximated inverse number generation device for division | |
JPH04170637A (en) | Divider circuit | |
JPH0346024A (en) | Floating point computing element | |
JPH04256016A (en) | Method and apparatus for correcting multiplier for complement of 2 so that multiplication of non-signed number is performed | |
JP2991788B2 (en) | Decoder | |
JPH1185474A (en) | Random number generator and noise generator using the random number generator | |
JP2001034457A (en) | Adding and subtracting circuit | |
CN114895868B (en) | Division operation unit and divider based on two-bit quotient calculation | |
JP3097081B2 (en) | Variable stage m-sequence code generator | |
JP2614496B2 (en) | Size comparison circuit | |
JPH10333885A (en) | Multiplying circuit | |
JP2513021B2 (en) | Signed digit number sign judgment circuit | |
JPH05150951A (en) | Division processing system | |
JPH04170826A (en) | Multiple data protection detection circuit | |
JPH0573271A (en) | Divider circuit | |
JPH0553768A (en) | Divider | |
JPH0425214A (en) | Word length limit circuit | |
JPH0376312A (en) | Pulse width modulation circuit | |
JPH08335165A (en) | Method and circuit for low power accumulation | |
JPS6010331B2 (en) | series parallel multiplier | |
JPH11212765A (en) | Addition circuit and addition device |