JP2622012B2 - Shift circuit - Google Patents

Shift circuit

Info

Publication number
JP2622012B2
JP2622012B2 JP2127545A JP12754590A JP2622012B2 JP 2622012 B2 JP2622012 B2 JP 2622012B2 JP 2127545 A JP2127545 A JP 2127545A JP 12754590 A JP12754590 A JP 12754590A JP 2622012 B2 JP2622012 B2 JP 2622012B2
Authority
JP
Japan
Prior art keywords
floating
normalized
shift
mantissa
point data
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.)
Expired - Lifetime
Application number
JP2127545A
Other languages
Japanese (ja)
Other versions
JPH0423033A (en
Inventor
伸悟 石原
Original Assignee
甲府日本電気株式会社
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 甲府日本電気株式会社 filed Critical 甲府日本電気株式会社
Priority to JP2127545A priority Critical patent/JP2622012B2/en
Publication of JPH0423033A publication Critical patent/JPH0423033A/en
Application granted granted Critical
Publication of JP2622012B2 publication Critical patent/JP2622012B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【発明の詳細な説明】 技術分野 本発明はシフト回路に関し、特に浮動小数点データ演
算器において、正規化されていない入力データの仮数部
をシフト制御するシフト回路に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a shift circuit, and more particularly, to a shift circuit in a floating-point data arithmetic unit, which shift-controls a mantissa of non-normalized input data.

従来技術 浮動小数点加減算において、正規化が施されていない
浮動小数点データを入力するような場合、演算精度を上
げるため、まず、非正規化データを正規化するための処
理を行なう。
2. Description of the Related Art In floating-point addition and subtraction, when floating-point data that has not been normalized is input, first, processing for normalizing non-normalized data is performed in order to increase calculation accuracy.

正規化されていない仮数部の値より、指数部、仮数部
を正規するための正規化量を算出する。指数部は正規化
量に基づいた値を指数部の値に加算もしくは減算するこ
とで正規化され、また仮数部は正規化量をシフト量とし
て、双方向シフタによりシフトすることで正規化され
る。
A normalization amount for normalizing the exponent part and the mantissa part is calculated from the value of the unnormalized mantissa part. The exponent is normalized by adding or subtracting a value based on the normalized amount to or from the value of the exponent, and the mantissa is normalized by shifting the bidirectional shifter using the normalized amount as a shift amount. .

正規化データが準備されると、次に指数部をそろえる
ため、正規化された指数部同士の比較を行ない、指数部
の値が最も大きいデータを基準として、そのデータの仮
数部はシフトせず、そうでないデータの仮数部は値が最
も大きい指数部と自分自身の指数部との差分だけ右シフ
トを行なう。そして、桁合せされた仮数部同士の加減算
を行なえばよい。
When the normalized data is prepared, the exponents are aligned next, so that the normalized exponents are compared with each other, and the mantissa of the data is not shifted based on the data having the largest value of the exponent. The mantissa part of the other data is shifted to the right by the difference between the exponent part having the largest value and its own exponent part. Then, addition and subtraction between the digit-aligned mantissa parts may be performed.

従来例として、2つのオペランドを入力とする浮動小
数点加算器について、第3図を用いて具体的に説明す
る。
As a conventional example, a floating point adder having two operands as inputs will be specifically described with reference to FIG.

第1オペランドは符号部SA、指数部EA,仮数部MAより
構成されている正規化浮動小数点データ、第2オペラン
ドは符号部SB0,指数部EB0,仮数部MB0,仮数部桁あふれ用
保護部GB0より構成されている非正規化浮動小数点デー
タである。
The first operand is a normalized floating point data composed of a sign part SA, an exponent part EA, and a mantissa part MA. Is non-normalized floating-point data.

第2オペランドは2進数であり、 (−1)SB0×(GB0+MB0)×2EB0と表され、特に仮数
部MB0,仮数部桁あふれ用保護部GB0は次のように表現さ
れる。
The second operand is a binary number, and is expressed as (-1) SB0 × (GB0 + MB0) × 2 EB0 . In particular, the mantissa part MB0 and the mantissa part overflow protection unit GB0 are expressed as follows.

MB0=M0×2-1+M1×2-2+ …+Mm×2m-1 GB0=Gn×2n-1+ …+G2×21+G1×20 この場合、非正規化浮動小数点データと呼ばれるの
は、GB0=0かつMB0の少なくとも最大有意ビットM0が0
であるような値(以下有左シフトデータと呼ぶ)と、加
減算の結果などでMB0から桁あふれが生じ、GB0≠0であ
るような値(以下桁あふれデータと呼ぶ)のことであ
る。
MB0 = M0 × 2 -1 + M1 × 2 -2 + ... + Mm × 2 m-1 GB0 = Gn × 2 n-1 + ... + G2 × 2 1 + G1 × 2 0 In this case, it is called non-normalized floating point data. Is GB0 = 0 and at least the most significant bit M0 of MB0 is 0
(Hereinafter referred to as left-shifted data), an overflow occurs from MB0 due to the result of addition / subtraction, etc., and GB0 ≠ 0 (hereinafter referred to as overflow data).

また、正規化浮動小数点データとは、仮数部からの桁
あふれがなく(GB=0)かつ最大有意ビットM0が1であ
るような値のことをいう。
The normalized floating-point data is a value such that there is no overflow from the mantissa (GB = 0) and the maximum significant bit M0 is 1.

正規化量算出回路1は仮数部MB0と仮数部桁あふれ用
保護部GB0を入力として、仮数部が桁あふれしているか
どうかを判断し、「桁あふれがあるのなら仮数部を桁あ
ふれ分右シフトを、桁あふれがなければ仮数部をリーデ
ィングゼロカウンタの値分左シフトを行なう」、という
ことを表わす正規化シフト量NSB0を出力するものとす
る。この正規化シフト量NSB0は仮数部をシフトするべき
シフト分の値として、左シフトなら負数、右シフトなら
正数で表現する。したがって仮数部桁あふれデータなら
正数、有左シフトデータなら負数となる。
The normalization amount calculation circuit 1 receives the mantissa part MB0 and the mantissa part overflow protector GB0 as inputs and determines whether the mantissa part has overflowed. If "mant overflow occurs, the mantissa part overflows to the right. The shift is performed by shifting the mantissa to the left by the value of the leading zero counter if there is no overflow, "a normalized shift amount NSB0 is output. The normalized shift amount NSB0 is expressed as a value for the shift by which the mantissa is to be shifted, as a negative value for left shift and a positive value for right shift. Therefore, if the data has a mantissa part overflow, it will be a positive number, and if it has left shift data, it will be a negative number.

仮数部MB0はこの正規化シフト量NSB0に基づいて双方
向シフタ8により正規化される。正規化された仮数部を
MBと呼ぶ。また、指数部EB0は、指数部正規化回路2に
より正規化シフト量NSB0を加算することで正規化され
る。正規化された指数部をEBと呼ぶ。
The mantissa part MB0 is normalized by the bidirectional shifter 8 based on the normalized shift amount NSB0. The normalized mantissa
Call it MB. The exponent part EB0 is normalized by the exponent part normalization circuit 2 by adding the normalized shift amount NSB0. The normalized exponent is called EB.

指数部比較回路31は2つの指数部EA,EBを入力とし
て、それらの大小比較を行ない、 EA=EBのとき、CI(S0,T0) =(0,0) EA>EBのときCI(S0,T0) =(0,1) EA<EBのときCI(S0,T0) =(1,0) と表すような比較情報CI(S0,T0)を比較結果として出
力する。
The exponent part comparison circuit 31 compares the two exponent parts EA and EB with each other and compares their magnitudes. When EA = EB, CI (S0, T0) = (0, 0) When EA> EB, CI (S0 , T0) = (0, 1) When EA <EB, the comparison information CI (S0, T0) expressed as CI (S0, T0) = (1, 0) is output as the comparison result.

また、指数部減算回路32はEBからEAを減じ、その差分
SBBAを出力し、指数部減算回路33はEAからEBを減じ、そ
の差分SBABを出力する。
Also, the exponent part subtraction circuit 32 subtracts EA from EB, and calculates the difference
The SBBA is output, and the exponent part subtraction circuit 33 subtracts EB from EA, and outputs the difference SBAB.

そして、指数部比較回路31より導かれた比較情報CI
(S0,T0)に基づいて、選択回路34は、T0=0のとき、
(EA≦EBのとき)、指数部減算回路32の出力結果SBBA
を、S0=0のとき(EA≧EBのとき)、零を夫々選択す
る。同じように、選択回路35はS0=0のとき(EA≧EBの
とき)、指数部減算回路33の出力結果SBBAを、T0=0の
とき(EA≦EBのとき)、零を夫々選択する。
Then, the comparison information CI derived from the exponent part comparison circuit 31
Based on (S0, T0), the selection circuit 34, when T0 = 0,
(When EA ≦ EB), the output result SBBA of the exponent part subtraction circuit 32
, When S0 = 0 (when EA ≧ EB), zero is selected. Similarly, when S0 = 0 (when EA ≧ EB), the selection circuit 35 selects the output result SBBA of the exponent part subtraction circuit 33, and when T0 = 0 (when EA ≦ EB), selects zero. .

これらの選択回路の出力がそれぞれ第1、第2オペラ
ンドの仮数部MA,MBに対する桁合せシフト量SFA,SFBとな
る。桁合せシフト量も、正規化量と同じように左シフト
なら負数、右シフトなら正数で表現される。
The outputs of these selection circuits are the shift amounts SFA and SFB of the mantissa parts MA and MB of the first and second operands, respectively. Similarly to the normalization amount, the digit shift amount is expressed by a negative number for left shift and a positive number for right shift.

尚、指数部比較回路31、指数部減算回路32、33及び選
択回路34,35がシフト量算出部3を構成している。
The exponent part comparing circuit 31, the exponent part subtracting circuits 32 and 33, and the selecting circuits 34 and 35 constitute the shift amount calculating part 3.

選択回路4は、S0=0のとき(EA≧EBのとき)、第1
オペランドの指数部EAを、T0=0とき(EA≦EBのと
き)、第2オペランドの指数部EBを夫々選択し、加算結
果指数部ECとして出力する。
When S0 = 0 (when EA ≧ EB), the selection circuit 4
When T0 = 0 (when EA ≦ EB), the exponent part EA of the operand is selected as the exponent part EB of the second operand, and output as the addition result exponent part EC.

右方向シフタ5は桁合せシフト量SFAに基づいて第1
オペランドの仮数部MAをシフトし、右方向シフタ9は桁
合せシフト量SFBに基づいて、第2オペランドの仮数部M
Bをシフトする。
The rightward shifter 5 is the first shifter based on the digit shift amount SFA.
The mantissa MA of the operand is shifted, and the rightward shifter 9 shifts the mantissa M of the second operand based on the digit shift amount SFB.
Shift B.

桁合せが施された2つの仮数部MAS,MBSは仮数部加算
回路7で加算され、加算結果仮数部MCとして出力され
る。
The two mantissa parts MAS and MBS that have been digit-aligned are added by a mantissa addition circuit 7 and output as an addition result mantissa MC.

前述したように、非正規化データを入力に持つ浮動小
数点演算器における正規化されていないオペランドの仮
数部に対しては、正規化シフトを行ない、さらに桁合せ
シフトを行なう、という2回のシフト処理を施さなけれ
ばならない。つまり、一つの仮数部に対して2つのシフ
タが必要となる。一般にシフタの回路はシフトされるべ
きデータのビット幅分の選択ゲートから構成されている
ためビット幅の非常に大きい仮数部などに対するシフタ
は選択ゲートが多数必要となる。したがって、シフタを
2段直列に必要とするということはハードウェア量およ
び演算時間の増大という問題が発生する。
As described above, the mantissa part of the non-normalized operand in the floating-point arithmetic unit having non-normalized data as an input is subjected to the normalization shift, and further, the digit shift is performed. Must be treated. That is, two shifters are required for one mantissa. In general, a shifter circuit is composed of select gates corresponding to the bit width of data to be shifted, so that a shifter for a mantissa part having a very large bit width requires many select gates. Therefore, the requirement of two stages of shifters in series causes a problem of an increase in the amount of hardware and an operation time.

前述の如く、非正規化浮動小数点データの仮数部に対
しては、正規化シフトと桁合せシフトが別々に行なわれ
ているが、この2つのシフト処理をまとめて1回の処理
で済ませれば、前述した問題点は解決される。そのため
には、正規化シフトと桁合せシフトを同様に考え合せ
て、1回のシフト処理で済むようなシフト量を生成する
ようにする必要がある。
As described above, the mantissa part of the denormalized floating-point data is subjected to the normalization shift and the alignment shift separately, but if these two shift processes are collectively performed by one process, The above-mentioned problem is solved. For this purpose, it is necessary to consider the normalization shift and the digit alignment shift in the same manner, and to generate a shift amount that requires only one shift process.

発明の目的 そこで、本発明はこの様な従来技術の問題点を考慮し
てなされたものであり、その目的とするところは、非正
規化データの仮数部のシフト処理を1回で済ませるよう
にして、ハードウェア量及び演算時間の削減を図ったシ
フト回路を提供することにある。
SUMMARY OF THE INVENTION Accordingly, the present invention has been made in view of such problems of the prior art, and an object of the present invention is to make it possible to shift the mantissa of non-normalized data only once. Another object of the present invention is to provide a shift circuit that reduces the amount of hardware and the operation time.

発明の構成 本発明によれば、正規化されている第1の浮動小数点
データと正規化されていない第2の浮動小数点データと
の演算を、前記第2の浮動小数点データを正規化した後
に行なうようにした浮動小数点演算器において、前記第
2の浮動小数点データの仮数部に対するシフトを行なう
シフト回路であって、前記第2の浮動小数点データの仮
数部に応じて正規化量を算出する手段と、前記第2の浮
動小数点データの指数部を前記正規化量に応じて正規化
する手段と、この正規化された指数部と前記第1の浮動
小数点データの指数部と、更には前記正規化量とに応じ
て前記第2の浮動小数点データの仮数部のシフト量を算
出する手段と、このシフト量に応じて当該仮数部をシフ
トする手段とを含み、このシフト後のデータを前記演算
器へ送出するようにしたことを特徴とするシフト回路が
得られる。
According to the present invention, an operation of normalized first floating-point data and non-normalized second floating-point data is performed after normalizing the second floating-point data. A floating-point arithmetic unit configured to shift a mantissa of the second floating-point data, wherein the shift circuit calculates a normalization amount according to the mantissa of the second floating-point data; Means for normalizing the exponent part of the second floating-point data in accordance with the normalization amount, the normalized exponent part, the exponent part of the first floating-point data, and the normalization Means for calculating a shift amount of the mantissa part of the second floating-point data in accordance with the amount, and means for shifting the mantissa part in accordance with the shift amount. Send to Thus, a shift circuit characterized by performing the above operation is obtained.

更に本発明によれば、正規化されている第1の浮動小
数点データと正規化されている第2の浮動小数点データ
との演算を、前記第2の浮動小数点データを正規化した
後に行なうようにした浮動小数点演算器において、前記
第2の浮動小数点データの仮数部に対するシフトを行な
うシフト回路であって、前記第2の浮動小数点データの
仮数部に応じて正規化量を算出する手段と、前記第2の
浮動小数点データの指数部を前記正規化量に応じて正規
化する手段と、前記第1及び第2の浮動小数点データの
各指数部と前記正規化量とに応じて前記第2の浮動小数
点データの仮数部のシフト量を算出する手段と、このシ
フト量に応じて当該仮数部をシフトする手段とを含み、
このシフト後のデータを前記演算器へ送出するようにし
たことを特徴とするシフト回路が得られる。
According to the present invention, the operation of the normalized first floating-point data and the normalized second floating-point data is performed after the second floating-point data is normalized. A floating-point arithmetic unit for shifting a mantissa part of the second floating-point data, wherein the shift circuit calculates a normalization amount according to a mantissa part of the second floating-point data; Means for normalizing the exponent part of the second floating-point data according to the normalization amount; and the second exponent part of the first and second floating-point data and the second exponent part according to the normalization amount. Means for calculating the shift amount of the mantissa of the floating-point data, and means for shifting the mantissa in accordance with the shift amount;
The shift circuit is characterized in that the shifted data is sent to the computing unit.

実施例 次に、本発明の実施例を図面を用いて説明する。第1
図は本発明の実施例の回路図であり、実施例は従来例と
同様、2つのオペランドを入力とする浮動小数点加算器
について適用した例であり、第1オペランドは符号部S
A、指数部EA,仮数部MAより構成されている正規化浮動小
数点データ、第2オペランドは符号部SB0,指数部EB0,仮
数部MB0,仮数部桁あふれ用保護部GB0より構成されてい
る非正規化浮動小数点データとする。
Embodiment Next, an embodiment of the present invention will be described with reference to the drawings. First
FIG. 3 is a circuit diagram of an embodiment of the present invention. The embodiment is an example applied to a floating-point adder that receives two operands as in the conventional example.
A, normalized floating-point data composed of an exponent part EA and a mantissa part MA. Use normalized floating point data.

第3図と同等部分は同一符号により示しており、非正
規化データに対する正規化量算出、非正規化データ指数
部を正規化する処理比較情報生成、加算結果指数部、加
算結果仮数部の算出、および正規化データである第1オ
ペランドの仮数部が桁合せされる処理は第3図の従来例
と全く同じである。
The same parts as those in FIG. 3 are denoted by the same reference numerals, and calculation of the normalized amount for the denormalized data, generation of processing comparison information for normalizing the denormalized data exponent part, calculation of the addition result exponent part, and the addition result mantissa part , And the process of digit-aligning the mantissa of the first operand, which is the normalized data, is exactly the same as in the conventional example of FIG.

非正規化データである第2オペランドの仮数部が正規
化および桁合せされるまでを以下詳細に述べる。
The process until the mantissa of the second operand, which is the denormalized data, is normalized and aligned will be described in detail below.

正規化のためのシフト量は正規化量算出回路1より、
求められている。
The shift amount for normalization is obtained from the normalization amount calculation circuit 1.
It has been demanded.

正規化シフト量=NSB0 また、桁合せのためのシフト量は指数部減算回路33より
求められている。
Normalized shift amount = NSB0 The shift amount for digit alignment is obtained by the exponent part subtraction circuit 33.

桁合せシフト量=SBAB=EA−EB (≧0のとき有効) これらのシフト量は従来例と同様、左シフトなら負数、
右シフトなら正数で表現される。
Digit shift = SBAB = EA-EB (Effective when ≥ 0) These shifts are negative numbers for left shift,
A right shift is represented by a positive number.

ところで指数部同士を大小比較したときに、自分自身
の方が大きいかあるいは等しいのならば、自分自身の指
数部を基準とするので、仮数部を桁合せシフトする必要
がなく、正規化シフトのみ考えればよい。逆に、他のオ
ペランドの指数部が基準となる場合は、正規化シフトと
桁合せシフトの両方が必要となり、正規化シフト量と桁
合せシフト量を加算するシフト量加算回路36の結果ADS
が有効となる。
By the way, when the exponents are compared in magnitude, if their own is larger or equal, since the exponent of their own is used as a reference, there is no need to shift the significand, and only the normalized shift. Just think. Conversely, when the exponent part of the other operand is used as a reference, both the normalized shift and the alignment shift are required, and the result ADS of the shift amount adding circuit 36 for adding the normalized shift amount and the alignment shift amount is used.
Becomes effective.

以上を整理すると、比較情報CI(S0,T0)に基づい
て、選択回路35はT0=0のとき(EA≦EBのとき)、正規
化シフト量NSB0を、S0=0のとき(EA≧EBのとき)、シ
フト量加算回路36の結果ADSを選択して、第2オペラン
ド仮数部に対するシフト量SFB0となる。
Summarizing the above, based on the comparison information CI (S0, T0), the selection circuit 35 sets the normalized shift amount NSB0 when T0 = 0 (when EA ≦ EB) and sets the normalized shift amount NSB0 when S0 = 0 (EA ≧ EB ), The result ADS of the shift amount adding circuit 36 is selected, and becomes the shift amount SFB0 for the mantissa part of the second operand.

T0=S0=0のとき(EA=EBのとき)は、正規化シフト
量NSB0と加算結果ADSとが同時に選ばれるが、これ等は ADS=NSB0+(EA−EB)=NSB0 と表わされて互いに同値なので、何ら問題はない。
When T0 = S0 = 0 (when EA = EB), the normalized shift amount NSB0 and the addition result ADS are simultaneously selected. These are expressed as ADS = NSB0 + (EA−EB) = NSB0. There is no problem because they are equivalent.

このシフト量SFB0に基づいて、仮数部MB0および仮数
部桁あふれ用保護部GB0は双方向シフタ6によって正規
化および桁合せが同時に処理される。
Based on the shift amount SFB0, the mantissa part MB0 and the mantissa part overflow protector GB0 are simultaneously subjected to normalization and digit matching by the bidirectional shifter 6.

第2図は本発明の他の実施例の回路図であり、第1図
と同等部分は同一符号により示している。この実施例も
第1図の実施例と同様、2つのオペランドを入力とする
浮動小数点加算器について適用したものであり、第1オ
ペランドは符号部SA、指数部EA、仮数部MAより構成され
る正規化浮動小数点データ、第2オペランドは符号部SB
0,指数部EB0、仮数部MB0、仮数部桁あふれ用保護部GB0
より構成される非正規化浮動小数点データとする。
FIG. 2 is a circuit diagram of another embodiment of the present invention, and the same parts as those in FIG. 1 are denoted by the same reference numerals. This embodiment is also applied to a floating-point adder having two operands as in the embodiment of FIG. 1. The first operand is composed of a sign SA, an exponent EA, and a mantissa MA. Normalized floating-point data, second operand is sign part SB
0, exponent part EB0, mantissa part MB0, mantissa part overflow protection part GB0
And denormalized floating-point data.

非正規化データに対する正規化量算出、非正規化デー
タ指数部を正規化する処理比較情報生成、加算結果指数
部、加算結果仮数部の算出、および正規化データである
第1オペランドの仮数部が桁合せされる処理は従来例と
全く同じである。
Calculation of the normalized amount for the denormalized data, generation of processing comparison information for normalizing the denormalized data exponent part, calculation of the addition result exponent part, calculation of the addition result mantissa part, and mantissa part of the first operand which is the normalized data The digit alignment process is exactly the same as in the conventional example.

非正規化データである第2オペランドの仮数部が正規
化および桁合せされるまでを以下詳細に述べる。正規化
のためのシフト量は正規化量算出回路1より求められて
いる。
The process until the mantissa of the second operand, which is the denormalized data, is normalized and aligned will be described in detail below. The shift amount for normalization is obtained by the normalization amount calculation circuit 1.

正規化シフト量=NSB0 また、桁合せのためのシフト量は正規化されている指数
部同士の差分で、第2オペランドに対しては 桁合せシフト量=SBAB=EA−EB (≧0)である。
Normalized shift amount = NSB0 The shift amount for digit alignment is the difference between the normalized exponent parts. For the second operand, the digit shift amount = SBAB = EA-EB (≥ 0) is there.

ところで、指数部EBは正規化された後の値で元々は非
正規化指数部と正規化シフト量の和である。
Incidentally, the exponent part EB is a value after normalization, and is originally the sum of the non-normalized exponent part and the normalized shift amount.

EB=EB0+NSB0 これらのシフト量は従来例と同様、左シフトなら負数、
右シフトなら整数で表現される。
EB = EB0 + NSB0 These shift amounts are the same as in the conventional example.
A right shift is represented by an integer.

ところで、指数部同士を大小比較したときに自分自身
の方が大きいかあるいは等しいのならば、自分自身の指
数部を基準とするので、仮数部を桁合せシフトする必要
がなく、正規化シフトのみ考えればよい。逆に、他のオ
ペランドの指数部が基準となる場合は、正規化シフトと
桁合せシフトの両方が必要となる。この場合正規化シフ
ト量と桁合せシフト量を加算すればよい。つまり、 NSB0+SBAB=NSB0+EA−EB となる。さらに、 EB=EB0+NSB0 なので、 NSB0+SBAB=NSB0+EA− (EB0+NSB0)=EA−EB0 (=SBAB0) となり、これが正規化と桁合せとを同時に考えたときの
シフト量となる。
By the way, if the exponents are larger or equal when comparing the exponents, since the exponent of the own is used as a reference, there is no need to shift the mantissa by a digit. Just think. Conversely, if the exponent of the other operand is the reference, both a normalized shift and an alignment shift are required. In this case, the normalized shift amount and the digit shift amount may be added. That is, NSB0 + SBAB = NSB0 + EA-EB. Further, since EB = EB0 + NSB0, NSB0 + SBAB = NSB0 + EA- (EB0 + NSB0) = EA-EB0 (= SBAB0), which is the shift amount when normalization and digit matching are considered simultaneously.

第1オペランドの正規化データ指数部EAから第2オペ
ランドの非正規化データ指数部EBを減じる指数部減算回
路33の出力SBAB0がこれである。
This is the output SBAB0 of the exponent part subtraction circuit 33 for subtracting the denormalized data exponent part EB of the second operand from the normalized data exponent part EA of the first operand.

以上を整理すると、比較情報CI(S0,T0)に基づい
て、選択回路35はT0=0のときEA≦EBのとき)、正規化
シフト量NSB0を、S0=0のとき(EA≧EBのとき)、指数
部減算回路33の結果SBAB0を選択して、第2オペランド
仮数部に対するシフト量SFB0とする。
Summarizing the above, based on the comparison information CI (S0, T0), the selection circuit 35 sets the normalized shift amount NSB0 when T0 = 0 and EA ≦ EB, and when S0 = 0 (EA ≧ EB At this time, the result SBAB0 of the exponent part subtraction circuit 33 is selected and set as the shift amount SFB0 for the second operand mantissa.

T0=S0=0のとき(EA=EBのとき)は正規化シフト量NS
B0と減算結果SBAB0が同時に選ばれるが、これ等は SBAB0=EA−EB0=EB−EB0 =(EB0+NSB0)−EB0 =NSB0 と表わされて互いに同値なので、何ら問題はない。
When T0 = S0 = 0 (when EA = EB), the normalized shift amount NS
Although B0 and the subtraction result SBAB0 are selected at the same time, they are expressed as SBAB0 = EA-EB0 = EB-EB0 = (EB0 + NSB0) -EB0 = NSB0, so that there is no problem.

このシフト量SFB0に基づいて仮数部MB0および仮数部
桁あふれ用保護部GB0は双方向シフタ6によって正規化
および桁合せが同時に処理される。
Based on the shift amount SFB0, the mantissa part MB0 and the mantissa part overflow protector GB0 are simultaneously subjected to normalization and digit matching by the bidirectional shifter 6.

発明の効果 以上説明したように、本発明によれば、非正規化浮動
小数点データの仮数部に対して施さなければならない正
規化シフトと桁合せシフトとを1回のシフト処理で済ま
せるために、2つのシフトをまとめて行なえるようなシ
フト量を算出するシフト量算出手段を有することで、仮
数部に対するシフタが1つで済むようになり、演算時間
の遅延、ハードウェア量が小さくなるという効果があ
る。
Effects of the Invention As described above, according to the present invention, the normalization shift and the alignment shift that must be performed on the mantissa part of the denormalized floating-point data can be performed by one shift process. Providing a shift amount calculating means for calculating a shift amount capable of performing two shifts at a time requires only one shifter for the mantissa, thereby reducing the operation time and reducing the amount of hardware. There is.

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

第1図及び第2図は本発明の実施例を夫々示す回路図、
第3図は従来技術を示す浮動小数点演算器の回路図であ
る。 主要部分の符号の説明 1……正規化量算出回路 2……指数部正規化回路 3……シフト量算出部 6……双方向シフタ 33……指数部演算回路 35……セレクタ 36……シフト量加算回路
1 and 2 are circuit diagrams showing an embodiment of the present invention, respectively.
FIG. 3 is a circuit diagram of a floating point arithmetic unit showing the prior art. Description of Signs of Main Parts 1 Normalization amount calculation circuit 2 Exponent part normalization circuit 3 Shift amount calculation unit 6 Bidirectional shifter 33 Exponent part operation circuit 35 Selector 36 Shift Quantity addition circuit

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】正規化されている第1の浮動小数点データ
と正規化されていない第2の浮動小数点データとの演算
を、前記第2の浮動小数点データを正規化した後に行な
うようにした浮動小数点演算器において、前記第2の浮
動小数点データの仮数部に対するシフトを行なうシフト
回路であって、前記第2の浮動小数点データの仮数部に
応じて正規化量を算出する手段と、前記第2の浮動小数
点データの指数部を前記正規化量に応じて正規化する手
段と、この正規化された指数部と前記第1の浮動小数点
データの指数部と、更には前記正規化量とに応じて前記
第2の浮動小数点データの仮数部のシフト量を算出する
手段と、このシフト量に応じて当該仮数部をシフトする
手段とを含み、このシフト後のデータを前記演算器へ送
出するようにしたことを特徴とするシフト回路。
1. A floating-point apparatus which performs an operation on normalized first floating-point data and non-normalized second floating-point data after normalizing the second floating-point data. In the decimal point arithmetic unit, a shift circuit for shifting a mantissa part of the second floating-point data, comprising: means for calculating a normalized amount according to a mantissa part of the second floating-point data; Means for normalizing the exponent part of the floating-point data according to the normalization amount, the normalized exponent part, the exponent part of the first floating-point data, and the normalization amount. Means for calculating the shift amount of the mantissa part of the second floating-point data, and means for shifting the mantissa part according to the shift amount, so that the shifted data is sent to the arithmetic unit. Made Shift circuit, wherein the door.
【請求項2】正規化されている第1の浮動小数点データ
と正規化されていない第2の浮動小数点データとの演算
を、前記第2の浮動小数点データを正規化した後に行な
うようにした浮動小数点演算器において、前記第2の浮
動小数点データの仮数部に対するシフトを行なうシフト
回路であって、前記第2の浮動小数点データの仮数部に
応じて正規化量を算出する手段と、前記第2の浮動小数
点データの指数部を前記正規化量に応じて正規化する手
段と、前記第1及び第2の浮動小数点データの各指数部
と前記正規化量とに応じて前記第2の浮動小数点データ
の仮数部のシフト量を算出する手段と、このシフト量に
応じて当該仮数部をシフトする手段とを含み、このシフ
ト後のデータを前記演算器へ送出するようにしたことを
特徴とするシフト回路。
2. The floating-point apparatus according to claim 1, wherein the operation of the normalized first floating-point data and the non-normalized second floating-point data is performed after normalizing the second floating-point data. In the decimal point arithmetic unit, a shift circuit for shifting a mantissa part of the second floating-point data, comprising: means for calculating a normalized amount according to a mantissa part of the second floating-point data; Means for normalizing the exponent part of the floating-point data according to the normalization amount, and the second floating-point part according to each exponent part of the first and second floating-point data and the normalization amount. Means for calculating a shift amount of the mantissa of the data, and means for shifting the mantissa in accordance with the shift amount, wherein the shifted data is sent to the arithmetic unit. shift Road.
JP2127545A 1990-05-17 1990-05-17 Shift circuit Expired - Lifetime JP2622012B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2127545A JP2622012B2 (en) 1990-05-17 1990-05-17 Shift circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2127545A JP2622012B2 (en) 1990-05-17 1990-05-17 Shift circuit

Publications (2)

Publication Number Publication Date
JPH0423033A JPH0423033A (en) 1992-01-27
JP2622012B2 true JP2622012B2 (en) 1997-06-18

Family

ID=14962659

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2127545A Expired - Lifetime JP2622012B2 (en) 1990-05-17 1990-05-17 Shift circuit

Country Status (1)

Country Link
JP (1) JP2622012B2 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01282633A (en) * 1988-05-10 1989-11-14 Fujitsu Ltd Non-normalized number processing system
JPH0212128A (en) * 1988-06-29 1990-01-17 Fuji Photo Film Co Ltd Formation of liquid crystal cell

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01282633A (en) * 1988-05-10 1989-11-14 Fujitsu Ltd Non-normalized number processing system
JPH0212128A (en) * 1988-06-29 1990-01-17 Fuji Photo Film Co Ltd Formation of liquid crystal cell

Also Published As

Publication number Publication date
JPH0423033A (en) 1992-01-27

Similar Documents

Publication Publication Date Title
EP0483864B1 (en) Hardware arrangement for floating-point addition and subtraction
US4999803A (en) Floating point arithmetic system and method
US8185570B2 (en) Three-term input floating-point adder-subtractor
WO1985004272A1 (en) Floating point arithmetic system and method with anticipation rounding
US6549926B1 (en) SRT divider having several bits of each partial remainder one-hot encoded to minimize the logic levels needed to estimate quotient bits
WO1989009441A1 (en) Apparatus and method for floating point normalization prediction
US5375078A (en) Arithmetic unit for performing XY+B operation
JPS6360417B2 (en)
US6175851B1 (en) Fast adder/subtractor for signed floating point numbers
JPWO2007096982A1 (en) Arithmetic processing apparatus and arithmetic processing method
US4639887A (en) Bifurcated method and apparatus for floating point addition with decreased latency time
US5623435A (en) Arithmetic unit capable of performing concurrent operations for high speed operation
US5260889A (en) Computation of sticky-bit in parallel with partial products in a floating point multiplier unit
US20070038693A1 (en) Method and Processor for Performing a Floating-Point Instruction Within a Processor
US6061707A (en) Method and apparatus for generating an end-around carry in a floating-point pipeline within a computer system
JP2511527B2 (en) Floating point arithmetic unit
US6571264B1 (en) Floating-point arithmetic device
JP2622012B2 (en) Shift circuit
EP0332215B1 (en) Operation circuit based on floating-point representation
US11429349B1 (en) Floating point multiply-add, accumulate unit with carry-save accumulator
JP3100868B2 (en) Arithmetic unit for floating point numbers
JP3124286B2 (en) Floating point arithmetic unit
JPH04213110A (en) Method and apparatus for floating-point arithmetic operation
GB2296803A (en) Apparatus for arithmetically operating floating-points
JPH0498524A (en) Floating point arithmetic unit