JP2980341B2 - Floating point alignment circuit - Google Patents

Floating point alignment circuit

Info

Publication number
JP2980341B2
JP2980341B2 JP2115898A JP11589890A JP2980341B2 JP 2980341 B2 JP2980341 B2 JP 2980341B2 JP 2115898 A JP2115898 A JP 2115898A JP 11589890 A JP11589890 A JP 11589890A JP 2980341 B2 JP2980341 B2 JP 2980341B2
Authority
JP
Japan
Prior art keywords
bit
mantissa
difference
outputs
circuit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2115898A
Other languages
Japanese (ja)
Other versions
JPH0414131A (en
Inventor
親宏 堀
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP2115898A priority Critical patent/JP2980341B2/en
Publication of JPH0414131A publication Critical patent/JPH0414131A/en
Application granted granted Critical
Publication of JP2980341B2 publication Critical patent/JP2980341B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】 [発明の目的] (産業上の利用分野) 本発明は、浮動小数点桁合わせ回路に関するものであ
る。
DETAILED DESCRIPTION OF THE INVENTION [Purpose of the Invention] (Industrial application field) The present invention relates to a floating-point digit alignment circuit.

(従来の技術) 近年、浮動小数点桁合わせ回路を搭載したLSIの開発
が盛んに行なわれている。浮動小数点表示では、一般に
正負を表す符号と仮数部と指数部によって以下の様に数
が表現される。
(Prior Art) In recent years, LSIs equipped with a floating-point digit alignment circuit have been actively developed. In floating-point notation, numbers are generally represented as follows by a sign indicating positive / negative, a mantissa part, and an exponent part.

(−1)符号×(仮数部)×2(指数部−定数) ここで、仮数部の最上位を1になる様に取り、この1
を省略する方法が取られることがある。これは「けち表
現」と呼ばれ、IEEEの32ビット浮動小数点表記の場合、
符号1ビット、仮数部23ビット、指数部8ビットとし
て、次の様な表現となる。
(-1) sign × (mantissa part) × 2 (exponent part−constant) Here, the most significant part of the mantissa part is taken as 1 and this 1
May be omitted. This is called "Keechi expression", and in the case of IEEE 32-bit floating point notation,
The following expression is used for the sign 1 bit, the mantissa part 23 bits, and the exponent part 8 bits.

(−1)符号×(1.仮数部)×2
(指数部−127) (1) ただし、これまでは0及び0に近い数が表現されない
ので、指数部が0の時はけち表現をやめ次の様に値を表
現する。
(-1) sign x (1. mantissa) x 2
(Exponent part-127) (1) However, since 0 and a number close to 0 have not been expressed so far, when the exponent part is 0, the stutter expression is stopped and the value is expressed as follows.

(−1)符号×(仮数部)×2-126 (2) この様に、けち表現と通常の表現が同時に用いられる
ため、これらの間の計算には注意が必要である。
(-1) sign × (mantissa) × 2 −126 (2) As described above, since the stippled expression and the ordinary expression are used at the same time, attention must be paid to the calculation between them.

第16図に従来の浮動小数点演算器の桁合わせ回路を示
す。これは、2つの浮動小数点表示の数AとBを取り扱
うにあたって、指数部AE,BE同士の差を取り小さい方の
仮数AM又はBMをその分シフトさせ、仮数同士での演算を
可能にするものである。この回路では指数部の差AE−B
E、BE−AEを減算器1,3で求め、シフター5,7で仮数BM,AM
をその差の分だけ夫々シフトさせる。そして、セレクタ
9はAE,BEの小さい方を出力し、セレクタ11,13はAM,BE
の一方のシフトされた値ともう片方のシフトされない値
を出力する。
FIG. 16 shows a digit aligning circuit of a conventional floating point arithmetic unit. This means that when handling two floating-point numbers A and B, the difference between the exponent parts AE and BE is taken and the smaller mantissa AM or BM is shifted by that amount to enable arithmetic between mantissas. It is. In this circuit, the exponent difference AE-B
E and BE-AE are obtained by subtracters 1 and 3, and mantissas BM and AM are obtained by shifters 5 and 7.
Are shifted by the difference. Then, the selector 9 outputs the smaller one of AE and BE, and the selectors 11 and 13 output AM and BE.
Outputs one shifted value and the other unshifted value of.

もし、入力数が通常の表現になっていれば、この装置
は極めて高速に動作することが出来る。つまり、減算器
は普通下位のほうから結果が決まるので、シフターは減
算の最終結果を待たずにシフト動作を行なうことが出来
るのである。すなわち、減算シフトが並行して行なわれ
るのである。
If the number of inputs is in the usual representation, the device can operate very quickly. That is, since the result of the subtractor is usually determined from the lower order, the shifter can perform the shift operation without waiting for the final result of the subtraction. That is, the subtraction shift is performed in parallel.

(発明が解決しようとする課題) しかし、前記の様に入力数が二つの表現が混在してい
る場合には、けち表現であるか否かの判定がなされるま
では、すなわち、上位ビット位置に1を付加するか否か
が決定されるまでは、シフト動作を始めることが出来
ず、この判定を行なう回路の動作がボトルネックとなっ
ていた。
(Problems to be Solved by the Invention) However, in the case where two expressions are mixed as described above, until the determination as to whether the expression is a stingy expression is made, The shift operation cannot be started until it is determined whether or not to add 1 to the operation, and the operation of the circuit for making this determination has been a bottleneck.

[発明の構成] (課題を解決するための手段) 前記問題点を解決するために、本発明に従う浮動小数
点桁合わせ回路は、浮動小数点表示された第一及び第二
の数の仮数部の桁合せを行う回路であって、 前記第一の数の指数部から前記第二の数の指数部を引
いた第一の差と、前記第二の数の指数部から前記第一の
数の指数部を引いた第二の差とを出力する減算器と、 前記第二の差の分だけ前記第一の数の仮数部のシフト
を行う第一のシフト手段と、 前記第一の差の分だけ前記第二の数の仮数部のシフト
を行う第二のシフト手段と、 前記第一及び第二の数がけち表現されているか否かを
検出する表現検出手段と、 前記表現検出手段で前記第一の数がけち表現されてい
ることが検出された場合、前記第二の差の分の少なくと
も一部についてシフトされた後に前記第一の数の仮数部
の最上位のビットが取るビット位置よりも1ビット上位
の位置に1を付与する手段と、 前記表現検出手段で前記第二の数がけち表現されてい
ることが検出された場合、前記第一の差の分の少なくと
も一部についてシフトされた後に前記第二の数の仮数部
の最上位のビットが取るビット位置よりも1ビット上位
の位置に1を付与する手段と、 前記第一の数の仮数部とそのシフトされたビット列又
はシフトされかつ前記1が付与されたビット列を入力
し、前記第一の数の指数部よりも前記第二の数の指数部
の方が大きい場合に前者を出力し、小さい場合に後者を
出力する第一のセレクタと、 前記第二の数の仮数部とそのシフトされたビット列又
はシフトされかつ前記1が付与されたビット列を入力
し、前記第二の数の指数部よりも前記第一の数の指数部
の方が大きい場合に前者を出力し、小さい場合に後者を
出力する第二のセレクタと、 前記第一及び第二の指数部を入力し、いずれか大きい
方を出力する第三のセレクタとを具備していることを特
徴としている。
[Structure of the Invention] (Means for Solving the Problems) In order to solve the above-mentioned problems, a floating-point digit matching circuit according to the present invention comprises a floating-point digit of a mantissa part of first and second numbers. A circuit for performing matching, wherein a first difference obtained by subtracting the exponent part of the second number from the exponent part of the first number, and an exponent of the first number from the exponent part of the second number A subtractor that outputs a second difference obtained by subtracting a part, a first shift unit that shifts the mantissa part of the first number by the amount of the second difference, and an amount of the first difference Second shift means for shifting only the mantissa of the second number, expression detection means for detecting whether the first and second numbers are staggered, and the expression detection means If it is detected that the first number is staggered, at least a part of the second difference is shifted. Means for adding 1 to a position one bit higher than the bit position taken by the most significant bit of the mantissa part of the first number after being converted, and the second number is staggered by the expression detecting means. Is detected, after being shifted for at least a part of the first difference, the bit is shifted to a position one bit higher than the bit position taken by the most significant bit of the mantissa of the second number. Means for assigning 1; inputting the mantissa part of the first number and the shifted bit string or the shifted bit string to which the 1 is assigned; and inputting the second number more than the exponent part of the first number. A first selector that outputs the former when the exponent part of the number is larger, and outputs the latter when it is smaller, a mantissa part of the second number and the shifted bit string or the shifted bit string and the 1 And input the bit sequence A second selector that outputs the former when the exponent part of the first number is larger than the exponent part of the number, and outputs the latter when it is smaller, and inputs the first and second exponent parts. And a third selector that outputs the larger one.

(作用) 上記構成の桁合わせ回路によれば、桁合わせをすべき
仮数部がけち表現を用いているか否かに拘わらず、シフ
ト動作を開始してしまう。そして、もし、けち表現を用
いていることが判明した場合には、シフト動作のあとで
仮数部の最上位に1を付与する。
(Operation) According to the digit matching circuit having the above configuration, the shift operation is started regardless of whether the mantissa part to be digit-aligned uses the truncation expression. Then, if it is found that the clinch expression is used, 1 is added to the most significant part of the mantissa after the shift operation.

これにより、けち表現を行なっているか否かを検出を
待たずに、シフト動作を開始することが可能となった。
As a result, the shift operation can be started without waiting for the detection of whether or not the fringe expression is being performed.

(実施例) 第1図に本発明の第一の実施例を示す。この浮動小数
点演算器の桁合わせ回路は、2つの浮動小数点表示の数
A(指数部AE、仮数部AM)とB(指数部BE、仮数部BM)
を取り扱うにあたって、指数部AE,BE同士の差を取り小
さい方の仮数AM又はBMをその分シフトさせ、仮数同士の
演算を可能にするものである。尚、実施例では仮数部23
ビット、指数部8ビットとする。指数AE.BEは夫々第一
の減算器15及び第二の減算器17に入力され、ここでAM−
BMとBM−AMが計算される。BE−AEはAMを入力する第一の
シフタ19に入力され、又AE−BEはBMを入力する第二のシ
フタ21に入力され、ここでA,Bがけち表現であるか否か
に拘わらず0拡張のシフトが行なわれる。けち表現が行
なわれている場合は仮数部の上位に1を加える必要があ
るが、これは次の様に行なわれる。即ち、第2図の右側
に示した様に、仮数部A(a1,a2,a3…)の上位に0を付
け加え、nビットシフト動作(図で3ビット)を行な
い、それと並行してn+1ビット目のみが1であるビッ
ト列(以下加算数という)を生成して、これをシフト結
果に加えるのである。
(Embodiment) FIG. 1 shows a first embodiment of the present invention. The digit alignment circuit of this floating point arithmetic unit has two floating point numbers A (exponent part AE and mantissa part AM) and B (exponent part BE and mantissa part BM).
Is handled, the difference between the exponent parts AE, BE is taken and the smaller mantissa AM or BM is shifted by that amount, thereby enabling the mantissa operation. In the embodiment, the mantissa part 23
Bit, exponent part 8 bits. The exponent AE.BE is input to a first subtractor 15 and a second subtractor 17, respectively, where AM-
BM and BM-AM are calculated. BE-AE is input to a first shifter 19 for inputting AM, and AE-BE is input to a second shifter 21 for inputting BM, regardless of whether A and B are staggered expressions. First, a shift of 0 extension is performed. In the case where the sting expression is performed, it is necessary to add 1 to the upper part of the mantissa, which is performed as follows. That is, as shown on the right side of FIG. 2 , 0 is added to the upper part of the mantissa part A (a 1 , a 2 , a 3 ...), And an n-bit shift operation (3 bits in the figure) is performed. Then, a bit string in which only the (n + 1) th bit is 1 (hereinafter referred to as an addition number) is generated and added to the shift result.

これを、従来の場合について説明すれば、第2図の左
側の様に行なっていた。つまり、Aがけち表現であるか
否かの判定を待って、もしけち表現であれば1を加えた
上で、又はもしけち表現を行なっていなければそのまま
で、シフト動作を行なうのである。すなわち、シフト動
作の開始が遅れることになる。
This is performed as shown on the left side of FIG. 2 in the conventional case. In other words, after determining whether or not A is a stingy expression, the shift operation is performed after adding 1 if it is a stingy expression or as it is if the stuttering expression is not performed. That is, the start of the shift operation is delayed.

第1図の実施例では、指数部がゼロであるかどうかに
よってけち表現であるか否かを検出するけち表現検出回
路23,24と減算器15,17とに夫々接続して前記加算数を生
成するデコーダ25,27が設けられている。このデコーダ2
5からの出力は、ビットOR29,31で、シフト結果と加算さ
れ、セレクタ33,35へ送られる。セレクタ33は、AE−BE
<0の場合にはシフトされたビット列を仮数部として出
力し、AE−BE>0の場合にはシフトされる前の元の仮数
をそのまま出力する。又、セレクタ33は、AE−BE>0の
場合にはシフトされたビット列を仮数部として出力し、
AE−BE<0の場合にはシフトされる前の元の仮数をその
まま出力する。セレクタ37は二つの指数を入力し、大き
い方を出力する。つまり、図では省略したが、減算器15
の出力の符号を表す信号が、各セレクタへ供給され、こ
れに基づいて出力の選択がなされる。
In the embodiment shown in FIG. 1, the exponent part is connected to a vignetting expression detecting circuits 23 and 24 and subtracters 15 and 17 for detecting whether or not the vibrating expression is present depending on whether or not the exponent is zero. Decoders 25 and 27 for generating are provided. This decoder 2
The output from 5 is added to the shift result at bits OR 29 and 31 and sent to selectors 33 and 35. Selector 33 is AE-BE
If <0, the shifted bit string is output as a mantissa, and if AE-BE> 0, the original mantissa before shifting is output as it is. When AE-BE> 0, the selector 33 outputs the shifted bit string as a mantissa,
If AE-BE <0, the original mantissa before shifting is output as it is. The selector 37 inputs two exponents and outputs the larger one. That is, although omitted in the figure, the subtractor 15
Is supplied to each selector, and an output is selected based on the signal.

デコーダ25,27の回路図を第3図に示す。減算器15ま
たは17からの出力の下位5ビットの信号がS0〜S4の端子
へ入力する。S0〜S4の各端子にはNORゲートが接続され
反転信号と共に全部で10本の信号線が形成されている。
又、加算数A23〜A0の出力を持つ24個のNORゲートが設け
られ、ここへS0〜S4信号又はその反転信号のいずれかの
出力線がビット毎に接続されている。この接続は、入力
信号S0〜S4で表わされる数に対応してA23〜A0の一つの
端子のみが1となり、他の端子は0を出力する様になっ
ている。一方けち表現検出回路23または25からは、けち
表現が為されているときは0が、為されていないときは
1が夫々端子Cへ出力される。この端子Cは全てのNOR
ゲートに接続されており、S0〜S4の値のいかんに拘わら
ず、Cが1の時はA23〜A0の全てが0になる。従って、
けち表現がなされている時のみ、加算数A23〜A0、即ち
シフト後に省略された上位の1ビットに1を付与する加
算数信号が得られる。
FIG. 3 shows a circuit diagram of the decoders 25 and 27. The signal of the lower 5 bits of the output from the subtractor 15 or 17 is input to the terminals S0 to S4. A NOR gate is connected to each of the terminals S0 to S4, and a total of ten signal lines are formed together with the inverted signal.
Further, any of the output lines of 24 NOR gates are provided, S0 to S4 signal or an inverted signal here with an output of the addition number A 23 to A 0 is connected to each bit. This connection is only one terminal becomes 1 of A 23 to A 0 corresponding to the number represented by the input signal S0 to S4, the other terminal has become as to output a zero. On the other hand, from the edge expression detection circuit 23 or 25, 0 is output to the terminal C when the edge expression is made, and 1 is output when the edge expression is not made. This terminal C is connected to all NOR
Is connected to the gate, regardless of the value of S0 to S4, C is all 0 for A 23 to A 0 when the 1. Therefore,
Only when the fringe expression is made, the addition numbers A 23 to A 0 , that is, the addition number signals for adding 1 to the upper one bit omitted after the shift are obtained.

ビットOR回路29の回路図を第4図に示す。これは24個
のOR回路からなり、シフター19又は21からの出力I23〜I
0と加算数A23〜A0との、ビット毎の論理積が取られ、け
ち表現がなされている場合又はけち表現がなされていな
い場合のシフト後の加算数信号O23〜O0が出力される。
FIG. 4 shows a circuit diagram of the bit OR circuit 29. It consists of 24 OR circuits and outputs I 23 to I 23 from shifters 19 or 21.
0 and the addition number A 23 to A 0, the logical product for each bit is taken, addition number after the shift when or if the stingy representation stingy representation has been made is not made signals O 23 ~ O 0 output Is done.

第5図に第2実施例を示す。この図では、デコーダ3
9,41はけち表現検出回路23,24からの出力は受けず、代
わりにビットOR回路43,45がけち表現検出回路23と接続
されている。デコーダ39,41の回路図は、第6図に示さ
れている。これは第3図の回路とは信号線Cが用いられ
ていない点とNORゲートの代わりにANDゲートが用いられ
ている点を除いて同じ構成になっている。つまり、けち
表現であるか否かに拘わらず加算数が出力される。も
し、けち表現でなければ、ビットOR回路43,45で必要な
処理が試されるのである。ビットOR回路39では、第7図
に示されている様に、けち表現であるか否かを示す信号
Cの否定信号と加算数A23〜A0との論理和が夫々のビッ
ト毎に形成され、これとシフト後の信号I23〜I0との論
理積がビット毎に形成され正しい仮数信号O23〜O0とし
て出力される。
FIG. 5 shows a second embodiment. In this figure, decoder 3
9 and 41 do not receive the output from the fringe expression detecting circuits 23 and 24, and instead, bit OR circuits 43 and 45 are connected to the fringe expression detecting circuit 23. The circuit diagram of the decoders 39, 41 is shown in FIG. This has the same configuration as the circuit of FIG. 3 except that the signal line C is not used and that an AND gate is used instead of the NOR gate. That is, the number of additions is output regardless of whether the expression is a truncated expression. If not, the necessary processing is tried in the bit OR circuits 43 and 45. The bit OR circuit 39, as shown in Figure 7, forming the logical sum of the negation signal of the signal C indicating whether the stingy expressed as the addition number A 23 to A 0 is for each bit of each It is the logical product of the signal I 23 ~I 0 after which the shift is output as the correct mantissa signal O 23 ~ O 0 is formed for each bit.

第8図に第3実施例を示す。この実施例では、第1図
に示した実施例の2つのシフターの上位部分を共通にし
ている。一般にシフターというのは、シフタ量を表す2
進法数の各ビット毎にシフターが設けられこれらを直列
に接続した構成になっている。例えば、5ビットのシフ
ト量を扱う場合、1ビットシフター、2ビットシフタ
ー、4ビットシフター、8ビットシフター及び16ビット
シフターが直列に接続されており、各シフターにシフト
量の対応するビット信号が与えられる。この場合、シフ
ト量が多い程配線が複雑になり、実質的なハードウェア
が増大する。従って、第8図の様な構成は、上位のシフ
ターを共通にしている為、ハードウエアコストという点
で大変有利となる。
FIG. 8 shows a third embodiment. In this embodiment, the upper parts of the two shifters of the embodiment shown in FIG. 1 are shared. In general, a shifter is 2 that indicates the amount of a shifter.
A shifter is provided for each bit of the base number and these are connected in series. For example, when a shift amount of 5 bits is handled, a 1-bit shifter, a 2-bit shifter, a 4-bit shifter, an 8-bit shifter and a 16-bit shifter are connected in series, and a bit signal corresponding to the shift amount is given to each shifter. Can be In this case, the larger the shift amount is, the more complicated the wiring is, and the actual hardware is increased. Therefore, the configuration as shown in FIG. 8 is very advantageous in terms of hardware cost because the upper shifter is shared.

この例では、1ビットシフターと2ビットシフターか
らなる下位シフター47,49を減算器15,17の下位(1ビッ
ト目と2ビット目)の出力線に夫々接続し、減算とシフ
トを並列に行う。この下位シフターのいずれか一方の出
力をセレクタ51を介して上位シフター53に転送する。こ
の上位シフター53は4ビットシフター、8ビットシフタ
ー及び16ビットシフターからなり、セレクタ55を介して
減算器15,17のいずれかの上位(4ビット、8ビット及
び16ビット目)の出力が与えられ、ここで必要なシフト
動作が完了する。
In this example, the lower shifters 47 and 49 each composed of a 1-bit shifter and a 2-bit shifter are connected to the lower (first and second bit) output lines of the subtracters 15 and 17, respectively, and the subtraction and the shift are performed in parallel. . The output of one of the lower shifters is transferred to the upper shifter 53 via the selector 51. The upper shifter 53 is composed of a 4-bit shifter, an 8-bit shifter and a 16-bit shifter. The output of the upper one (4th bit, 8th bit and 16th bit) of the subtracters 15 and 17 is given via a selector 55. Here, the necessary shift operation is completed.

一方、けち表現検出回路23,25は、第1図のものと同
一で、そのいずれかの出力がセレクタ61で選択される。
又、セレクタ55は、減算器15,17の下位出力の選択を行
うセレクタ57と共に、デコーダ27に必要なシフト量の情
報を与え、ここで加算数の形成が行われる。このデコー
ダ27は第3図に示したものと同一構成を有し、セレクタ
61の出力を端子Cに受け、適宜加算数をビットOR29に出
力する。このビットOR29も第4図に示したものと同一で
ある。又、セレクタ33,35,37も、第1図のものと同一な
ので、その説明を省略する。
On the other hand, the fringe expression detection circuits 23 and 25 are the same as those in FIG. 1, and one of the outputs is selected by the selector 61.
The selector 55, together with the selector 57 for selecting the lower output of the subtracters 15, 17, gives the information of the required shift amount to the decoder 27, where the addition number is formed. This decoder 27 has the same configuration as that shown in FIG.
The output of 61 is received at terminal C, and the added number is output to bit OR29 as appropriate. This bit OR29 is the same as that shown in FIG. Also, the selectors 33, 35, 37 are the same as those in FIG.

第9図の第4実施例の第3実施例に対する関係は、第
2実施例の第1実施例に対する関係と同じで詳しい説明
は省略する。即ち、デコーダ39とビットOR43は、夫々第
6図、第7図に示した構成を有し、セレクタ61の出力は
ビットOR43に対して与えられる。
The relationship between the fourth embodiment and the third embodiment in FIG. 9 is the same as the relationship between the second embodiment and the first embodiment, and a detailed description thereof will be omitted. That is, the decoder 39 and the bit OR43 have the configurations shown in FIGS. 6 and 7, respectively, and the output of the selector 61 is given to the bit OR43.

第10図に第5実施例を示す。ここでは、下位シフター
47,49の出力に対して、デコーダ63,65及びビットOR67,6
9を用いて、けち表現の場合に上位の1の付与を行う。
これらデコーダ63,65とビットOR67,69の機能及び構成
は、シフト量が少ないだけで、先の実施例のものと同様
である。夫々第11図、第12図に夫々の具体例を掲げ、説
明は省略する。
FIG. 10 shows a fifth embodiment. Here, the lower shifter
For the outputs of 47 and 49, decoders 63 and 65 and bits OR 67 and 6
9 is used to assign the top 1 in the case of a sting expression.
The functions and configurations of the decoders 63 and 65 and the bit ORs 67 and 69 are the same as those of the previous embodiment except that the shift amount is small. Specific examples are shown in FIGS. 11 and 12, respectively, and description thereof is omitted.

第13図の第6実施例の第5実施例に対する関係は、第
2実施例の第1実施例に対する関係と同じであり詳しい
説明は省略する。即ち、デコーダ39,41とビットOR43,45
は、夫々第6図、第7図に示した構成を有し、けち表現
検出回路の出力はビットOR43,45に対して与えられる。
The relationship between the sixth embodiment and the fifth embodiment in FIG. 13 is the same as the relationship between the second embodiment and the first embodiment, and a detailed description thereof will be omitted. That is, the decoders 39, 41 and the bit ORs 43, 45
Has the configuration shown in FIGS. 6 and 7, respectively, and the output of the stutter expression detection circuit is given to bits OR43 and OR45.

これまでの説明で、各実施例で説明を省いた要素は先
行する実施例の対応する要素と同じ機能を持っている。
例えば、各セレクタはすべて減算器15の出力信号の符号
を受け、それが正の場合は指数部AE、シフト前のAM、シ
フトされたBMを出力し、それが負の場合は指数部BE、シ
フト前のBM、シフトされたAMを出力するものである。
In the description so far, elements that are not described in each embodiment have the same functions as corresponding elements in the preceding embodiment.
For example, each selector receives the sign of the output signal of the subtracter 15 and outputs an exponent part AE if it is positive, outputs AM before shifting, shifted BM, and outputs an exponent part BE if it is negative, The BM before shift and the shifted AM are output.

以上好ましい実施例について説明したが、本発明の趣
旨を変えない限り多くの変形例が考えられる。例えば、
これまでの説明では、シフト動作は上位に0を付与する
0拡張を行っていたが、デコーダ及びビットORとして第
14図及び第15図の様な回路を用いることにより、これを
省略することも出来る。又、デコーダ、ビットORの回路
構成は、ここに掲えたもの以外にも多くの種類があり、
それらも利用可能である。尚、以上の説明は負論理を用
いても同様に行われることは言うまでもない。
Although the preferred embodiment has been described above, many modifications are possible without changing the gist of the present invention. For example,
In the description so far, the shift operation has performed 0 extension to add 0 to the high order.
This can be omitted by using a circuit as shown in FIGS. 14 and 15. In addition, there are many types of decoders and bit OR circuits other than those described here.
They are also available. It goes without saying that the above description is similarly performed even when negative logic is used.

[発明の効果] 本発明によれば、けち表現であるか否かの決定を待た
ずに、減算器から出力される指数部の差に基づいて直ち
にシフト動作を開始することが出来、動作速度が大幅に
改善される。又、けち表現検出回路が桁合わせの実行に
際して、ボトルネックとならないので、この回路の設計
にゆとりを持たせることが出来る。
[Effects of the Invention] According to the present invention, the shift operation can be started immediately based on the difference between the exponents output from the subtractor without waiting for the determination of whether or not it is a stutter expression, and the operation speed can be increased. Is greatly improved. In addition, since the margin expression detection circuit does not become a bottleneck when performing digit alignment, it is possible to allow a margin in the design of this circuit.

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

第1図は、本発明による浮動小数点合わせ回路の第一の
実施例を示すブロック図である。 第2図は、本発明によるけち表現された数のシフト方法
を従来例との比較において示した説明図である。 第3図は、第1図に示された桁合わせ回路に用いられる
デコーダの回路図である。 第4図は、第1図に示された桁合わせ回路に用いられる
ビットORの回路図である。 第5図は、本発明による浮動小数点桁合わせ回路の第二
の実施例を示すブロック図である。 第6図は、第5図に示された桁合わせ回路に用いられる
デコーダの回路図である。 第7図は、第5図に示された桁合わせ回路に用いられる
ビットORの回路図である。 第8図は、本発明による浮動小数点桁合わせ回路の第三
の実施例を示すブロック図である。 第9図は、本発明による浮動小数点桁合わせ回路の第四
の実施例を示すブロック図である。 第10図は、本発明による浮動小数点桁合わせ回路の第五
の実施例を示すブロック図である。 第11図は、第10図に示された桁合わせ回路に用いられる
デコーダの回路図である。 第12図は、第10図に示された桁合わせ回路に用いられる
ビットORの回路図である。 第13図は、本発明による浮動小数点桁合わせ回路の第六
の実施例を示すブロック図である。 第14図は、本発明による桁合わせ回路に用いられるデコ
ーダの変形例を示す回路図である。 第15図は、本発明による桁合わせ回路に用いられるビッ
トORの変形例を示す回路図である。 第16図は、従来の浮動小数点演算器の桁合わせ回路を示
すブロック図である。 15,17……減算器 19,21……シフタ 23,24……表現検出回路 25,27……デコーダ 29,31……ビットOR 33,35,37……セレクタ
FIG. 1 is a block diagram showing a first embodiment of a floating point matching circuit according to the present invention. FIG. 2 is an explanatory diagram showing a method of shifting the number expressed by the present invention in comparison with a conventional example. FIG. 3 is a circuit diagram of a decoder used in the digit alignment circuit shown in FIG. FIG. 4 is a circuit diagram of a bit OR used in the digit alignment circuit shown in FIG. FIG. 5 is a block diagram showing a second embodiment of the floating point digit matching circuit according to the present invention. FIG. 6 is a circuit diagram of a decoder used in the digit alignment circuit shown in FIG. FIG. 7 is a circuit diagram of a bit OR used in the digit alignment circuit shown in FIG. FIG. 8 is a block diagram showing a third embodiment of the floating-point digit alignment circuit according to the present invention. FIG. 9 is a block diagram showing a fourth embodiment of the floating-point digit alignment circuit according to the present invention. FIG. 10 is a block diagram showing a fifth embodiment of the floating-point digit alignment circuit according to the present invention. FIG. 11 is a circuit diagram of a decoder used in the digit alignment circuit shown in FIG. FIG. 12 is a circuit diagram of a bit OR used in the digit alignment circuit shown in FIG. FIG. 13 is a block diagram showing a sixth embodiment of the floating-point digit alignment circuit according to the present invention. FIG. 14 is a circuit diagram showing a modification of the decoder used in the digit alignment circuit according to the present invention. FIG. 15 is a circuit diagram showing a modification of the bit OR used in the digit alignment circuit according to the present invention. FIG. 16 is a block diagram showing a digit aligning circuit of a conventional floating point arithmetic unit. 15,17… Subtractor 19,21… Shifter 23,24… Expression detection circuit 25,27… Decoder 29,31… Bit OR 33,35,37… Selector

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】浮動小数点表示された第一及び第二の数の
仮数部の桁合せを行う回路であって、 前記第一の数の指数部から前記第二の数の指数部を引い
た第一の差と、前記第二の数の指数部から前記第一の数
の指数部を引いた第二の差とを出力する減算器と、 前記第二の差の分だけ前記第一の数の仮数部のシフトを
行う第一のシフト手段と、 前記第一の差の分だけ前記第二の数の仮数部のシフトを
行う第二のシフト手段と、 前記第一及び第二の数がけち表現されているか否かを検
出する表現検出手段と、 前記表現検出手段で前記第一の数がけち表現されている
ことが検出された場合、前記第二の差の分の少なくとも
一部についてシフトされた後に前記第一の数の仮数部の
最上位のビットが取るビット位置よりも1ビット上位の
位置に1を付与する手段と、 前記表現検出手段で前記第二の数がけち表現されている
ことが検出された場合、前記第一の差の分の少なくとも
一部についてシフトされた後に前記第二の数の仮数部の
最上位のビットが取るビット位置よりも1ビット上位の
位置に1を付与する手段と、 前記第一の数の仮数部とそのシフトされたビット列又は
シフトされかつ前記1が付与されたビット列を入力し、
前記第一の数の指数部よりも前記第二の数の指数部の方
が大きい場合に前者を出力し、小さい場合に後者を出力
する第一のセレクタと、 前記第二の数の仮数部とそのシフトされたビット列又は
シフトされかつ前記1が付与されたビット列を入力し、
前記第二の数の指数部よりも前記第一の数の指数部の方
が大きい場合に前者を出力し、小さい場合に後者を出力
する第二のセレクタと、 前記第一及び第二の指数部を入力し、いずれか大きい方
を出力する第三のセレクタとからなる浮動小数点桁合せ
回路。
1. A circuit for performing digit alignment of mantissa parts of first and second numbers displayed as a floating point, wherein the exponent part of the second number is subtracted from the exponent part of the first number. A first difference, a subtractor that outputs a second difference obtained by subtracting the exponent part of the first number from the exponent part of the second number, and the first difference by an amount corresponding to the second difference First shifting means for shifting the mantissa part of the number, second shifting means for shifting the mantissa part of the second number by the first difference, and the first and second numbers An expression detecting means for detecting whether or not the expression is stuttered, and if the expression detecting means detects that the first number is stuttered, at least a part of the second difference Is added to the position one bit higher than the bit position taken by the most significant bit of the mantissa of the first number after being shifted. Means, when the expression detection means detects that the second number is staggered, the mantissa of the second number after being shifted for at least a part of the first difference Means for assigning 1 to the position one bit higher than the bit position taken by the most significant bit of the part, and the mantissa part of the first number and the shifted bit string or the shifted bit string to which the 1 is assigned And enter
A first selector that outputs the former when the exponent part of the second number is larger than the exponent part of the first number, and outputs the latter when it is smaller, and a mantissa part of the second number. And the shifted bit sequence or the shifted and bit sequence to which the 1 is assigned,
A second selector that outputs the former when the exponent part of the first number is larger than the exponent part of the second number, and outputs the latter when it is smaller, and the first and second exponents. A floating point alignment circuit comprising a third selector for inputting a signal and outputting the larger one.
【請求項2】浮動小数点表示された第一及び第二の数の
仮数部の桁合せを行う回路であって、 前記第一の数の指数部から前記第二の数の指数部を引い
た第一の差と、前記第二の数の指数部から前記第一の数
の指数部を引いた第二の差とを出力する減算器と、 前記第二の差の分だけ前記第一の数の仮数部のシフトを
行う第一のシフターと、 前記第一の差の分だけ前記第二の数の仮数部のシフトを
行う第二のシフターと、 前記第二の差を入力し、前記第一の数の仮数部の最上位
のビットが前記第一のシフターでシフトされた後に取る
ビット位置よりも1ビット上位の位置のみが1である第
一のビット列を生成する第一のデコーダと、 前記第一の差を入力し、前記第二の数の仮数部の最上位
のビットが前記第二のシフターでシフトされた後に取る
ビット位置よりも1ビット上位の位置のみが1である第
二のビット列を生成する第二のデコーダと、 前記第一のシフターの出力に前記第一のビット列との論
理和を取る第一のOR回路と、 前記第二のシフターの出力に前記第二のビット列との論
理和を取る第二のOR回路と、 前記第一の数がけち表現されているか否かを検出し、け
ち表現されている場合には前記第一のOR回路に於いて前
記第一のビット列の論理和が行われない様にする第一の
回路構成と、 前記第二の数がけち表現されているか否かを検出し、け
ち表現されている場合には前記第二のOR回路に於いて前
記第二のビット列の論理和が行われない様にする第二の
回路構成と、 前記第一の数の仮数部と前記第一のOR回路の出力を入力
し、前記第一の数の指数部よりも前記第二の数の指数部
の方が大きい場合に前者を出力し、小さい場合に後者を
出力する第一のセレクタと、 前記第二の数の仮数部と前記第二のOR回路の出力を入力
し、前記第二の数の指数部よりも前記第一の数の指数部
の方が大きい場合に前者を出力し、小さい場合に後者を
出力する第二のセレクタと、 前記第一及び第二の数の指数部を入力し、いずれか大き
い方を出力する第三のセレクタとからなる浮動小数点桁
合せ回路。
2. A circuit for performing digit alignment of mantissa parts of first and second numbers displayed in a floating point, wherein the exponent part of the second number is subtracted from the exponent part of the first number. A first difference, a subtractor that outputs a second difference obtained by subtracting the exponent part of the first number from the exponent part of the second number, and the first difference by an amount corresponding to the second difference A first shifter that shifts a mantissa of a number, a second shifter that shifts a mantissa of the second number by the amount of the first difference, and the second difference, A first decoder for generating a first bit string in which only one bit higher than the bit position taken after the most significant bit of the first mantissa is shifted by the first shifter is 1; Inputting the first difference and taking the most significant bit of the mantissa of the second number after being shifted by the second shifter. A second decoder that generates a second bit string in which only the position one bit higher than the bit position is 1, a first OR that takes the logical sum of the output of the first shifter and the first bit string A circuit, a second OR circuit that takes a logical sum of the output of the second shifter and the second bit string, and detects whether the first number is truncated, and is truncated. If so, a first circuit configuration for preventing the logical sum of the first bit string from being performed in the first OR circuit, and detecting whether or not the second number is intermittently expressed. And, in the case of being staggered, a second circuit configuration for preventing the logical sum of the second bit string from being performed in the second OR circuit, a mantissa part of the first number, The output of the first OR circuit is input, and the exponent of the second number is greater than the exponent of the first number. A first selector that outputs the former when it is larger and outputs the latter when it is smaller, and inputs the mantissa part of the second number and the output of the second OR circuit, and outputs the second number A second selector that outputs the former when the exponent part of the first number is larger than the exponent part of the first number and outputs the latter when it is smaller, and inputs the exponent parts of the first and second numbers. And a third selector for outputting the larger of the two values.
JP2115898A 1990-05-07 1990-05-07 Floating point alignment circuit Expired - Fee Related JP2980341B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2115898A JP2980341B2 (en) 1990-05-07 1990-05-07 Floating point alignment circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2115898A JP2980341B2 (en) 1990-05-07 1990-05-07 Floating point alignment circuit

Publications (2)

Publication Number Publication Date
JPH0414131A JPH0414131A (en) 1992-01-20
JP2980341B2 true JP2980341B2 (en) 1999-11-22

Family

ID=14673936

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2115898A Expired - Fee Related JP2980341B2 (en) 1990-05-07 1990-05-07 Floating point alignment circuit

Country Status (1)

Country Link
JP (1) JP2980341B2 (en)

Also Published As

Publication number Publication date
JPH0414131A (en) 1992-01-20

Similar Documents

Publication Publication Date Title
JP3076046B2 (en) Exception detection circuit
JPH0479013B2 (en)
JP2618374B2 (en) Finding the position of the most significant digit
US5831884A (en) Apparatus for performing arithmetic operation of floating point numbers capable of improving speed of operation by performing canceling prediction operation in parallel
JPH10289096A (en) Logic circuit and floating point arithmetic unit
US4590584A (en) Method and system for processing exponents in floating-point multiplication
US3976866A (en) Addition control system
JP2980341B2 (en) Floating point alignment circuit
US5235539A (en) Method and apparatus for generating carry out signals
JPH0346024A (en) Floating point computing element
JPH0511980A (en) Overflow detecting method and circuit
US7003540B2 (en) Floating point multiplier for delimited operands
JP2507183B2 (en) Floating point addition / subtraction unit
JPH07118654B2 (en) Arithmetic unit
US7240085B2 (en) Faster shift value calculation using modified carry-lookahead adder
US6076098A (en) Adder for generating sum and sum plus one in parallel
JP3187402B2 (en) Floating point data addition / subtraction circuit
JP2856792B2 (en) Floating point arithmetic unit
JPS5966790A (en) Operating circuit
JP2711487B2 (en) Fixed data addition / subtraction circuit
US6411975B1 (en) Digital processing
JPS6298425A (en) Arithmetic shifter circuit
JP2801472B2 (en) Floating point arithmetic unit
JP2901463B2 (en) Addition device
JP3139011B2 (en) Fixed-point processor

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees