JPH01125625A - Division device - Google Patents

Division device

Info

Publication number
JPH01125625A
JPH01125625A JP28495487A JP28495487A JPH01125625A JP H01125625 A JPH01125625 A JP H01125625A JP 28495487 A JP28495487 A JP 28495487A JP 28495487 A JP28495487 A JP 28495487A JP H01125625 A JPH01125625 A JP H01125625A
Authority
JP
Japan
Prior art keywords
division
dividend
register
circuit
divisor
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
JP28495487A
Other languages
Japanese (ja)
Inventor
Yukio Takase
高瀬 幸夫
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 Software Shikoku Ltd
Original Assignee
NEC Software Shikoku Ltd
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 Software Shikoku Ltd filed Critical NEC Software Shikoku Ltd
Priority to JP28495487A priority Critical patent/JPH01125625A/en
Publication of JPH01125625A publication Critical patent/JPH01125625A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To increase the arithmetic speed of a division device by using an arithmetic circuit as well as two registers which realize the right and left shifts of the input data and hold the shift numbers required when a divisor and a dividend normalized in the hexadecimal notation are turned into the binary notation. CONSTITUTION:The higher 3 bits of a register 1 are sent to an encoder 2 after the input of a dividend and the reading zero number is detected and held by a register 3. This reading zero number is sent to a shifter 8 as the shift number when a selector 6 selects a signal line 22. When a selector 7 selects an input line 26 and a control circuit 10 instructs the left direction to the shifter 8, the shifter 8 shifts the output of the register 1 to the left by an extent equal to the reading zero number. The dividend normalized into the binary notation is held by a converging binary division circuit 9. Then a divisor also undergoes the same procedure and the circuit 9 carries out the converging division with 2 used as a radix by an instruction of the circuit 10.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、除算装置に関し、特に16を基数とする浮動
小数点形式データの除算を収束型除算方式で行う除算装
置に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a division device, and more particularly to a division device that performs division of floating point format data with a base of 16 using a convergent division method.

〔従来の技術〕[Conventional technology]

従来、16を基数とする浮動小数点形式データの除算を
収束型除算方式を用いて行う除算装置では、除算前に除
数の仮数部のみを2を基数として正規化(以後、@2進
正規化” と呼ぶ)シ、このときのシフト数をレジスタ
に保持し、その出力をもとに仮数部の除算結果(以後、
単に”除算結果1と呼ぶ)の補正シフトを行った後、1
6を基数として正規化(以後、′16進正規化”と呼ぶ
)する方法、または、除算前の仮数部の2進正規化を除
数と被除数に対して行い、このときのシフト数を2つの
レジスタに保持し、それぞれのレジスタの出力を順次用
いて除算結果の補正シフトをした後、16進正規化を行
う方法が使われていた。
Conventionally, in a division device that uses a convergent division method to divide floating-point format data with a base of 16, only the mantissa part of the divisor is normalized with a base of 2 (hereinafter referred to as @binary normalization) before division. The shift number at this time is held in a register, and based on the output, the mantissa division result (hereinafter referred to as
After performing a correction shift of simply “division result 1”, 1
Normalization using 6 as the base (hereinafter referred to as ``hexadecimal normalization''), or binary normalization of the mantissa before division for the divisor and dividend, and the shift number at this time is divided into two. A method was used in which the division results were held in registers, the outputs of each register were sequentially used, and the division results were corrected and shifted, followed by hexadecimal normalization.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

上述した従来の除算装置における前者の方法で、7\ は、除算結果の先頭部分KOの列が残り、その分、下位
ビットが失われて、精度が悪くなるということ、その後
、16進正規化を行う必要があることという欠点があり
、後者の方法では、除算結果を補正するために被除数の
2進正規化時のシフト数に対応して右シフトし、除数の
2進正規化時のシフト数に対応して左シフトする必要が
あるので、右シフト時に下位ビットが失われること、左
シフト時に上位ビットがあふれる場合の対策が必要なこ
と、さらに得られた結果を16進正規化する必要がある
ことという欠点がある。
In the former method in the conventional division device described above, 7\ means that the column of the first part KO of the division result remains, and the lower bits are lost accordingly, resulting in poor precision.After that, hexadecimal normalization is performed. In the latter method, in order to correct the division result, a right shift is performed corresponding to the shift number when binary normalizing the dividend, and the shift number when binary normalizing the divisor is Since it is necessary to shift to the left corresponding to the number, the lower bits are lost when shifting to the right, countermeasures are required in case the upper bits overflow when shifting to the left, and the obtained result needs to be hexadecimal normalized. There is a disadvantage that there is

〔問題点を解決するための手段〕[Means for solving problems]

本発明の除算装置は、入力データを左右にシフト可能な
シフタと、16進正規化された除数と被除数を2進正規
化するときのシフト数を保持する2つのレジスタと、2
進正規化された除数と被除数から得られた除算結果を1
6進正規化済数に戻すためのシフト数および商の指数部
に対する補正信号を先の2つのレジスタの出力から算出
する加算a*at*t、−cw、b・7\ 〔実施例〕 次に、本発明について第1図を参照して説明する。第1
図は一本発明の実施例を構成するブロック図であシ、1
は除数または被除数の仮数部を一時的に保持するレジス
タ、2はレジスタ1の出力の上位3ビツトのリーディン
グゼロの数を出力するプライオリティエンコーダ、3社
被除数のリーディングゼロの数を保持するレジスタ、4
は除数のリーディングゼロの数を保持するレジスタ、5
はレジスタlの出力とレジスタ2の出力とを減算する演
算回路、6は信号線22によって送られてくるエンコー
ダ2の出力と信号線23によって送られてくる演算回路
5の出力を制御回路10の指示により選択する第1のセ
レクタ、7は信号線26によりて送られてくるレジスタ
1の出力と信号線29によ0て送られてくる収束M12
進除算回路9の出力を制御回路10の指示により選択す
る第2のセレクタ、8は信号線24によって送られてく
る第1のセレクタ6の出力をシフト数とし、信号線27
によって送られてくる第2のセレクタ7の出力を制御回
路10の指示により左または右にシフトするシフタ、9
は内部にレジスタ、乗算器などを持ち、2を基数として
収束型除算を行う除算回路、10は本除算装置内部の制
御を行う制御回路である。
The division device of the present invention includes a shifter that can shift input data left and right, two registers that hold shift numbers when binary normalizing a hexadecimal-normalized divisor and dividend, and
The division result obtained from the base-normalized divisor and dividend is 1
Addition a*at*t, -cw, b・7\ [Example] Next Next, the present invention will be explained with reference to FIG. 1st
The figure is a block diagram configuring an embodiment of the present invention.
is a register that temporarily holds the divisor or the mantissa of the dividend; 2 is a priority encoder that outputs the number of leading zeros in the upper three bits of the output of register 1; 3 is a register that holds the number of leading zeros of the dividend; 4
is the register that holds the number of leading zeros in the divisor, 5
6 is an arithmetic circuit that subtracts the output of register l and the output of register 2, and 6 is an arithmetic circuit that subtracts the output of the encoder 2 sent through the signal line 22 and the output of the arithmetic circuit 5 sent through the signal line 23 to the control circuit 10. The first selector 7 selects according to the instruction, the output of register 1 is sent by signal line 26, and the convergence M12 is sent by signal line 29 by 0.
A second selector 8 selects the output of the base/divider circuit 9 according to an instruction from the control circuit 10, which uses the output of the first selector 6 sent via the signal line 24 as the shift number, and selects the output from the signal line 27.
a shifter 9 that shifts the output of the second selector 7 sent by the controller to the left or right according to instructions from the control circuit 10;
1 is a division circuit which has internal registers, multipliers, etc. and performs convergent division with a base of 2, and 10 is a control circuit which controls the inside of this division device.

以下に第1図をもとにして、本除算装置の動作〈ついて
述べる。まず、16を基数とした浮動小数点形式データ
である被除数の仮数部が信号線20により外部から入力
され、レジスタIKセットされる。レジスタlの上位3
ビツトは、信号線21により、エンコーダ2に送られ、
リーディングゼpの数が検出されてレジスタ3に保持さ
れる。セレクタ6が信号@22を選択することにより、
このリーディングゼロの数は、シフト数としてシ7り8
にも送られる。セレクタ7が、入力線26を選択し、制
御回路10がシフタ8に左方向を指示することKよシ、
シフタ8は、レジスタ1の出力(被除数の仮数部)をリ
ーディングゼロの数だけ左シフトする。こうして2進正
規化された被除数は、収束盤2進除算回路下内部の被除
数レジスタ“−1へ1 に保持される。
The operation of this dividing device will be described below based on FIG. First, the mantissa part of the dividend, which is floating point format data with a radix of 16, is input from the outside via the signal line 20, and the register IK is set. Top 3 of register l
The bits are sent to the encoder 2 via a signal line 21,
The number of leading zes p is detected and held in register 3. When the selector 6 selects the signal @22,
This number of leading zeros is the number of shifts.
It will also be sent to The selector 7 selects the input line 26, and the control circuit 10 instructs the shifter 8 to move to the left.
Shifter 8 shifts the output of register 1 (the mantissa part of the dividend) to the left by the number of leading zeros. The dividend thus binary normalized is held at 1 in the dividend register "-1" inside the convergence board binary division circuit.

次に、16を基数とした浮動小数点形式データである除
数の仮数部が信号il 20 Kよシ外部から入力され
、レジスタ1にセットされる。リーディングゼ四の数が
レジスタ4に保持されることと、2進正規化された除数
が収束型2進除算回路9内部の除数レジスタに保持され
ることを除いて被除数の場合と同様の動作が行われる。
Next, the mantissa part of the divisor, which is floating point format data with a radix of 16, is input from the outside via the signal il 20 K and set in register 1. The operation is the same as that for the dividend, except that the leading number is held in the register 4, and the binary normalized divisor is held in the divisor register inside the convergent binary division circuit 9. It will be done.

この後、制御回路10の指示により、収束型2進除算回
路9は、2を基数とした収束型除算を行う。2進収束型
除算とは、次の(1)から(3)の方法で仮数部の除算
を行う方法である。
Thereafter, in response to instructions from the control circuit 10, the convergent binary division circuit 9 performs convergent division with a base of 2. Binary convergence division is a method of dividing the mantissa part using the following methods (1) to (3).

(1)  除数の仮数部の逆数の初期近似値をROMか
ら読み出すなどの方法で得て、これを除数の仮数部(分
母)と被除数の仮数部(分子)に乗じて、新たな分母と
分子を得る。
(1) Obtain the initial approximate value of the reciprocal of the mantissa part of the divisor by a method such as reading it from ROM, and multiply this by the mantissa part (denominator) of the divisor and the mantissa part (numerator) of the dividend to create a new denominator and numerator. get.

(2)分母に乗じると分母が1に近づくような値を一定
のアルゴリズムで得て、また分母と分子に乗じる。
(2) Use a certain algorithm to obtain a value that, when multiplied by the denominator, approaches 1, and then multiply the denominator and numerator again.

(3)  (2)の動作を続けるご仁任よって分母がI
K収束すると、分子が求める除最結果に収束する。
(3) By continuing the operation in (2), the denominator is I.
When K converges, the numerator converges to the desired division result.

先の2進正規化により、除数と被除数の仮数部除算結果
は、次のような形で得られる。
By the above binary normalization, the result of dividing the mantissa parts of the divisor and dividend is obtained in the following form.

L×××・・・・・・X または、 0.IXX・・・・・・×(但し、・は小数
点位置)この除算結果は、除数、被除数を2進正規化し
た際の左シフトによりビットがずれておシ、また、収束
製除算により小数点位置が16を基数とした位置からず
nているので、その補正のため、次の3つのシフトを必
要とする。
L×××・・・・・・X or 0. IXX・・・・・・× (However, . is the decimal point position.) The bits of this division result may be shifted due to the left shift when the divisor and dividend are normalized in binary, and the decimal point position may be changed due to the convergence division. is shifted from the position based on 16, so the following three shifts are required to correct it.

(1)  除算結果は、被除数を2進正規化した際、左
ヘシフトしたビット数(dとする。0≦d≦3)だけ左
にずれているので、dビット右にシフトする。
(1) When the dividend is binary normalized, the division result is shifted to the left by the number of bits shifted to the left (denoted as d, where 0≦d≦3), so it is shifted to the right by d bits.

(2)除算結果は、除数を2進正規化した際、左ヘシフ
トしたビット数(rとする。O≦r≦3)だけ右にずれ
ているので、rビット左にシフトする。
(2) When the divisor is binary normalized, the division result is shifted to the right by the number of bits shifted to the left (r; O≦r≦3), so it is shifted to the left by r bits.

(3)  除算結果の小数点位置は、16を基数とした
位置から右に3ビツトずれているので、除算結果を右に
3ビツトシフトすることKより、小数点位置を16を基
数とした位置に移す。
(3) Since the decimal point position of the division result is shifted 3 bits to the right from the position where the base number is 16, by shifting the division result by 3 bits to the right, the decimal point position is shifted to the position where the base number is 16.

つまり、合計d−r+3ビットの右シフトを行わなけれ
ばならない。d−r+3の計算をレジスタ1の出力(=
d)とレジスタ4の出力を演算回路5に入力することで
行う。この減算で、キャリーアウト(信号線25)がO
の場合、セレクタ6が、信号線23を選択することによ
り、加11回路5の出力がシフタ8に送られ、さらに、
セレクタ7が信号線29を選択することにより、演算回
路5の出力に従って除算回路9の出力の除算結果は、次
のように補正される。但し、・は小数点位置である。
That is, a total right shift of d−r+3 bits must be performed. The calculation of d-r+3 is performed using the output of register 1 (=
d) and the output of the register 4 are input to the arithmetic circuit 5. With this subtraction, the carryout (signal line 25) is O
In this case, the selector 6 selects the signal line 23, so that the output of the adder 11 circuit 5 is sent to the shifter 8, and further,
When the selector 7 selects the signal line 29, the division result of the output of the division circuit 9 is corrected as follows according to the output of the arithmetic circuit 5. However, . is the decimal point position.

(2) d−r+3−00とき  ・1×××・・・・
・・×または、  ・01X×・・・・・・×03) 
 d−r+3=1のとき  −01XX−−−−−−X
または、  ・001×・・・・・・×(C)  d 
−r + 3 = 2のとき  ・001×・・・・・
・×([)  d−r+3=3のとき  −0001X
−−−−−−Xまたは、  ・0t)OOIX−・・・
・・×−(イ)他方、キャリーアウト(信号線25)が
lの場合は、4ビツト以上の右シフトが必要となるが、
信号llA25でキャリーアウトが1であることを指数
部の回路に伝え、商の指数部から1を減じて、シフト数
を3ビツト以下に押さえる。その他は、キャリーアウト
がOである場合と同様の動作を行うことKより、除算結
果は、次のように補正される。・は小数点位置である。
(2) When d-r+3-00 ・1×××・・・・
・・・× or ・01X×・・・・・・×03)
When d-r+3=1 -01XX----X
Or, ・001×・・・・・・×(C) d
When −r + 3 = 2 ・001×・・・・・・
・×([) When d-r+3=3 -0001X
-------X or ・0t)OOIX-...
...x-(a) On the other hand, if the carryout (signal line 25) is l, a right shift of 4 bits or more is required,
The signal llA25 notifies the exponent part circuit that the carryout is 1, and subtracts 1 from the exponent part of the quotient to keep the number of shifts to 3 bits or less. Otherwise, the same operation as in the case where the carryout is O is performed.The division result is corrected as follows.・ is the decimal point position.

■ d−r+3=4のとき  ・1×××・−−−−−
Xまたは、  ・01××・・・・・・×(F5  d
−r+3=5のとき  @OIXX・−−−−−Xまた
は、  ・001×・・・・・・×    4〇)  
d −r + 3 = 6のとき  ・001×・・・
・・・×・0OOIX・・・・・・× すなわち、■の(@を除いて、除算結果の補正と16進
正規化処理が、唯一回のシフトで行われる。
■ When d−r+3=4 ・1×××・−−−−
X or ・01××・・・・・・×(F5 d
When -r+3=5 @OIXX・----X or ・001×・・・・・・× 4〇)
When d - r + 3 = 6 ・001×...
・・・×・0OOIX・・・・× In other words, except for the (@ in ■), the correction of the division result and the hexadecimal normalization process are performed in only one shift.

このようKして得られた計算結果は、信号線28〔発明
の効果〕 以上説明したように本発明は、16進正規化済数である
除数、被除数を2進正規化して除算することによって生
じる不規則な補正シフト数と、収束型除算方式によって
生じる補正右シフト数3ビットを加算し、その結果によ
り除算結果を−ffiK右シフトして、下位ビットの桁
落ちを防いで精度を向上させるという効果を持つ。また
、補正のためのシフト回数が看小限で済み、かつ、はと
んどの場合、除算結果が16進正規化済の形で得られる
ので、除算後の正現化処理が不要なことが多くなシ、演
算速度が向上するという効果もある。
The calculation result obtained by K in this way is transmitted to the signal line 28. [Effects of the Invention] As explained above, the present invention is capable of performing division by binary normalizing the divisor and dividend, which are hexadecimal normalized numbers. Add the irregular correction shift number that occurs and the 3-bit correction right shift number generated by the convergent division method, and use the result to shift the division result to the right by -ffiK to prevent the loss of digits in the lower bits and improve accuracy. It has this effect. In addition, the number of shifts for correction is kept to a minimum, and in most cases, the division result is obtained in hexadecimal normalized form, so there is no need for normalization processing after division. In many cases, it also has the effect of improving calculation speed.

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

第1図は、本発明を実現する回路の例のブロック図であ
る。 1・・・・・・除数および被除数の仮数部をセットする
レジスタ、2・・・・・・プライオリティ・エンコーダ
、3・・・・・・シフト数記゛憶レジスタ(被除数用)
、4・・・−・シフ)#記憶レジスタ(除数用)、5・
・・−・・キャリーアウト出力をもつ2ビツトの加算回
路、6・・・・・・シフト数セレクタ、7・・・・・・
シフタ入力セレクタ、8・・・・・・シフタ、9・・・
−・・収束型2進除算回、路。 代理人 弁理士  内  原    晋ふ 第 1 図
FIG. 1 is a block diagram of an example circuit implementing the invention. 1: Register for setting the divisor and the mantissa of the dividend, 2: Priority encoder, 3: Shift number storage register (for dividend)
, 4...- Schiff) #Storage register (for divisor), 5.
...2-bit adder circuit with carry-out output, 6...Shift number selector, 7...
Shifter input selector, 8...Shifter, 9...
-...Convergent binary division circuit, path. Agent Patent Attorney Susumu Uchihara Figure 1

Claims (1)

【特許請求の範囲】[Claims] 浮動小数点形式データの収束型除算方式による除算装置
において、入力データを左右にシフトするシフタと、1
6を基数として正規化された除数と被除数の仮数部を前
記シフタで2を基数として正規化する際のシフト数を保
持する2つのレジスタと、前記2を基数として正規化し
た除数と被除数から収束型除算方式により計算された仮
数部の除算結果を前記シフタにより16を基数として正
規化された数に戻すためのシフト数および商の指数部に
対する補正信号を前記2つのレジスタから算出する演算
回路を持つことを特徴とする除算装置。
In a division device using a convergent division method for floating point format data, a shifter for shifting input data left and right;
Two registers that hold the number of shifts when normalizing the mantissa parts of the divisor and dividend normalized to a base of 6 using the shifter, and convergence from the divisor and dividend normalized to a base of 2. an arithmetic circuit that calculates from the two registers a shift number for returning the division result of the mantissa calculated by the type division method to a number normalized with 16 as a base by the shifter and a correction signal for the exponent part of the quotient; A dividing device characterized by having.
JP28495487A 1987-11-10 1987-11-10 Division device Pending JPH01125625A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP28495487A JPH01125625A (en) 1987-11-10 1987-11-10 Division device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP28495487A JPH01125625A (en) 1987-11-10 1987-11-10 Division device

Publications (1)

Publication Number Publication Date
JPH01125625A true JPH01125625A (en) 1989-05-18

Family

ID=17685228

Family Applications (1)

Application Number Title Priority Date Filing Date
JP28495487A Pending JPH01125625A (en) 1987-11-10 1987-11-10 Division device

Country Status (1)

Country Link
JP (1) JPH01125625A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5481745A (en) * 1992-12-25 1996-01-02 Mitsubishi Denki Kabushiki Kaisha High speed divider for performing hexadecimal division having control circuit for generating different division cycle signals to control circuit in performing specific functions

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5481745A (en) * 1992-12-25 1996-01-02 Mitsubishi Denki Kabushiki Kaisha High speed divider for performing hexadecimal division having control circuit for generating different division cycle signals to control circuit in performing specific functions

Similar Documents

Publication Publication Date Title
KR920005226B1 (en) Floating point arithmetic units
US6138135A (en) Propagating NaNs during high precision calculations using lesser precision hardware
US4758974A (en) Most significant digit location
US4594680A (en) Apparatus for performing quadratic convergence division in a large data processing system
JPS60140422A (en) Arithmetic processing unit
JPS62191926A (en) Arithmetic unit
JPH05250146A (en) Arithmetic operation circuit executing integer involution processing
JP2511527B2 (en) Floating point arithmetic unit
US7016930B2 (en) Apparatus and method for performing operations implemented by iterative execution of a recurrence equation
JPH04270415A (en) High-performance adder
JPH01125625A (en) Division device
JPH0540605A (en) Floating point multiplier
JPH07146777A (en) Arithmetic unit
US5689721A (en) Detecting overflow conditions for negative quotients in nonrestoring two's complement division
JP2664750B2 (en) Arithmetic device and arithmetic processing method
JPH0251732A (en) Floating point computing element
JPH0285922A (en) Arithmetic circuit
JPS63254525A (en) Dividing device
JPS61118835A (en) Hardware divider
SU567172A1 (en) Floating-point subtraction unit
JPS54162936A (en) Data processor
JPH03282619A (en) Multiplication circuit
JPS6129020B2 (en)
JPS60246437A (en) Dividing circuit
JPS59160235A (en) Dividing device