JPH01304535A - Division device - Google Patents

Division device

Info

Publication number
JPH01304535A
JPH01304535A JP63135934A JP13593488A JPH01304535A JP H01304535 A JPH01304535 A JP H01304535A JP 63135934 A JP63135934 A JP 63135934A JP 13593488 A JP13593488 A JP 13593488A JP H01304535 A JPH01304535 A JP H01304535A
Authority
JP
Japan
Prior art keywords
quotient
register
circuit
divisor
partial
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
JP63135934A
Other languages
Japanese (ja)
Inventor
Masayuki Kimura
木村 真行
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.)
NEC Corp
Original Assignee
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to JP63135934A priority Critical patent/JPH01304535A/en
Publication of JPH01304535A publication Critical patent/JPH01304535A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To perform the division at a high speed just with addition of some hardware to a conventional division circuit by carrying out the division by means of a non-restoring method after replacing the division with the product obtained between an approximate reciprocal of a divisor and a dividend. CONSTITUTION:A divisor is stored in a dividend register 1 and an approximate reciprocal (r) of the divisor is stored in a multiplier register 2. At the same time, a zero output mode is set at a shift/zero circuit 5. Then the contents of the register 1 are multiplied by the contents (r) of the register 2 via a multiplication circuit 3. The result of this multiplication is added with the output of the circuit 5 and the result of this addition is stored in a divisor reciprocal value register 8. Then a dividend is stored in the register 1 while the contents of the register 2 and the zero output mode of the circuit 5 are held as they are. Then the contents of both registers 1 and 2 are multiplied with each other by the multiplication circuit 3 and the result of this multiplication is added with the output of the circuit 5 via an addition circuit 4.

Description

【発明の詳細な説明】 皮亙立ヱ 本発明は除算装置に関し、特に除算を除数の近・似逆数
と被除数の積におきかえ引放し法を用いて実行する除算
装置に関する。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a division device, and more particularly to a division device that performs division by replacing the division with the product of the approximate reciprocal of the divisor and the dividend, using the pull-out method.

従来技術 従来、除算を被除数と除数の近似逆数の積におきかえ、
引放し法を用いて実行し多数桁の部分商を発生していく
ような情報処理装置においては、特開昭57−0413
57号公報に記載されたr除算方式」に示されるように
、以下に示すオペランドの値によらず求めるべき商の精
度に応じ、所定回数の演算ループを実行して商を求めて
いる。
Prior Art Conventionally, division is replaced by the product of the approximate reciprocal of the dividend and the divisor,
In an information processing device that uses the pull-out method to generate multi-digit partial quotients, Japanese Patent Laid-Open No. 57-0413
As shown in "R Division Method" described in Publication No. 57, the quotient is determined by executing a predetermined number of calculation loops according to the precision of the quotient to be determined, regardless of the values of the operands shown below.

従来においては、例えば第2図に示すような除算回路が
提案されている。第2図を参照すると、除算回路は被乗
数レジスタ161乗数レジスタ17、乗算回路18およ
び加算回路2oを備えている。ここで除算は以下のよう
にして行われる。但し、演算は絶対値どおしで実行され
、被除数Xと除数Yの間にIXI<IYIなる関係が成
り立ちかつ除数Yが2進正規化されているものとする。
Conventionally, a division circuit as shown in FIG. 2, for example, has been proposed. Referring to FIG. 2, the division circuit includes a multiplicand register 161, a multiplier register 17, a multiplier circuit 18, and an adder circuit 2o. Here, division is performed as follows. However, it is assumed that the calculation is performed using absolute values, that the relationship IXI<IYI holds between the dividend X and the divisor Y, and that the divisor Y is binary normalized.

また除数Yの近似逆数r (r= (1+δ)/IY1
)の精度δが1δl<2−”を満しているものとする。
Also, the approximate reciprocal of the divisor Y (r= (1+δ)/IY1
) is assumed to satisfy 1δl<2−”.

なお、除数逆数績−D・2+2−−IYI・r・2+2
はあらかじめ求められているものとする。
In addition, the divisor reciprocal result −D・2+2−−IYI・r・2+2
shall be required in advance.

(1)被乗数レジスタ16に被乗数)×1、乗数レジス
タ17に除数の近似逆数rを格納し、シフト/ゼロ回路
1つをゼロ出力のモードとする。
(1) Store the multiplicand)×1 in the multiplicand register 16, store the approximate reciprocal of the divisor r in the multiplier register 17, and set one shift/zero circuit to zero output mode.

(2)被乗数レジスタ16と乗数レジスタ17の内容を
乗算回路18において乗算し、加算回路20でシフト/
ゼロ回路1つの出力(“’O” )と加算する。
(2) Multiply the contents of the multiplicand register 16 and multiplier register 17 in the multiplier circuit 18, and shift/shift in the adder circuit 20.
Add the output of one zero circuit (“'O”).

(3)加算回路20の出力全体を中間結果レジスタ21
に格納し、上位12ビツトを1回目の部分商として乗数
レジスタ17に格納する。同時に被乗数レジスタ16に
除数逆数績−D・2 +2を格納し、シフト/ゼロ回路
1つを左12ビツトシフトモードとする。
(3) The entire output of the adder circuit 20 is transferred to the intermediate result register 20.
The upper 12 bits are stored in the multiplier register 17 as the first partial quotient. At the same time, the divisor reciprocal result -D.2 +2 is stored in the multiplicand register 16, and one shift/zero circuit is set to the left 12-bit shift mode.

(4)被乗数レジスタ16と乗数レジスタ17の内容を
乗算回路18において乗算し、加算回路20でシフト/
ゼロ回路19の出力(中間結果レジスタ21の出力を左
12ビツトシフト)と加算する。
(4) Multiply the contents of the multiplicand register 16 and multiplier register 17 in the multiplier circuit 18, and shift/shift in the adder circuit 20.
It is added to the output of the zero circuit 19 (the output of the intermediate result register 21 is shifted to the left by 12 bits).

(5)加算回路20の出力の符号ビットから乗数レジス
タ17に格納された部分商を部分商補正回路22におい
て補正(符号が“1”の場合−1゜“0”の場合にはな
にもしない)し、商レジスタ23に格納する。同時に加
算回路20の出力全体を中間結果レジスタ21に格納し
、上位12ビツトを次の部分商として乗数レジスタ8に
格納する。
(5) The partial quotient stored in the multiplier register 17 is corrected from the sign bit of the output of the adder circuit 20 in the partial quotient correction circuit 22 (-1° if the sign is "1", nothing if the sign is "0") ) and stores it in the quotient register 23. At the same time, the entire output of the adder circuit 20 is stored in the intermediate result register 21, and the upper 12 bits are stored in the multiplier register 8 as the next partial quotient.

(6)上記(4)、(5)を所定回数くり返す。(6) Repeat (4) and (5) above a predetermined number of times.

ただし、商レジスタ23への部分商の格納は左から順に
行う。
However, partial quotients are stored in the quotient register 23 in order from the left.

(7)最終的な商はりザルトセレクタ25を通して商レ
ジスタ23の出力を転送することにより行う(商セレク
タ24は単精度/倍精度の切替に用いる)。
(7) Final quotient This is performed by transferring the output of the quotient register 23 through the salt selector 25 (the quotient selector 24 is used for switching between single precision and double precision).

この動作を除算アルゴリズムで表現すると以下のように
なる。まず真の商q。をq。−IX1/IYI、(O≦
q a < 1 >とし、第1の12ビツトの部分商を
以下のように定義する。
This operation can be expressed using a division algorithm as follows. First, the true quotient q. q. −IX1/IYI, (O≦
Let q a < 1 > and define the first 12-bit partial quotient as follows.

Qo −212= [Ro −2”+1/2]。([X
〕。はXを超えない最大のN数) Ro==lxl ・r−=qo 1Ylr=q。
Qo −212= [Ro −2”+1/2].([X
]. is the maximum number of N that does not exceed X) Ro==lxl ・r−=qo 1Ylr=q.

(1+δ)−q。−D ここで真の商qoと第1の部分商Q0との差は以下のよ
うになる(証明時)。
(1+δ)−q. -D Here, the difference between the true quotient qo and the first partial quotient Q0 is as follows (at the time of proof).

2”−12<qo  Qo <2−12次にq+=21
2(Qo  2゜) =212(R,/D−Q、) −((RO−Qo D/Dl −212第2の部分商Q
、が以下のように求まる。
2”-12<qo Qo<2-12 then q+=21
2(Qo 2゜) =212(R,/D-Q,) -((RO-Qo D/Dl -212 second partial quotient Q
, is obtained as follows.

Ql ・2L2=[R3・212モ1/2]。Ql ・2L2=[R3・212mo1/2].

R+ =Q+  ・D= (Ro  Qo−D)212
以下同様に必要回数、 ql ・2 +2” (Q +−+  Q +−+ )
R+ = q (・D− (R+−+  Ql−+  ・D)212Q+  −2
”−[R+  −212+1/2]Qを計算して得られ
る部分商Q。、Q、、・・・、Q4より真の商q。は次
のように求まる。
R+ =Q+ ・D= (Ro Qo-D)212
Similarly, the required number of times is ql ・2 +2" (Q +-+ Q +-+)
R+ = q (・D− (R+−+ Ql−+ ・D)212Q+ −2
From the partial quotients Q., Q, . . . , Q4 obtained by calculating ``-[R+-212+1/2]Q, the true quotient q.

qo=ΣQ+  ・(2−12>’ +qa++  H
1シQ (2−12)・・1 なお、R3+1の値が負の場合、Q、はQ、=<Q、2
”−1)  ・12−”とする必要がある。
qo=ΣQ+ ・(2-12>' +qa++ H
1shiQ (2-12)...1 Note that if the value of R3+1 is negative, Q is Q, = < Q, 2
It is necessary to set it to "-1) ・12-".

しかしながら、上述した従来の除算方式はオペランドの
値によらず求めるべき商の精度に応じ所定回数の演算を
くり返さなければ商が求まらないという欠点がある。
However, the above-mentioned conventional division method has a drawback in that the quotient cannot be determined unless the operation is repeated a predetermined number of times, depending on the accuracy of the quotient to be determined, regardless of the values of the operands.

ここで、従来の除算アルゴリズムの特徴について検討す
る。まず上述の真の商Qoと第1回目の近似値R6=)
Xl・r/)Bには以下の関係が成立する。
Here, the characteristics of the conventional division algorithm will be discussed. First, the above true quotient Qo and the first approximation value R6=)
The following relationship holds true for Xl·r/)B.

Ro = l X l ・r=qo  (1+δ)=q
o  −DQ ORO−Ro /D  RO = (R,−D−R,’)−1/D −(R,−(1+δ)Rot ・1/D =−δ・R,・1/D ここで最終的に求めるべき商の精度を36ビツトとする
と1δI<2−13より qo −Ro =−δ・Ro・1/Dく2″″′R,<
D・2−24 が成立すれば、RO=lXl ・rを真の商として吸っ
てよい。
Ro = l X l ・r=qo (1+δ)=q
o -DQ ORO-Ro /D RO = (R, -D-R,')-1/D -(R,-(1+δ)Rot ・1/D =-δ・R, ・1/D Here is the final Assuming that the precision of the quotient to be obtained is 36 bits, qo −Ro = −δ・Ro・1/D×2″′′R,<
If D.2-24 holds true, then RO=lXl.r can be taken as the true quotient.

またRoが上述の条件を満足していなくとも、q+=R
1/D (1+  R+=−δ・R+  ・1/DよりRI= 
(R+−1Q +−+  ・D)・2′2<D・2−2
4++21 が成立すれば(i+1)番目以後の演算ループを実行し
なくとも必要精度の演算結果が得られる。
Furthermore, even if Ro does not satisfy the above conditions, q+=R
1/D (1+ R+=-δ・R+ ・From 1/D, RI=
(R+-1Q +-+ ・D)・2'2<D・2-2
If 4++21 holds true, a computation result with the required precision can be obtained without executing the (i+1)th and subsequent computation loops.

i匪五1囮 本発明は上記の除算の性質に着目してなされたものであ
り、従って本発明の目的は、従来の技術の内在する上記
欠点を解消し、除算を高速化することを可能とした新規
な除算装置を提供することにある。
The present invention has been made by paying attention to the above-mentioned properties of division, and therefore, an object of the present invention is to solve the above-mentioned disadvantages inherent in the conventional technology and to make it possible to speed up division. The object of the present invention is to provide a new division device with the following characteristics.

発明の構成 本発明の除算装置は除算を被除数と除数の逆数の積にお
きかえ引放し法を用いて多数桁の部分商を発生し行う除
算装置であって、除数IYIまたは被除数IXIと除数
の近似逆数rとの乗算または除数逆数積−D・212と
部分商Q、との乗算を行う乗算手段(以下乗算器)と、
この乗算器の出力にゼロまたは1つ前の近似商のシフト
結果を加算し、前記除数の逆数の精度に基づいて確定さ
れる定数りまたは部分商Q、−を含む近似商R1を出力
する加算手段(以下加算回路)と、この加算回路からの
部分商QI ゛を前記加算回路からの符号ビットに応答
して補正する部分商補正手段(以下部分商補正回路)と
、前記加算回路からの定数りをシフトし演算ループの実
行回数iにもとづいた定数D・2−23++21を生成
し格納する除数逆数積生成格納手段(以下除数逆数績セ
レクタ、レジスタおよびシフタ)と、この除数逆数積セ
レクタ。
Structure of the Invention The division device of the present invention is a division device that replaces the division with the product of the dividend and the reciprocal of the divisor and generates a multi-digit partial quotient using the pull-out method, and which approximates the divisor IYI or the dividend IXI and the divisor. Multiplying means (hereinafter referred to as a multiplier) that performs multiplication with the reciprocal number r or multiplication of the divisor reciprocal product −D·212 and the partial quotient Q;
Addition that adds zero or the shift result of the previous approximate quotient to the output of this multiplier, and outputs an approximate quotient R1 containing a constant or partial quotient Q, - determined based on the precision of the reciprocal of the divisor. a partial quotient correcting means (hereinafter referred to as a partial quotient correcting circuit) for correcting the partial quotient QI' from the adding circuit in response to a sign bit from the adding circuit; and a constant from the adding circuit. a divisor reciprocal product generation and storage means (hereinafter referred to as a divisor reciprocal product selector, register, and shifter) that generates and stores a constant D.2-23++21 based on the number of executions i of an arithmetic loop;

レジスタおよびシフタからの定数D・2−24+121
および前記加算回路の部分商Q1−を比較する比較手段
(以下比較回路)と、この比較回路で定数D・2−24
++21の方が近似商R1より大きいと判断したときに
は近似商R3を選択し、定数D・2−24+121の方
が近似商R4より小さいと判断したときには前記部分商
補正回路で補正された部分商Q、を選択し、この選択結
果と演算ループの前回までに求められた部分商Qo 、
Q、、・・・+Ql−1とを連結する商格納手段とを含
むことを特徴としている。
Constant D from register and shifter 2-24+121
and a comparison means (hereinafter referred to as a comparison circuit) for comparing the partial quotient Q1- of the addition circuit, and a constant D.2-24 in this comparison circuit.
When it is determined that ++21 is larger than the approximate quotient R1, the approximate quotient R3 is selected, and when it is determined that the constant D.2-24+121 is smaller than the approximate quotient R4, the partial quotient Q corrected by the partial quotient correction circuit is selected. , and use this selection result and the partial quotient Qo obtained up to the previous calculation loop,
Q, . . . +Ql-1.

因」1倒 次に本発明について図面を参照して詳細に説明する。cause 1 fall Next, the present invention will be explained in detail with reference to the drawings.

第1図を参照すると、本発明の一実施例は、被除数IX
1、除数IYIおよび除数逆数積−D・212を格納す
る被除数レジスタ1、部分商Q、−および除数の近似逆
数±rを格納する乗数レジスタ2、除算を被除数と逆数
の積におきかえ引放し法を用いて多数桁の部分商を発生
するための演算ループを実行し近似商を求めるため乗数
レジスタ2の内容と被除数レジスタ1の内容とを乗算す
る乗算器3、この乗算器3からの乗算結果とシフト/ゼ
ロ回路5からの出力とを加算し上位の所定ビットを次の
部分商とし乗数レジスタ2に送る加算器4、この加算器
4の出力を格納する中間結果レジスタ6、この中間結果
レジスタ6の内容をシフトするかゼロを出力するシフト
/ゼロ回路5、加算器4の出力と除数逆数積シフタ9の
出力とのどちらか一方を選択する除数逆数積セレクタ1
1、このセレクタ11の選択結果を格納する除数逆数積
レジスタ8、このレジスタ8の出力をシフトする除数逆
数積シフタ9、加算器4の出力の符号ビットに応答して
乗数レジスタ2から与えられる部分商Q−を補正する部
分商補正回路7、除数の逆数の精度と演算ループの実行
回数とから確定される定数および乗算器3から出力され
る部分商Q゛を含んだ近似商を比較するため、除数逆数
積レジスタ8からの内容と中間結果レジスタ6からの内
容とを比較する比較器10、この比較器10からの比較
結果で中間結果で中間結果レジスタ6からの内容がレジ
スタ8の内容より小さいと判定されたときには、中間結
果レジスタ6の内容および前回の演算ループまでに商レ
ジスタ】3に格納された内容を選択し、該比較結果で中
間結果レジスタ6からの内容がレジスタ8の内容より大
きいと判定されたときには部分商補正回路7で補正され
た部分商Qおよび前回の演算ループまでに商レジスタ1
3に格納された内容を選択する商レジスタ入口セレクタ
12、このセレクタ12で選択された結果を格納する商
レジスタ13、この商レジスタ13からの出力を単精度
まなな倍精度の切替に応じて選択する商セレクタ14、
およびこの商セレクタ14の出力および加算回路4の出
力のどちらか一方を選択するりザルトセレクタ15を含
む。
Referring to FIG. 1, one embodiment of the present invention provides that the dividend IX
1. Dividend register 1 that stores the divisor IYI and the divisor reciprocal product -D・212. Multiplier register 2 that stores the partial quotient Q, - and the approximate reciprocal of the divisor ±r. Replace the division with the product of the dividend and the reciprocal. A multiplier 3 that multiplies the contents of multiplier register 2 by the contents of dividend register 1 to obtain an approximate quotient by executing an arithmetic loop to generate a multi-digit partial quotient using and the output from the shift/zero circuit 5, an adder 4 which adds the upper predetermined bits to the next partial quotient and sends it to the multiplier register 2, an intermediate result register 6 which stores the output of this adder 4, and this intermediate result register. a shift/zero circuit 5 that shifts the contents of 6 or outputs zero; a divisor reciprocal product selector 1 that selects either the output of the adder 4 or the output of the divisor reciprocal product shifter 9;
1. A divisor reciprocal product register 8 that stores the selection result of this selector 11, a divisor reciprocal product shifter 9 that shifts the output of this register 8, and a portion given from the multiplier register 2 in response to the sign bit of the output of the adder 4. A partial quotient correction circuit 7 for correcting the quotient Q-, for comparing an approximate quotient including a constant determined from the precision of the reciprocal of the divisor and the number of executions of the calculation loop and the partial quotient Q' output from the multiplier 3. , a comparator 10 that compares the content from the divisor reciprocal product register 8 and the content from the intermediate result register 6; the comparison result from this comparator 10 is the intermediate result, and the content from the intermediate result register 6 is greater than the content of the register 8. If it is determined that the value is smaller, the contents of the intermediate result register 6 and the contents stored in the quotient register ]3 up to the previous calculation loop are selected, and based on the comparison result, the contents from the intermediate result register 6 are smaller than the contents of register 8. When it is determined that the partial quotient Q is large, the partial quotient Q corrected by the partial quotient correction circuit 7 and the quotient register 1
A quotient register entrance selector 12 selects the contents stored in 3, a quotient register 13 stores the result selected by this selector 12, and an output from this quotient register 13 is selected according to switching between single precision and double precision. quotient selector 14,
and a salt selector 15 for selecting either the output of the quotient selector 14 or the output of the adder circuit 4.

次に本発明の一実施例の動作を詳細に説明する。Next, the operation of one embodiment of the present invention will be explained in detail.

除数逆数績−D・2”−−IYI ・r・212は予め
求められているものとする。まず、被乗数レジスタ1に
除数IYIが格納され、乗数レジスタ2に除数の近似逆
数rが格納されシフト/ゼロ回路5にゼロ出力モードが
設定される0次に、被乗数レジスタ1の内容IYIと乗
数レジスタ2の内容rが乗算回路3で乗算された後、乗
算結果D−1Y1・rとシフト/ゼロ回路5の出力(0
)が加算回路4で加算され、加算結果D=lYl ・r
が除数逆数績セレクタ11を介して除数逆数値レジスタ
8に格納される。それから乗数レジスタ2の内容(除数
の近似逆数r)およびシフト/ゼロ回v@5のゼロ出力
モードが保持されたまま、被乗数レジスタ1に被除数I
XIが格納される。
It is assumed that the divisor reciprocal result −D・2”−−IYI・r・212 has been found in advance. First, the divisor IYI is stored in multiplicand register 1, and the approximate reciprocal of the divisor r is stored in multiplicand register 2 and shifted. / Zero output mode is set in zero circuit 5 0 Next, after the content IYI of multiplicand register 1 and the content r of multiplier register 2 are multiplied by multiplier circuit 3, the multiplication result D-1Y1・r and shift/zero Output of circuit 5 (0
) are added in the adder circuit 4, and the addition result D=lYl ・r
is stored in the divisor reciprocal value register 8 via the divisor reciprocal result selector 11. Then, while the contents of multiplier register 2 (approximate reciprocal of the divisor r) and the zero output mode of shift/zero times v@5 are held, the dividend I is stored in multiplicand register 1.
XI is stored.

ここで、被乗数レジスタ1の内容(被除数IXj)およ
び乗数レジスタ2の内容(除数の近似逆数r)が乗算回
路3で乗算され、この乗算結果(IXl・r)とシフト
/ゼロ回路5の出力(0)とが加算回路4で加算される
。この加算結果全体(Ro)が中間結果レジスタ6に格
納されそのうちの上位12ビツトが第1回目の部分商<
Q、1として乗数レジスタ2に格納される。また、除数
逆数積レジスタ8の内容(D)が除数逆数績シフタ9に
おいて右に24ビツトシフト(2−”倍)され、シフト
結果(D・2−”)が除数逆数積レジスタ11を通して
除数逆数積レジスタ8に再び格納される。同時に、被乗
数レジスタ1に除数逆数績(−D・212)が格納され
、シフト/ゼロ回路5が左12ビツトシフトモードに設
定される。
Here, the contents of multiplicand register 1 (dividend IXj) and the contents of multiplier register 2 (approximate reciprocal of divisor r) are multiplied by multiplier circuit 3, and this multiplication result (IXl·r) and the output of shift/zero circuit 5 ( 0) are added by the adder circuit 4. The entire addition result (Ro) is stored in the intermediate result register 6, and the upper 12 bits of it are the first partial quotient <
Q,1 is stored in the multiplier register 2. In addition, the contents (D) of the divisor reciprocal product register 8 are shifted to the right by 24 bits (2-" times) in the divisor reciprocal product shifter 9, and the shift result (D 2-") is passed through the divisor reciprocal product register 11 to the divisor reciprocal product. It is stored in register 8 again. At the same time, the divisor reciprocal result (-D.212) is stored in the multiplicand register 1, and the shift/zero circuit 5 is set to the left 12-bit shift mode.

ここで被乗数レジスタ1からの除数逆数績(−D・21
2)および乗数レジスタ2からの内容とが乗算回路3で
乗算され、乗算結果およびシフト/ゼロ回路5の出力(
中間結果レジスタ6の出力を左12ビツトシフトした値
)が加算回路4で加算される。この加算結果(R,)に
含まれる符号ビットに応答して、乗数レジスタ2からの
部分商(Q、iが部分商補正回路7で補正される。
Here, the divisor reciprocal result from multiplicand register 1 (-D・21
2) and the contents from multiplier register 2 are multiplied in multiplier circuit 3, and the multiplication result and the output of shift/zero circuit 5 (
A value obtained by shifting the output of the intermediate result register 6 by 12 bits to the left) is added by the adder circuit 4. In response to the sign bit included in this addition result (R,), the partial quotient (Q,i) from the multiplier register 2 is corrected by the partial quotient correction circuit 7.

この時、除数逆数積レジスタ8の内容(D・2−24 
)と中間結果レジスタ6の内容(R,)とが比較器10
において比較される。比較結果で中間結果レジスタ6の
内容(R,)が小さいと判定されたとき、中間結果レジ
スタ6の内容(R,)が除算結果として商レジスタ入力
セレクタ12を通して商レジスタ13に格納される。こ
の商レジスタ13の内容は商セレクタ14およびリザル
トセレクタ15を介して外部に転送され、除算が終了す
る。
At this time, the contents of the divisor reciprocal product register 8 (D・2-24
) and the contents (R, ) of the intermediate result register 6 are input to the comparator 10.
compared in. When it is determined that the content (R,) of the intermediate result register 6 is smaller as a result of the comparison, the content (R,) of the intermediate result register 6 is stored in the quotient register 13 through the quotient register input selector 12 as the division result. The contents of this quotient register 13 are transferred to the outside via the quotient selector 14 and result selector 15, and the division is completed.

もし、比較器10における比較結果で中間結果レジスタ
6の内容(Ro)が大きいと判定されたときには、前記
商補正回路7で補正されjコ内容が第1回目の部分商(
Qo )として商レジスタ入力セレクタ12を介して商
レジスタ13に格納される。これと同時に加算回路4の
出力全体(R4)が中間結果レジスタ6に格納され、上
位12ビツトが次の部分商(Q、)として乗数レジスタ
2に格納される。また除数逆数積レジスタ8の内容が除
数逆数シフタ9で右に12ビツトシフトされ、シフト結
果(D・2−24++21 )が除数逆数積レジスタ1
1を介して除数逆数積レジスタ8に格納される。
If the comparison result in the comparator 10 determines that the content (Ro) of the intermediate result register 6 is large, the quotient correction circuit 7 corrects the content of the first partial quotient (Ro).
Qo) is stored in the quotient register 13 via the quotient register input selector 12. At the same time, the entire output (R4) of the adder circuit 4 is stored in the intermediate result register 6, and the upper 12 bits are stored in the multiplier register 2 as the next partial quotient (Q,). Also, the contents of the divisor reciprocal product register 8 are shifted to the right by 12 bits by the divisor reciprocal shifter 9, and the shift result (D・2−24++21) is transferred to the divisor reciprocal product register 1.
1 and stored in the divisor reciprocal product register 8.

ここで、被乗数レジスタ1の内容(−D・212)と乗
数レジスタ2の内容(Q、lとが乗算回路2において乗
算され、乗算結果(−D −Ql  −・212)とシ
フト/ゼロ回路5の出力(R,・212)とが加算回路
4で加算される。加算結果(R、+。
Here, the contents of multiplicand register 1 (-D・212) and the contents of multiplier register 2 (Q, l) are multiplied in multiplier circuit 2, and the multiplication result (−D −Ql −・212) and shift/zero circuit 5 The output (R, 212) is added by the adder circuit 4.The addition result (R, +.

−R,・212−D−Q、  −・212)の符号ピッ
1へに応答して、部分商補正回路7は乗数レジスタ2か
らの部分商(Q、lを補正する。この時、除数逆数レジ
スタ8の内容(D・2−244121 )と中間結果レ
ジスタ6の内容(R3)とが比較器1゜において比較さ
れる。
-R, .212-D-Q, -.212), the partial quotient correction circuit 7 corrects the partial quotient (Q, l) from the multiplier register 2. At this time, the divisor reciprocal The contents of register 8 (D.2-244121) and the contents of intermediate result register 6 (R3) are compared in comparator 1°.

この比較結果で中間結果レジスタ6の内容(R3)の方
が小さければ、中間結果レジスタ6の内容(R1)が商
レジスタ入口セレクタ12を介して商レジスタ13に与
えられる。商レジスタ13では、前回の演算ループまで
に格納された部分商Q、、Q、、・・・+Q+−1と新
たに与えられた内容(R3)とが連結されて格納される
。格納結果は商セレクタ14およびリザルトレジスタ1
5を介して転送され、除算が終了する。
As a result of this comparison, if the content (R3) of the intermediate result register 6 is smaller, the content (R1) of the intermediate result register 6 is provided to the quotient register 13 via the quotient register entry selector 12. In the quotient register 13, the partial quotients Q, , Q, . The stored results are stored in the quotient selector 14 and result register 1.
5 and the division ends.

比較器10の比較で中間結果レジスタ6の内容(R4)
の方が大きい場合には、商補正回路7の出力(Q、)が
i番目の部分商として商レジスタ入力セレクタ12を通
して商レジスタ13に格納される。商レジスタ13では
前回の演算ループまでに格納された部分商Q、、Q、、
・・・+ Qト+と新たに与えられた部分商(Q、)と
が連結されて格納される。これとともに加算回F!@4
の出力全体が中間結果レジスタ6に格納され、格納内部
の上位12ビツトが次の部分商として乗数レジスタ2に
格納される。また、除数逆数積レジスタ8の内容が逆数
積シフタ9で台に12ビツトシフトされ、除数逆数積セ
レクタ11を通して除数逆数積レジスタ8に格納される
。その後、上述の乗算回路3での除数逆数1 (−D・
2′2)および部分商(Q、゛)の乗算動作から除算終
了または、部分商、次の部分商の格納や除数逆数積シフ
タ9によるシフト結果の格納動作が格納される。
Contents of intermediate result register 6 in comparison by comparator 10 (R4)
If is larger, the output (Q, ) of the quotient correction circuit 7 is stored in the quotient register 13 through the quotient register input selector 12 as the i-th partial quotient. In the quotient register 13, the partial quotients Q, , Q, , stored up to the previous calculation loop are stored in the quotient register 13.
...+Qt+ and the newly given partial quotient (Q,) are concatenated and stored. Along with this, addition times F! @4
The entire output of is stored in the intermediate result register 6, and the upper 12 bits inside the storage are stored in the multiplier register 2 as the next partial quotient. Further, the contents of the divisor reciprocal product register 8 are shifted by 12 bits by the reciprocal product shifter 9 and stored in the divisor reciprocal product register 8 through the divisor reciprocal product selector 11. After that, the divisor reciprocal 1 (-D・
2'2) and the multiplication operation of the partial quotient (Q, ゛), the completion of division, the storage of the partial quotient, the next partial quotient, and the storage operation of the shift result by the divisor reciprocal product shifter 9 are stored.

この実施例では、単精度36ビツトの商を演算の1ルー
プあたり12ビツトずつ求める例を説明している。もし
、倍精度64ビツトの商を同様に求める場合には、除数
逆数積レジスタ8の内容(D)を除数逆数積シフタ9に
より右に24ビツトシフト(2−24倍)したが、これ
を右に52ビツトシフト<2−”(?i)すればよい。
In this embodiment, an example is explained in which the quotient of single-precision 36-bit data is calculated in units of 12 bits per loop of calculation. If you want to obtain a double-precision 64-bit quotient in the same way, you would shift the contents (D) of the divisor reciprocal product register 8 to the right by 24 bits (2-24 times) using the divisor reciprocal product shifter 9; A 52-bit shift <2-" (?i) is sufficient.

また、上述のように商セレクタ14は、商レジスタ13
の内容を除算結果として転送する際に必要な単精度/倍
精度の切替に用いられる。
Further, as described above, the quotient selector 14 is connected to the quotient register 13.
It is used to switch between single precision and double precision, which is necessary when transferring the contents of as a division result.

九肌五左1 以上説明したように、本発明によれば、従来の除算回路
に若干の金物を追加するだけで除算を高速化することが
できるという効果がある。
As explained above, according to the present invention, it is possible to speed up division by simply adding some hardware to a conventional division circuit.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明の一実施例を示す図、第2図は従来の除
算回路を示す図である。 主要部分の符号の説明 1・・・・・・被乗数レジスタ 2・・・・・・乗数レジスタ 3・・・・・・乗数回路 4・・・・・・加算回路 5・・・・・・シフト/ゼロ回路 6・・・・・・中間結果レジスタ 7・・・・・・商補正回路 8・・・・・・除数逆数積レジスタ 9・・・・・・除数逆数積レジスタ 10・・・・・・比較器 11・・・・・・除数逆数積セレクタ 12・・・・・・商レジスタ入口セレクタ13・・・・
・・商レジスタ 14・・・・・・商セレクタ 15・・・・・・リザルトセレクタ
FIG. 1 is a diagram showing an embodiment of the present invention, and FIG. 2 is a diagram showing a conventional division circuit. Explanation of symbols of main parts 1... Multiplicand register 2... Multiplier register 3... Multiplier circuit 4... Adder circuit 5... Shift /Zero circuit 6... Intermediate result register 7... Quotient correction circuit 8... Divisor reciprocal product register 9... Divisor reciprocal product register 10... ... Comparator 11 ... Divisor reciprocal product selector 12 ... Quotient register entrance selector 13 ...
... Quotient register 14 ... Quotient selector 15 ... Result selector

Claims (1)

【特許請求の範囲】[Claims] (1)被除数と除数の逆数の積におきかえ引放し法を用
いて多数桁の部分商を発生し、除算する除算装置であっ
て、前記引放し法を用い部分商を発生するための演算ル
ープを実行し近似商を少なくする近似商生成手段と、こ
の近似商生成手段により生成された近似商の一部を部分
商として取出す部分商生成手段と、前記除数の逆数の精
度および演算ループの実行回数に基づいて確定された定
数と前記近似商生成手段からの近似商とを比較し、該定
数が近似商より大きいときは近似商を選択し、該定数が
近似商より小さいときは前記部分商生成手段からの部分
商を補正した部分商を選択し、この選択結果と演算ルー
プの前回までに求められた部分商とを連結する手段とを
含むことを特徴とする除算装置。
(1) A division device that generates and divides a multi-digit partial quotient by replacing it with the product of the dividend and the reciprocal of the divisor using the pull-out method, and an arithmetic loop for generating the partial quotient using the pull-out method. Approximate quotient generating means for reducing the approximate quotient by executing the approximate quotient, partial quotient generating means for extracting a part of the approximate quotient generated by the approximate quotient as a partial quotient, and determining the accuracy of the reciprocal of the divisor and executing the calculation loop. The constant determined based on the number of times is compared with the approximate quotient from the approximate quotient generating means, and when the constant is larger than the approximate quotient, the approximate quotient is selected, and when the constant is smaller than the approximate quotient, the partial quotient is selected. A division device characterized by comprising means for selecting a partial quotient obtained by correcting the partial quotient from the generating means and for concatenating the selection result with the partial quotient obtained up to the previous time in the calculation loop.
JP63135934A 1988-06-02 1988-06-02 Division device Pending JPH01304535A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63135934A JPH01304535A (en) 1988-06-02 1988-06-02 Division device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63135934A JPH01304535A (en) 1988-06-02 1988-06-02 Division device

Publications (1)

Publication Number Publication Date
JPH01304535A true JPH01304535A (en) 1989-12-08

Family

ID=15163262

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63135934A Pending JPH01304535A (en) 1988-06-02 1988-06-02 Division device

Country Status (1)

Country Link
JP (1) JPH01304535A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04306731A (en) * 1991-04-03 1992-10-29 Koufu Nippon Denki Kk Vector arithmetic unit

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04306731A (en) * 1991-04-03 1992-10-29 Koufu Nippon Denki Kk Vector arithmetic unit

Similar Documents

Publication Publication Date Title
US5128891A (en) High speed divider with square root capability
JP3418460B2 (en) Double precision division circuit and method
US5105378A (en) High-radix divider
US4594680A (en) Apparatus for performing quadratic convergence division in a large data processing system
JP2502836B2 (en) Preprocessing device for division circuit
JP2508784B2 (en) Exponential function calculator
US7016930B2 (en) Apparatus and method for performing operations implemented by iterative execution of a recurrence equation
GB2549153B (en) Apparatus and method for supporting a conversion instruction
JP2511527B2 (en) Floating point arithmetic unit
JPH01304535A (en) Division device
JPH0584928B2 (en)
US20030115236A1 (en) Elimination of rounding step in the short path of a floating point adder
JPH086766A (en) Sine and cosine arithmetic device
JPS59154542A (en) Multiplying device
JP2664750B2 (en) Arithmetic device and arithmetic processing method
JPH08202533A (en) Division processor
JPS59160235A (en) Dividing device
JP2654062B2 (en) Information processing device
JPH02181823A (en) Dividing device
JP2001092639A (en) Division and square root arithmetic unit
JPH01274234A (en) Divider
JPH0285922A (en) Arithmetic circuit
JPH02103625A (en) Decimal multiplication system
JPH0317738A (en) Arithmetic processor
JPH0638228B2 (en) Multiplier with add / subtract function