[go: up one dir, main page]

JPS61131123A - Floating point arithmetic unit - Google Patents

Floating point arithmetic unit

Info

Publication number
JPS61131123A
JPS61131123A JP59253036A JP25303684A JPS61131123A JP S61131123 A JPS61131123 A JP S61131123A JP 59253036 A JP59253036 A JP 59253036A JP 25303684 A JP25303684 A JP 25303684A JP S61131123 A JPS61131123 A JP S61131123A
Authority
JP
Japan
Prior art keywords
adder
subtractor
digit
digits
floating point
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
JP59253036A
Other languages
Japanese (ja)
Inventor
Tei Ishikawa
石川 禎
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 JP59253036A priority Critical patent/JPS61131123A/en
Publication of JPS61131123A publication Critical patent/JPS61131123A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • G06F7/48Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
    • G06F7/483Computations with numbers represented by a non-linear combination of denominational numbers, e.g. rational numbers, logarithmic number system or floating-point numbers
    • G06F7/485Adding; Subtracting

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Mathematics (AREA)
  • Computing Systems (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Nonlinear Science (AREA)
  • General Engineering & Computer Science (AREA)

Abstract

PURPOSE:To simplify the unit and to attain high speed processing by expanding processing data length for a rounding adder/subtractor and applying in advance arithmetic operation including digits expanded by a carry so as to eliminate the need for various circuits. CONSTITUTION:The processing data length of the rounding adder/subtractor 31 is expanded toward the lower-order by 2 digits so as to add the most significant bit of a preceding digit to the corresponding digit to any of the least significant bits in three digits of the low-order in response to the state of a mantissa part adding/subtracting adder/subtractor 18. Thus, the rounded data is outputted from the least significant bit, then neither a shifter nor an exponent switch selector is required. Further, the processing data length of an adder/ subtractor 31 is expanded by 1 bit toward the high-order and the arithmetic operation is executed in advance including digits expanded by the carry. Thus, generation of carry at rounding is prevented, the right shift function of a mantissa normalizing shifter is not required and a control circuit controlling the said shifter is not required.

Description

【発明の詳細な説明】 [発明の技術分野] この発明は、指数部および仮数部を有し正規化された2
つの浮動小数点データ間の加減算を行ない、正規化され
た浮動小数点データを出力する浮動小数点演算装置に関
する。
[Detailed Description of the Invention] [Technical Field of the Invention] This invention relates to a normalized 2
The present invention relates to a floating point arithmetic device that performs addition and subtraction between two floating point data and outputs normalized floating point data.

[発明の技術的背景] この種の浮動小数点演算装置で適用される浮動小数点デ
ータは、一般に第4図のフォーマットに示すように、e
ビットの指数部E、1桁がmビットで構成される0桁(
do〜dn−1)の仮数部Mおよ   1び仮数部Mの
符号を示す1ビットの符号部Sからなる。第5図は従来
の浮動小数点演算装置の構成を示す。第5図において、
浮動小数点演算の対象となる浮動小数点データOP1.
OP2は、(符号部Sを除いて)レジスタ11.12に
ラッチされる。
[Technical Background of the Invention] Floating point data applied in this type of floating point arithmetic unit is generally e formatted as shown in the format of FIG.
Bit exponent E, 0 digit (1 digit consists of m bits)
dn-1) and a 1-bit sign part S indicating the sign of the mantissa part M and the sign of the mantissa part M. FIG. 5 shows the configuration of a conventional floating point arithmetic unit. In Figure 5,
Floating point data OP1 to be subjected to floating point operations.
OP2 (with the exception of the sign part S) is latched into register 11.12.

浮動小数点データOP1.OP2は正規化されている。Floating point data OP1. OP2 is normalized.

正規化されているとは、仮数部Mの最上位桁dOが0で
ないことを意味する。レジスタ11.12にラッチされ
た浮動小数点データOP1.OP2の各指数部Eは減算
器13に供給される。これにより浮動小数点データOP
1.OP2の指数部E間の減算が行なわれ、指数の差が
求められる。この差の正負、即ちOPl、OF2いずれ
の指数が大きいかは、減算器13のキャリー(ポロー)
出力で示される。
Normalized means that the most significant digit dO of the mantissa part M is not 0. Floating point data OP1. latched in registers 11.12. Each exponent part E of OP2 is supplied to a subtracter 13. This allows floating point data OP
1. Subtraction is performed between the exponent parts E of OP2, and the difference between the exponents is determined. The sign of this difference, that is, which exponent is larger, OPl or OF2, is determined by the carry (pollow) of the subtractor 13.
Shown in the output.

レジスタ11.12にラッチされた浮動小数点データO
P1.OP2の各指数部Eはセレクタ14にも供給され
る。セレクタ14は、減算器13からのキャリー出力に
応じ、OPl、OF2の指数部Eのうち大きい方の指数
部Eを選択する。一方、レジスタ11.12にラッチさ
れた浮動小数点データOP1゜OF2の各仮数部Mは、
セレクタ15およびセレクタ16にそれぞれ供給される
。セレクタ15は、減算器13からのキャリー出力に応
じ、OPl、OF2の仮数部Mのうち大きい方の仮数部
Mを選択する。
Floating point data O latched in registers 11.12
P1. Each exponent part E of OP2 is also supplied to the selector 14. The selector 14 selects the larger exponent part E of the exponent parts E of OPl and OF2 according to the carry output from the subtracter 13. On the other hand, each mantissa part M of the floating point data OP1°OF2 latched in registers 11 and 12 is
The signal is supplied to selector 15 and selector 16, respectively. The selector 15 selects the larger mantissa part M of the mantissa parts M of OPl and OF2 according to the carry output from the subtracter 13.

これに対してセレクタ16は、OPl、OF2の仮数部
Mのうち小さい方の仮数部Mを選択する。セレクタ16
の選択データは右シフタ11に供給される。
On the other hand, the selector 16 selects the smaller mantissa part M of the mantissa parts M of OPl and OF2. Selector 16
The selection data is supplied to the right shifter 11.

右シフタ17は、セレクタ1Bの選択データを減算器1
3の減算結果(即ちOPl、OF2の指数の差)で示さ
れる桁数だけ右シフトして指数の大きい方の仮数部Mと
の桁合せを行なう。右シフタ17の入力は0桁、出力は
n+2桁であり、桁数の拡張は入力の下位方向に行なわ
れる。そして、第5図の浮動小数点演算装置では、右側
にシフトアウトされた2桁までを以後の演算に含めるこ
とにより、演算の精度を上げている。この余分に演算す
る桁はガードディジットと称され、その桁数により演算
の精度が異なる。ここではガードディジットが2桁の場
合について説明する。
The right shifter 17 transfers the selected data of the selector 1B to the subtracter 1.
It is shifted to the right by the number of digits indicated by the subtraction result of 3 (ie, the difference between the exponents of OPl and OF2) to align the digits with the mantissa part M having the larger exponent. The input to the right shifter 17 is 0 digits, the output is n+2 digits, and the number of digits is expanded in the lower direction of the input. In the floating point arithmetic unit shown in FIG. 5, the accuracy of calculations is increased by including up to two digits shifted out to the right in subsequent calculations. This extra digit to be calculated is called a guard digit, and the accuracy of the calculation varies depending on the number of digits. Here, a case where the guard digit is two digits will be explained.

セレクタ15の選択データはn+2桁の加減算器18の
六入力に供給され、右シフタ17の出力データは同じく
B入力に供給される。しかして加減算器18は、位取り
を合わされた仮数部Mの加算または減算を、外部よりM
入力に供給される演算モード信号ADDI  (ADD
I−1で加算、ADDI −0で減算)に応じて実行す
る。加減算器18の演算結果は、第6図に示すように、
加算のときケース1.2、減算のときケース3〜6に分
類される。
The selection data of the selector 15 is supplied to six inputs of the n+2-digit adder/subtractor 18, and the output data of the right shifter 17 is also supplied to the B input. Therefore, the adder/subtractor 18 adds or subtracts the scaled mantissa part M from the outside.
Operation mode signal ADDI (ADD
(addition with I-1, subtraction with ADDI-0). The calculation result of the adder/subtractor 18 is as shown in FIG.
Cases 1 and 2 are classified for addition and cases 3 to 6 for subtraction.

なお加減算器18の演算結果のdo、 diが共にOと
なるケース5は、指数部の差がOまたは1のときに起り
得る。また加減算器18の演算結果が負となるケース6
は、指数部の差がOのときに起り得る。
Note that case 5 in which do and di of the calculation results of the adder/subtractor 18 are both O can occur when the difference in the exponent parts is O or 1. Case 6 in which the calculation result of the adder/subtractor 18 is negative
can occur when the difference in exponent parts is O.

加減算器18の演算結果(do、 dl、 ・dn−1
,ao。
The calculation result of the adder/subtractor 18 (do, dl, dn-1
, ao.

glからなるn+2桁)は、同演算結果の上位に固定値
1(1ビット)が付加された状態で、正規化のためのブ
リシフト用シフタ19に供給される。シフタ19の入力
は1ビット(1桁’)+ (n+2)桁、出力は0桁+
1ピツトであり、出力の0桁+1ビットは入力の上位よ
りの0桁+1ビットに対応している。シフタ19は、左
1桁シフト、スルー(シフトなし)、および右1桁シフ
トの3種の動作機能を有しており、その動作は加減算器
18の演算モード(加算/減算)、加減算器18のキャ
リー出カ(CO)および加減算器18の演算結果の最上
位桁dOに応じて制御回路20により制御される。即ち
シフ¥19−は、加減算器18が加算動作のとき、加減
算器18からキャリーが発生(Co−1)すれば、右1
桁シフトモードに設定される。またシフタ19は、加減
算器18が加算動作のときキャリーなしであるか、或は
減算動作のとき結果が正(Co−1でdO≠0であれば
スルーモードに設定される。またシフタ19は、加算動
作のときキャリーなしであるか、或は減算動作のとき結
果が正でdO−0であれば左1桁シフトモードに設定さ
れる。更にシフタ19は、加減算器18が減算動作のと
き結果が負(CO−0)であればスルーモードに設定さ
れる。
gl (n+2 digits) is supplied to the pre-shift shifter 19 for normalization with a fixed value 1 (1 bit) added to the upper part of the result of the operation. The input of shifter 19 is 1 bit (1 digit') + (n+2) digits, and the output is 0 digit +
1 pit, and the 0 digits + 1 bit of the output corresponds to the 0 digits + 1 bit from the higher order of the input. The shifter 19 has three types of operation functions: left 1-digit shift, through (no shift), and right 1-digit shift. The control circuit 20 controls the carry output (CO) of the adder/subtractor 18 and the most significant digit dO of the calculation result of the adder/subtractor 18. That is, shift ¥19- is the right 1 if a carry occurs (Co-1) from the adder/subtracter 18 when the adder/subtracter 18 is performing an addition operation.
Set to digit shift mode. Further, the shifter 19 is set to through mode if there is no carry when the adder/subtracter 18 is performing an addition operation, or if the result is positive (dO≠0 at Co-1) when the adder/subtractor 18 is performing an addition operation. , if there is no carry during an addition operation, or if the result is positive and dO-0 during a subtraction operation, the shifter 19 is set to the left one digit shift mode. If the result is negative (CO-0), the through mode is set.

シフタ19の出力(0桁+1ピツト)の上位0桁は、0
桁の加減算!s21の8入力に供給される。加減算器2
1のA入力には固定!IOが供給される。加減算器21
は加減算器18の演算結果が正の場合には丸めのために
加算器として、負の場合には負から正に変換するために
(Oからシフタ19の演算結果を減じる)減算器として
用いられる。加減算器21の演算モードは、上記制御回
路20によって指定される。即ち加減算器21は、加減
算、器18が加算動作のとき、或は減算動作で且つその
結果が正(C0−1)のとき加算モードに設定される。
The upper 0 digits of the output of shifter 19 (0 digit + 1 pit) are 0
Addition and subtraction of digits! It is supplied to 8 inputs of s21. Adder/subtractor 2
Fixed to A input of 1! IO is provided. Adder/subtractor 21
is used as an adder for rounding when the operation result of the adder/subtractor 18 is positive, and as a subtracter for converting from negative to positive (subtracting the operation result of shifter 19 from O) when it is negative. . The operation mode of the adder/subtractor 21 is specified by the control circuit 20. That is, the adder/subtractor 21 is set to the addition mode when the adder/subtractor 18 is in an addition operation or in a subtraction operation and the result is positive (C0-1).

また加減算器21は、加減算器18が減算動作で且つそ
の結果が負(Co−0)(7>とき減算モードに設定さ
れる。
Further, the adder/subtractor 21 is set to the subtraction mode when the adder/subtractor 18 is in a subtraction operation and the result is negative (Co-0) (7>).

丸めは、加算モードにおいて、加減算器21のキャリー
人力(CI)に、シフタ19の出力の最下位の1ビット
を供給することにより行なわれる。一方、加減算器18
の演算結果の負から正への変換は、減算モードにおいて
加減算器21のキVり一人力(CI)に1を供給するこ
とにより行なわれる。加減算器21へのキャリー人力デ
ータは、シフタ19の出力の最下位ビットまたは固定値
]を選択するセレクタ22から供給される。このセレク
タ22の選択動作は、前記した制御回路20により制御
される。しかしてセレクタ22は、加減算器18が加算
動作のとき、或は減算動作で且つその結果が正(CO=
1)のときは丸めのためにシフタ19の出力の最下位ビ
ットを選択し、加減算器18が減算動作で且つその結果
が負(Go−0ンのときは7を選択する。
Rounding is performed by supplying the least significant bit of the output of shifter 19 to the carry input (CI) of adder/subtractor 21 in addition mode. On the other hand, adder/subtractor 18
The conversion of the calculation result from negative to positive is performed by supplying 1 to the input voltage (CI) of the adder/subtractor 21 in the subtraction mode. The carry data to the adder/subtractor 21 is supplied from a selector 22 that selects the least significant bit of the output of the shifter 19 or a fixed value. The selection operation of the selector 22 is controlled by the control circuit 20 described above. Therefore, when the adder/subtractor 18 is in an addition operation or in a subtraction operation and the result is positive (CO=
In the case of 1), the least significant bit of the output of the shifter 19 is selected for rounding, and when the adder/subtracter 18 is performing a subtraction operation and the result is negative (Go-0), 7 is selected.

以上のことから、第6図のケース1〜6において、シフ
タ19の出力の上位の0桁、即ち加減算器21の8人力
の内容は、下線で示す通りとなる。図から明らかなよう
にケース1以外では、シフタ19の出力の上位の0桁、
即ち加減算器21の8入力の内容には1.加減算a18
のキャリー出力(Co )は含まれていない。また、ケ
ース1ではCo−1である。そこで第5図では、シフタ
19の最上位にCOに代えて固定値1を供給するように
している。
From the above, in cases 1 to 6 in FIG. 6, the upper 0 digits of the output of the shifter 19, that is, the contents of the eight inputs of the adder/subtractor 21 are as shown by the underlines. As is clear from the figure, in cases other than case 1, the upper 0 digit of the output of the shifter 19,
That is, the contents of the 8 inputs of the adder/subtractor 21 are 1. Addition and subtraction a18
The carry output (Co) of is not included. Moreover, in case 1, it is Co-1. Therefore, in FIG. 5, a fixed value 1 is supplied to the top of the shifter 19 instead of CO.

また第6図のケース1〜6において、シフタ19の出力
の最下位ビットにより、セレクタ22経由で加減算器2
1のキャリー人力となるデータ(ビット)位置は記号ム
で示す通りとなる。
In addition, in cases 1 to 6 in FIG.
The data (bit) position to be carried by 1 is as shown by the symbol.

さて、シフタ19でシフト動作が行なわれた場合、それ
に応じて指数を補正する必要がある。そこで第5図の浮
動小数点演算装置には、+1、oまたは−1のいずれか
1つを選択するセレクタ23と、加算器24が用意され
ている。セレクタ23は、前記したhtm回路20のシ
フタ19に対する指示により制御される。しかしてセレ
クタ23は、シフタ19が右1桁シフトモードのときに
は+1を、左1桁シフトモードのときには−1を、スル
ーモードのときにはOを選択する。セレクタ23の選択
データは加算器24に供給され、セレクタ14で選択さ
れた指数に加えられる。これにより、シフタ19のシフ
ト動作に対する指数補正が行なわれる。
Now, when a shift operation is performed by the shifter 19, it is necessary to correct the index accordingly. Therefore, the floating point arithmetic unit shown in FIG. 5 is provided with a selector 23 for selecting one of +1, o, or -1, and an adder 24. The selector 23 is controlled by instructions to the shifter 19 from the htm circuit 20 described above. Thus, the selector 23 selects +1 when the shifter 19 is in the right one-digit shift mode, -1 when it is in the left one-digit shift mode, and selects O when it is in the through mode. The selection data of the selector 23 is supplied to the adder 24 and added to the index selected by the selector 14. As a result, index correction for the shift operation of the shifter 19 is performed.

加減算器21の演算結果(0桁)は、リーディングゼロ
桁検出器(以下LZD検出器と称する)25に供給され
、これによりそのリーディングゼロ桁の桁数1が検出さ
れる。また加減算器21の演算結果(0桁)は、同演算
結果の上位に固定値1(1ピツト)が付加された状態で
シフタ26に供給される。シフタ26は、加減算器21
で丸め(加算)が行なわれ、その結果キャリーが発生(
CO2−1)した場合には、加減算器21の演算結果を
右1桁シフトする。この場合、シフタ26の出力データ
の最上位桁は1となる。一方、上記以外の場合には、シ
フタ26はLZD検出器25で検出されたリーディング
ゼロ桁の桁数1だけ左シフトを行なう。これにより、浮
動小数点データOP1.OP2の浮動小数点演算結果の
正規化された仮数部Mが求められる。シック26の動作
は、加減算器21の演算モードを指定する演算モード信
号ADD2 、加減算器21のキ1y IJ−出力(C
O2) l115にヒL Z D検出器25f7)桁数
検出結果に応じて制御回路27により制御される。゛制
御回路27は浮動小数点演算結果の指数部Eを求める加
減算器28も制卸する。加減算器28は、シフタ26で
右1桁シフトが行なわれた場合には、加算器24の加算
結果に1を加える。これに対してシフタ26で左シフト
が行なわれた場合には、加減算器28はそのシフト桁数
を加算器24の加算結果から減じる。
The calculation result (0 digit) of the adder/subtractor 21 is supplied to a leading zero digit detector (hereinafter referred to as LZD detector) 25, which detects the number 1 of the leading zero digit. Further, the calculation result (0 digit) of the adder/subtractor 21 is supplied to the shifter 26 with a fixed value 1 (1 pit) added to the upper part of the calculation result. The shifter 26 is the adder/subtractor 21
Rounding (addition) is performed at , resulting in a carry (
CO2-1), the calculation result of the adder/subtractor 21 is shifted one digit to the right. In this case, the most significant digit of the output data of the shifter 26 is 1. On the other hand, in cases other than the above, the shifter 26 performs a left shift by one digit of the leading zero digit detected by the LZD detector 25. As a result, floating point data OP1. The normalized mantissa part M of the floating point operation result of OP2 is obtained. The operation of the chic 26 is based on the operation mode signal ADD2 which specifies the operation mode of the adder/subtractor 21, the key IJ- output (C
O2) LZD detector 25f7) Controlled by the control circuit 27 according to the result of detecting the number of digits. ``The control circuit 27 also controls the adder/subtractor 28 that calculates the exponent part E of the floating point operation result. The adder/subtracter 28 adds 1 to the addition result of the adder 24 when the shifter 26 performs a one-digit shift to the right. On the other hand, when the shifter 26 performs a left shift, the adder/subtractor 28 subtracts the number of digits of the shift from the addition result of the adder 24.

上記したシフタ19、加減算器21、セレクタ22およ
びセレクタ23に対する制御回路20の制御内容を、加
減算器18の演算モード(加算/減算)、加減算   
1器18のキャリー出力(Co )および加減算器18
の演算結果の最上位桁dOと対応させて第1表に示す。
The control contents of the control circuit 20 for the shifter 19, the adder/subtracter 21, the selector 22, and the selector 23 described above are as follows:
Carry output (Co) of unit 18 and adder/subtractor 18
Table 1 shows the correspondence with the most significant digit dO of the calculation result.

またシフタ26および加減算器28に対する制御回路2
7の制御内容を、加減算器21の演算モード(加算/減
算)および加減算器18のキャリー出力(CO2)と対
応させて第2表に示す。
Further, the control circuit 2 for the shifter 26 and the adder/subtractor 28
The control contents of 7 are shown in Table 2 in correspondence with the operation mode (addition/subtraction) of the adder/subtractor 21 and the carry output (CO2) of the adder/subtractor 18.

31111表 第  2  表 [背景技術の問題点1 上記した従来の浮動小数点演算装置では、浮動小数点デ
ータOP1.OP2の浮動小数点演算が正しく行なわれ
るものの、以下に述べる種々の不都合かあ?た。
31111 Table 2 [Problem 1 of Background Art] In the conventional floating point arithmetic device described above, floating point data OP1. Although floating point operations in OP2 are performed correctly, there are various problems described below. Ta.

■ 丸め(および負から正への変換)用の加減算器21
のキャリー人力に丸めるビットを供給するために、仮数
部演算用の加減算器18と上記加減算器21との間にシ
フタ19を必要とする。
■ Adder/subtractor 21 for rounding (and conversion from negative to positive)
A shifter 19 is required between the adder/subtractor 18 for mantissa operation and the adder/subtractor 21 in order to supply rounding bits to the carry input.

■ シフタ19を用いることから、同シフタ19による
シフト桁分だけ指数を補正するためのセレクタ23およ
び加算器24を必要とする。
(2) Since the shifter 19 is used, a selector 23 and an adder 24 are required to correct the exponent by the number of digits shifted by the shifter 19.

■ 加減算器21での丸め(丸め用加算)の結果キャリ
ーが発生することもあるため、仮数部正規化のためのシ
フタ26は左シフト機能だけでなく右シフト機能も必要
である。
(2) Since a carry may occur as a result of rounding (addition for rounding) in the adder/subtractor 21, the shifter 26 for normalizing the mantissa needs not only a left shift function but also a right shift function.

■ 上記■と同様の理由により、浮動小数点演算結果の
指数部を求める手段として、減算機能だけでなく加算機
能をも有する加減算器28を必要とする。
(2) For the same reason as (2) above, the adder/subtractor 28, which has not only a subtraction function but also an addition function, is required as a means for determining the exponent part of the floating-point operation result.

■ 上記■と同様の理由により、シフタ26の左右シフ
トおよび加減算器28の加減算器の加減算を制御する制
御回路27を必要とする。
(2) For the same reason as (2) above, a control circuit 27 is required to control the left/right shift of the shifter 26 and the addition/subtraction of the adder/subtractor 28.

[発明の目的] この発明は上記事情に鑑みてなされたものでその目的は
、丸め(および負から正への変換)用の加g算器へのキ
ャリー人力を不要にでき、しかも丸めによる同加減算器
からのキャリーの発生をなくすことができ、もって回路
構成の簡略化が図れる浮動小数点演算装置を提供するこ
とにある。
[Purpose of the Invention] This invention was made in view of the above circumstances, and its purpose is to eliminate the need for carrying manpower to the adder for rounding (and conversion from negative to positive), and to eliminate the need for the same number of rounds due to rounding. It is an object of the present invention to provide a floating point arithmetic device which can eliminate the occurrence of carries from adders and subtracters, thereby simplifying the circuit configuration.

[発明の概要] この発明によれば、eビットの指数部、1桁がmビット
構成の0桁の仮数部および同仮数部の符号を示す符号部
からなる正規化された第1および第2浮動小数点データ
間の加算または減算を行ない、正規化された第3浮動小
数点データを出力する浮動小数点演算装置が提供される
。この浮動小数点演算装置は、第1および第2減算器と
、選択手段と、桁合せ手段と、n+g桁(Ωは演算の精
度を上げるために用いられるガードディジットの桁数)
の第1加減算器と、n+g+1桁の第2加減算器と、リ
ーディングゼロ桁検出器と、左シフタと、加算器とを含
んでいる。
[Summary of the Invention] According to the present invention, normalized first and second A floating point arithmetic unit is provided that performs addition or subtraction between floating point data and outputs normalized third floating point data. This floating point arithmetic device includes first and second subtracters, selection means, digit alignment means, and n+g digits (Ω is the number of guard digits used to improve the precision of calculation).
, a second adder/subtractor for n+g+1 digits, a leading zero digit detector, a left shifter, and an adder.

上記浮動小数点演算装置において、第1減算器は、第1
および第2浮動小数点データの指数部の指数差を算出す
る。選択手段は、第1減算器の減算結果に応じ、第1ま
たは第2浮動小数点データのうちで指数の大きい方の浮
動小数点データの指数部を選択する。また桁合せ手段は
、上記第1減算器の減算結果に応じ、指数の小さい方の
浮動小数点データの仮数部を、上記第1および第2浮動
小数点データの指数の差だけ右シフトする。これにより
第1および第2浮動小数点データの仮数部の桁合せが行
なわれる・第1加減算器は・折合11手段によって桁合
せされた上記第1および第2浮動小数点データの仮数部
間の加算または減算を、第1演算モード信号に応じて実
行する。
In the above floating point arithmetic device, the first subtractor includes a first
and calculates the exponent difference between the exponent parts of the second floating point data. The selection means selects an exponent part of the floating point data having a larger exponent out of the first or second floating point data according to the subtraction result of the first subtracter. Further, the digit alignment means shifts the mantissa part of the floating point data having the smaller exponent to the right by the difference between the exponents of the first and second floating point data in accordance with the subtraction result of the first subtracter. This performs digit alignment of the mantissa parts of the first and second floating point data.The first adder/subtractor adds or Subtraction is performed in response to a first calculation mode signal.

第1加減算器の演算結果(n+g桁)は、同演算結果が
負のときに正に変換し、負でないときには丸めを行なう
第2加減算器の一方の入力に供給される。第2加減算器
の他方の入力には、第1桁乃至第n+g−4桁並びに第
n+g桁の各ビットおよび第n+a−3桁乃至第n+a
−1桁のそれぞれ上位3ビットがOである補正データが
供給される。第2加減算器は、これら両人力に供給され
るデータ間の加算または減算を第2演算モード信号に応
じて実行する。上記補正データの第n+g−3桁乃至第
n+g−1桁のそれぞれ最下位ビットおよび第0桁(最
上位桁)の内容と上記第2演算モード信号とは、第1加
減算器の最上位桁からのキャリー出力、同第1加減算器
の演算結果の最上位桁の全ビット、下位1+Q桁の各桁
毎の最上位ビット、および上記第1演算モード信号に応
じて制御回路により決定される。
The operation result (n+g digits) of the first adder/subtractor is supplied to one input of the second adder/subtractor, which converts the operation result to a positive value when it is negative, and rounds it when it is not negative. The other input of the second adder/subtractor is supplied with each bit of the 1st digit to the n+g-4th digit, the n+g digit, and the n+a-3rd digit to the n+a-th digit.
- Correction data in which the upper three bits of each digit are O is supplied. The second adder/subtractor performs addition or subtraction between the data supplied to both of these inputs according to the second operation mode signal. The contents of the least significant bit and the 0th digit (most significant digit) of the n+g-3rd digit to n+g-1st digit of the correction data and the second operation mode signal are as follows: It is determined by the control circuit according to the carry output of , all the most significant bits of the operation result of the first adder/subtractor, the most significant bit of each of the lower 1+Q digits, and the first operation mode signal.

リーディングゼロ桁検出器は、上記第2加′@算器の演
算結果のリーディングゼロ桁の桁数を検出する。左シフ
タは、リーディングゼロ検出器によって検出されたリー
ディングゼロ桁の桁数だけ上記纂′2加減陣器の演算結
果を左シフトする。これにより上記第1および第2浮動
小数点データの浮動小数点演算結果の正規化された仮数
部、即ち上記第3浮動小数点データの仮数部が求められ
る。
The leading zero digit detector detects the number of leading zero digits of the operation result of the second adder. The left shifter shifts the operation result of the 2'2 adder/subtractor to the left by the number of leading zero digits detected by the leading zero detector. As a result, the normalized mantissa part of the floating point operation results of the first and second floating point data, ie, the mantissa part of the third floating point data, is obtained.

これに対し、第3浮動小数点データの指数部は、上記選
択手段によって選択された指数部の指数に、加算器によ
り1が加えられ、その+1結果からリーディングゼロ検
出器によって検出されたリーディングゼロ桁の桁数を減
じることにより求められる。
On the other hand, the exponent part of the third floating point data is obtained by adding 1 by an adder to the exponent of the exponent part selected by the selection means, and from the +1 result, the leading zero digit detected by the leading zero detector. It can be found by subtracting the number of digits.

[発明の実施例] 以下、この発明の一実施例を第1図乃至第3図を参照し
て説明する。なお、第5図と同一部分には同一符号を付
して詳細な説明を省略する。第1図の浮動小数点演算装
置において、31は加減算器18の演算結果に対する丸
め或は負から正への変換用の1ビット+(n+2)桁の
加減算器であり、第5図の加減算器21に比べ取扱いデ
ータ長が1ビット+2桁拡張されている。この拡張され
た2桁は、仮数部演算用の加減算器18のガードディジ
ットに一致する。加減算器31の8入力の下位のn+2
桁には加減算器18の出力データ(桁dO,dl、・・
・dn−1,gO,glからなるn+2桁の演算結果)
が供給され、その上位(最上位ビット)には固定1i!
0が供給される。一方、加減算器31の六入力には、上
記した丸め或は負から正への変換に必要な補正データが
供給される。
[Embodiment of the Invention] An embodiment of the invention will be described below with reference to FIGS. 1 to 3. Note that the same parts as in FIG. 5 are given the same reference numerals and detailed explanations are omitted. In the floating point arithmetic unit shown in FIG. 1, numeral 31 is a 1-bit+(n+2) digit adder/subtracter for rounding the operation result of the adder/subtractor 18 or converting from negative to positive; The handling data length is expanded by 1 bit + 2 digits compared to . The expanded two digits match the guard digits of the adder/subtractor 18 for mantissa calculation. Lower n+2 of 8 inputs of adder/subtractor 31
The digits contain the output data of the adder/subtractor 18 (digits dO, dl,...
・N+2 digit calculation result consisting of dn-1, gO, gl)
is supplied, and its upper (most significant bit) is fixed 1i!
0 is supplied. On the other hand, the six inputs of the adder/subtractor 31 are supplied with correction data necessary for the above-mentioned rounding or conversion from negative to positive.

上記補正データのデータ長は、第2図に示すように、ビ
ットC(MSB)および桁do、 dl、−dn−1,
gO,ol(LSD) カらなる1ビット+(n+2)
桁である。上記補正データのdO−dn−3並びにgl
の各桁の全ビットと、dn−2,dn−1並びにgoの
各桁のそれぞれ上位mm−1(は1桁の構成ビット数)
ビットは、いずれも0である。また、補正データの最上
位ビットCはla+である。また、補正データのdn−
2,dn−1,goの各桁の最下位ビット(dn−IL
SB、 dn−2LSB、 QOLSB )はIn−2
゜1n−1,1CIである。これらII 、  1n−
2、1n−1、Iaの各ビットデータは、制御回路32
から供給される。
As shown in FIG. 2, the data length of the above correction data is bit C (MSB) and digits do, dl, -dn-1,
gO, ol (LSD) 1 bit + (n+2)
It is a digit. dO-dn-3 and gl of the above correction data
all bits of each digit, and the upper mm-1 of each digit of dn-2, dn-1, and go (represents the number of bits constituting one digit)
All bits are 0. Further, the most significant bit C of the correction data is la+. In addition, the correction data dn-
2, dn-1, the least significant bit of each digit of go (dn-IL
SB, dn-2LSB, QOLSB) is In-2
゜1n-1,1CI. These II, 1n-
Each bit data of 2, 1n-1, and Ia is sent to the control circuit 32.
Supplied from.

制御回路32は、加減算器18の演算モード(加算/減
算)を指定する演算モード信号ADD1.加減算器18
のキャリー出力(Co)、および加減算器18の出力デ
ータの一部D(具体的には、60桁の全ビット、dn−
1桁の最上位ビットdn−IM S B 、 00桁の
最上位ごットaOM S B、および91桁の最上位ビ
ットg1M S B )に応じ、加減算器31の演算モ
ードを指定する演算モード信号ADD3および上記[、
In−2、In−1、Igを出−力スル17)ニ必要な
回路構成を有している。第3図は制御回路32の構成を
示すもので、オアゲート41には上記演算モード信号A
DDIおよび加減算器18からのキャリー出力(Co 
)が供給される。オアゲート41の出力信号は、演算モ
ード信号ADD3として加減算器31のM入力に供給さ
れる。上記演算モード信号ADDIおよび加減算器18
からのキャリー出力    1(CO)は、イクスクル
ーシブ・ノアゲート(以“下EXNORと称する)42
にも供給される。EXN OR42の出力信号は、上記
ビットデータ[として加減算器31の六入力(の最上位
ビットC)に供給される。また、上記ADDIおよびC
Oは、加減算器18の出力データ中の(In−1桁の最
上位どツトdn−1M S Bと共に、アンドゲート4
3に供給される。アンドゲート43の出力信号は、上記
ビットデータl n−2として加減算器31の六入力(
のdn−2桁の最下位ビットdn−2L S B )に
供給される。また、加減算器18の出力データ中のdo
桁の全ビット(mビット)は、ノアゲート44に供給さ
れる。ノアゲート44からの出力信号は、E X N 
OR42からの出力信号である■■と共にノアゲート4
5に供給される。ノアゲート45からの出力信号は、加
減算器18の出力データ中のgO桁の最上位ビットaO
M S Bと共にアンドゲート46に供給される。アン
ドゲート46の出゛力信号は、上記ビットデータ(n−
1として加減算器31のA入力(のdn−1桁の最下位
ビットdn−ILSB)に供給される。また、ノアゲー
ト44からの出力信号は、インバータ47にも供給され
る。
The control circuit 32 receives an arithmetic mode signal ADD1 . Adder/subtractor 18
The carry output (Co) of
An operation mode signal that specifies the operation mode of the adder/subtractor 31 according to the most significant bit of 1 digit dn-IM S B, the most significant bit of 00 digit aOM S B, and the most significant bit of 91 digit g1 M S B ADD3 and the above [,
It has the necessary circuit configuration for outputting In-2, In-1, and Ig (17). FIG. 3 shows the configuration of the control circuit 32, in which the OR gate 41 receives the arithmetic mode signal A.
DDI and carry output from adder/subtracter 18 (Co
) is supplied. The output signal of the OR gate 41 is supplied to the M input of the adder/subtractor 31 as an operation mode signal ADD3. The above calculation mode signal ADDI and the adder/subtractor 18
The carry output 1 (CO) from the Exclusive NOR gate (hereinafter referred to as “EXNOR”) 42
Also supplied. The output signal of the EXN OR 42 is supplied as the bit data to the six inputs (the most significant bit C) of the adder/subtractor 31. In addition, the above ADDI and C
O is the most significant digit of (In-1) in the output data of the adder/subtractor 18, dn-1M S B, and the AND gate 4.
3. The output signal of the AND gate 43 is the six inputs of the adder/subtractor 31 (
dn-2 least significant bit (dn-2LSB) of the dn-2 digit. Also, do in the output data of the adder/subtractor 18
All bits (m bits) of the digit are provided to a NOR gate 44 . The output signal from the NOR gate 44 is E
Along with the output signal from OR42, the NOR gate 4
5. The output signal from the NOR gate 45 is the most significant bit aO of the gO digit in the output data of the adder/subtractor 18.
It is supplied to the AND gate 46 together with MSB. The output signal of the AND gate 46 is the bit data (n-
It is supplied as 1 to the A input of the adder/subtractor 31 (dn-1 digit least significant bit dn-ILSB). Further, the output signal from the NOR gate 44 is also supplied to the inverter 47.

インバータ41の出力信号は、E X N OR42か
らの出力信号であるla+と共にノアゲート48に供給
される。ノアゲート48からの出力信号は、加減算器1
8の出力データ中のg1桁の最上位ビットg1M S 
Bと共にアンドゲート49に供給される。アンドゲート
49の出力信号は、上記ビットデータIgとして加減算
器31のA入力(のgO桁の最下位ビットgOLSB)
に供給される。
The output signal of the inverter 41 is supplied to the NOR gate 48 along with the output signal la+ from the EXNOR 42. The output signal from the NOR gate 48 is sent to the adder/subtracter 1
The most significant bit of g1 digit in the output data of 8 g1M S
It is supplied to the AND gate 49 together with B. The output signal of the AND gate 49 is the A input of the adder/subtractor 31 (the least significant bit gOLSB of the gO digit) as the bit data Ig.
supplied to

再び第1図を参照すると、加減算器31の1ビット+(
n±2)桁の出力データは、同出力データのリーディン
グゼロ桁の桁数を検出するLZD検出器(リーディング
ゼロ桁検出器)33、および左シフタ34の各入力に接
続される。左シフタ34の入力はn+3桁、出力は0桁
であり、出力の0桁は入力の上位の0桁の桁位置に対応
している。左シフタ34は、LZD検出器33で検出さ
れたリーディングゼロ桁の桁数だけ、加減算器31の出
力データを左シフトし、正規化された仮数部を出力する
Referring again to FIG. 1, 1 bit of adder/subtractor 31 + (
The n±2) digit output data is connected to each input of an LZD detector (leading zero digit detector) 33 that detects the number of leading zero digits of the output data, and a left shifter 34. The input of the left shifter 34 is n+3 digits, and the output is 0 digit, and the 0 digit of the output corresponds to the upper 0 digit position of the input. The left shifter 34 shifts the output data of the adder/subtractor 31 to the left by the number of leading zero digits detected by the LZD detector 33, and outputs a normalized mantissa part.

この際、加減算器31の出力データの最上位ビット1は
、それだけで1桁として扱われる。一方、セレクタ14
の選択データ(指数部E)は、加算器35の六入力に供
給される。加算器35の8入力には、固定値1が供給さ
れる。加算器35の出力データは浮動小数点演算結果の
指数部出力用の減算器36の六入力に供給される。減算
器36の8入力には、LzD検出器33の検出結果(即
ち加減算器31の出力データのリーディングゼロ桁の桁
数)が供給される。
At this time, the most significant bit 1 of the output data of the adder/subtractor 31 is treated as one digit. On the other hand, selector 14
The selection data (exponent part E) is supplied to six inputs of the adder 35. A fixed value of 1 is supplied to 8 inputs of the adder 35. The output data of the adder 35 is supplied to six inputs of a subtracter 36 for outputting the exponent part of the floating point arithmetic result. The detection result of the LzD detector 33 (ie, the number of leading zero digits of the output data of the adder/subtractor 31) is supplied to eight inputs of the subtracter 36.

なお、加減算器18の演算結果のオーバフロー、アンダ
フロー、およびゼロを検出する回路、浮動小数点演算結
果の符号の生成回路などについては、この発明に直接関
係しないため説明を省略する。
Note that the circuit for detecting overflow, underflow, and zero in the result of the operation of the adder/subtractor 18, the circuit for generating the sign of the result of the floating-point operation, and the like are not directly related to the present invention, and therefore their description will be omitted.

但しゼロ検出は、LZD検出器33によって行なわれる
。そして、LZD検出器33によって仮数部がゼロであ
ることが検出された場合、浮動小数点演算結果の指数部
は強制的にゼロにされる。この回路は、この発明に直接
関係しないため、省略されている。
However, zero detection is performed by the LZD detector 33. If the LZD detector 33 detects that the mantissa part is zero, the exponent part of the floating-point operation result is forcibly set to zero. This circuit is omitted because it is not directly related to this invention.

さて、第1図に示す浮動小数点演算装置において、浮動
小数点演算の対象となる正規化された浮動小数点データ
○Pi、OP2は、(符号部Sを除いて)レジスタ11
.12にラッチされる。レジスタ11.12にラッチさ
れた浮動小数点データOP1゜OF2の各指数部Eは減
算器13に供給される。これにより浮動小数点データO
P1.OP2の指数部1間゛め減算が行なわれ、指数の
差が求められる。
Now, in the floating point arithmetic unit shown in FIG.
.. It is latched to 12. Each exponent part E of the floating point data OP1°OF2 latched in the registers 11 and 12 is supplied to the subtracter 13. This allows floating point data O
P1. Subtraction is performed for the exponent part 1 of OP2, and the difference between the exponents is determined.

この差の正負、即ちOPI、OF2いずれの指数が大き
いかは、減算器13のキャリー(ボロー)出力で示され
る。レジスター1.12にラッチされた浮動小数点デー
タOP1.OP2の各仮数部Mは、セレクタ15および
セレクタ16にそれぞれ供給される。セレクタ15は、
減算器13からのキャリー出力に応じ、OPl、OF2
の仮数部Mのうち大きい方の仮数部Mを選択する。これ
に対してセレクタ16は、OPl、OF2の仮数部Mの
うち小さい方の仮数部Mを選択する。セレクタ16の選
択データは右シフタ17に供給される。右シフタ11は
、セレクタ16の選択データを減算器13の減算結果(
即ちOPl、OF2の指数の差)で示される桁数だけも 右シフトして指数の大きい方の仮数部Mとの桁合せを行
なう。以上の仮数部桁合せ処理が、浮動小数点演算の第
1段階(イコライズと呼ぶ)である。
The carry (borrow) output of the subtractor 13 indicates whether the difference is positive or negative, that is, which exponent is larger, OPI or OF2. Floating point data OP1. latched in register 1.12. Each mantissa part M of OP2 is supplied to the selector 15 and the selector 16, respectively. The selector 15 is
According to the carry output from the subtracter 13, OPl, OF2
The larger mantissa part M is selected from among the mantissa parts M of . On the other hand, the selector 16 selects the smaller mantissa part M of the mantissa parts M of OPl and OF2. The selection data of the selector 16 is supplied to the right shifter 17. The right shifter 11 converts the selection data of the selector 16 into the subtraction result of the subtracter 13 (
That is, the number of digits indicated by the difference between the exponents OPl and OF2 is also shifted to the right to align the digits with the mantissa part M having the larger exponent. The mantissa digit alignment process described above is the first stage (referred to as equalization) of floating point arithmetic.

セレクタ15の選択データはn+2桁の加減算器18の
六入力に供給される。加減算器18の8入力には、右シ
フタ11の出力データが供給される。加減算器18は、
位取りを合わされた仮数部Mの加算または減算を、演算
モード信号ADDIに応じて実行する。以上の仮数部加
減算が浮動小数点演算の第2段階である。
The selection data of the selector 15 is supplied to six inputs of an (n+2) digit adder/subtractor 18. The output data of the right shifter 11 is supplied to eight inputs of the adder/subtractor 18 . The adder/subtractor 18 is
Addition or subtraction of the scaled mantissa part M is performed according to the operation mode signal ADDI. The above mantissa addition and subtraction is the second stage of floating point operations.

次に、浮動小数点演算の第3段階である丸め/反転(負
から正への変換)について説明する。
Next, rounding/inversion (conversion from negative to positive), which is the third stage of floating point arithmetic, will be explained.

加減算器18のn+2桁の出力データ(仮数部加減算結
果)の一部りである60桁の全ビット、dn−1桁の最
上位ビットdn−IM S B 、 gO桁の最上位ビ
ットaOM S B、および01桁の最上位ビットgI
M S Bは、上記演算モード信号ADD1および加減
算器18のキャリー出力(Co )と共に、制御回路3
2に供給される。制御回路32は、これら入力データに
応じ、丸め或は負から正への変換のための補正データの
一部(即ち、ビットデータIs、In−2゜1n−1、
1(] ) 、および加減算器31の演算モードを指定
する演算モード信号ADD3を出力する。
All bits of 60 digits that are part of the n+2 digit output data (mantissa addition/subtraction result) of the adder/subtractor 18, the most significant bit of dn-1 digit dn-IM S B, the most significant bit of gO digit aOM S B , and the most significant bit gI of the 01 digit
MSB is output from the control circuit 3 along with the arithmetic mode signal ADD1 and the carry output (Co) of the adder/subtractor 18.
2. According to these input data, the control circuit 32 generates part of the correction data for rounding or conversion from negative to positive (i.e., bit data Is, In-2°1n-1,
1(] ) and an arithmetic mode signal ADD3 specifying the arithmetic mode of the adder/subtracter 31.

制御回N32から出力されるビットデータll1lは、
加減算器31の六入力の最上位ビットCに供給される。
The bit data ll1l output from the control circuit N32 is
It is supplied to the most significant bit C of the six inputs of the adder/subtractor 31.

同じくビットデータIn−2、In−1、[は、加減1
1ii131のA入力のdn−2,dn−1,gO桁の
最下位ビットdn−2L S B 、 dn−IL S
 B 、 OOL S Bに供給される。また、加減算
器31の六入力のdO〜dn−3桁並びに01桁の全ビ
ット、およびdn−2,dn−1,gO桁の上位m71
ピツトには、固定値0が供給される。
Similarly, bit data In-2, In-1, [ is addition/subtraction 1
1ii131 A input's dn-2, dn-1, gO digit's least significant bit dn-2LSB, dn-ILS
B, supplied to OOLSB. In addition, all bits of dO to dn-3 digits and 01 digit of the six inputs of the adder/subtractor 31, and the upper m71 of dn-2, dn-1, and gO digits
A fixed value of 0 is supplied to the pit.

一方、加減算器31の8入力の下位n+2桁には、加減
算器18のn+2桁の出力データが供給され、8入力の
最上位ビットには固定値0が供給される。
On the other hand, the lower n+2 digits of the 8 inputs of the adder/subtractor 31 are supplied with the output data of the n+2 digits of the adder/subtractor 18, and the fixed value 0 is supplied to the most significant bit of the 8 inputs.

また、加減算器31のM入力には、制御回路32がら出
力される演算モード信号ADD3が供給される。
Furthermore, an arithmetic mode signal ADD3 outputted from the control circuit 32 is supplied to the M input of the adder/subtractor 31.

加減算器31は、A、8人力間の加算または減算を演算
モード信号ADD3に応じて実行する。
The adder/subtractor 31 performs addition or subtraction between A and 8 manual inputs according to the calculation mode signal ADD3.

演算モード信号ADD3は、第3因から明らかなように
、演算モード信号ADD1および加減算器18からのキ
ャリー出力(CO)により決定される。具体的には演算
モード信号ADD3は、ADDi =Co −0の場合
だけ即ち加減算器18の演算(減算)結果が負の場合だ
けOとなる。これにより、加減算器31に対して減算(
負から正への変換)が指示される。一方、加減算器18
の演算結果が負でない場合には、ADD3は1となり、
加減算器31に対し加算(丸め)が指示される。
As is clear from the third factor, the calculation mode signal ADD3 is determined by the calculation mode signal ADD1 and the carry output (CO) from the adder/subtractor 18. Specifically, the calculation mode signal ADD3 becomes O only when ADDi =Co -0, that is, only when the calculation (subtraction) result of the adder/subtractor 18 is negative. This causes the adder/subtractor 31 to perform subtraction (
(conversion from negative to positive) is indicated. On the other hand, adder/subtractor 18
If the operation result is not negative, ADD3 becomes 1,
Addition (rounding) is instructed to the adder/subtractor 31.

ビットデータla+は、演算モード信号ADD3と同様
に、演算モード信!ADD1および加減算器18からの
キャリー出力(Go )により決定される。具体的には
■―は、ADDl−Coの場合に1、それ以外の場合に
はOとなる。これは加減算器18で加算が行なわれた場
合、その加減算器18からのキャリーが加減算器31の
六入力の最上位ビットに与えられることを示す。また、
加減算器18で減算が行なわれた場合、加減算器18か
らのキャリーのレベル反転データが加減算器31の六入
力の最上位ビットに与えられることを示す。なお、減算
の場合には、キャリー発生で結果が正、キャリーなしで
結果が負となり、加算の場合のキャリーとは異なる。明
らかなようにla+は、第6図に示した6つのケースの
うち、ケース1およびケース6の場合にのみ1となる。
Bit data la+ is an operation mode signal!, similar to operation mode signal ADD3. It is determined by ADD1 and the carry output (Go) from adder/subtractor 18. Specifically, ■- is 1 in the case of ADDl-Co, and O in other cases. This indicates that when addition is performed in the adder/subtractor 18, the carry from the adder/subtractor 18 is given to the most significant bit of the six inputs of the adder/subtractor 31. Also,
When subtraction is performed in the adder/subtracter 18, the carry level inverted data from the adder/subtracter 18 is given to the most significant bit of the six inputs of the adder/subtracter 31. Note that in the case of subtraction, the result is positive if a carry occurs, and the result is negative if there is no carry, which is different from the carry in the case of addition. As is clear, la+ is 1 only in case 1 and case 6 among the six cases shown in FIG.

ビットデータI n−2は、第3図に示すように、演算
モード信号ADD1、加減算器18からのキャリー出力
(Go )および加減算器18の出力データのdn−1
桁の最上位ビットdn−IM S Bにより決定される
。具体的にはI n−2は、ADDi −Co =1の
場合にdn−IM S 8に一致し、それ以外ではOと
なる。即ち第6図に示した6つのケースのうちケース1
の場合ニノミ、In−1としてdn−1M S Bが用
いられる。
As shown in FIG. 3, the bit data I n-2 includes the operation mode signal ADD1, the carry output (Go) from the adder/subtractor 18, and the output data dn-1 of the adder/subtractor 18.
The most significant bit of the digit is determined by dn-IMSB. Specifically, I n-2 matches dn-IM S 8 when ADDi −Co =1, and becomes O otherwise. That is, case 1 of the six cases shown in Figure 6
In this case, dn-1M SB is used as In-1.

ごットデータi n−1は、第3図に示すように、演算
モード信号ADD1、加減算器18からのキャリー出力
(Co)、加減算器18の出力データのd。
As shown in FIG. 3, the total data in-1 includes the operation mode signal ADD1, the carry output (Co) from the adder/subtractor 18, and the output data d of the adder/subtractor 18.

桁の全ビット、および加減算器18の出力データの90
桁の最上位ビットgOM S Bにより決定される。
All bits of the digit and 90 of the output data of the adder/subtractor 18
Determined by the most significant bit of the digit gOM_SB.

j1体的に4trn−1は、ADD1≠Co  (加減
算器18で加算が行なわれキャリー発生なし、または加
減算器18で減算が行なわれキャリーが発生)で且  
   1つdO≠Oの場合にΩ0M5Bに一致し、それ
以外の場合にOとなる。即ち第6図に示した6つのケー
スのうち、ケース2.3の場合にのみ、l n−1とし
てgOM S Bが用いられる。
j1 Overall, 4trn-1 is ADD1≠Co (addition is performed in the adder/subtractor 18 and no carry occurs, or subtraction is performed in the adder/subtractor 18 and a carry occurs) and
If one dO≠O, it matches Ω0M5B, and in other cases it becomes O. That is, among the six cases shown in FIG. 6, gOM S B is used as l n-1 only in case 2.3.

ビットデータIaは、l n−1と同様に、演算モード
信号ADD1 、加減算器18からのキャリー出力(G
o)、加減算器18の出力データの60桁の全ビット、
および加減算器18の出力〜データの90桁の最上位ビ
ットgOM S Bにより決定される。具体的にはI(
7は、ADD1≠Go  (加減算器18で加算が行な
われキャリー発生なし、または加減算器18で減算が行
なわれキャリーが発生)で且つdO−0の場合にglM
SBに一致し、それ以外の場合にOとなる。即ち第6図
に示した6つのケースのうち、ケース4,5の場合にの
み、IaとしてaIM S Bが用いられる。
Similar to ln-1, the bit data Ia is generated by the operation mode signal ADD1 and the carry output (G
o) All 60-digit bits of the output data of the adder/subtractor 18,
and the output of the adder/subtractor 18 to the most significant bit gOMSB of the 90 digits of data. Specifically, I(
7 is glM when ADD1≠Go (addition is performed in the adder/subtractor 18 and no carry occurs, or subtraction is performed in the adder/subtractor 18 and a carry occurs) and dO−0.
Matches SB, otherwise O. That is, among the six cases shown in FIG. 6, aIM SB is used as Ia only in cases 4 and 5.

上記した加減算器31に対する制御回路32の制御内容
を、加減算器18の演算モード(加算/減算)、加減算
器18のキャリー出力(CO)および加減算器18の出
力データの60桁と対応させて第3表に示す。
The control contents of the control circuit 32 for the adder/subtractor 31 described above are made in correspondence with the operation mode (addition/subtraction) of the adder/subtractor 18, the carry output (CO) of the adder/subtractor 18, and the 60 digits of the output data of the adder/subtractor 18. It is shown in Table 3.

第3表 ※: r rreIevant en: [n −2,In −L  1Gの各項目でe
nとあるのは、dn−1MS8゜aOMsB、 glM
sBであることを示す。
Table 3*: r rreIevent en: [n -2, In -L e in each item of 1G
n means dn-1MS8゜aOMsB, glM
Indicates that it is sB.

加減算器31では、第3表に示す制御回路32の制御動
作により、A、B入力内容間の加算(丸め)または減算
(負から正への変換)が次のように行なわれる。
In the adder/subtractor 31, addition (rounding) or subtraction (conversion from negative to positive) between the A and B input contents is performed as follows by the control operation of the control circuit 32 shown in Table 3.

(1)加減算器18で加算が行なわれ、キャリーが発生
した場合(第6図のケース1に相当)この場合、加減算
器31の六入力に供給される補正データのうち、最上位
ビットCが1となり、dn−2桁の最下位ビットdn−
2LSBが加減算器18の出力データのdn−1桁の最
上位ビットdn−IM S Bに一致し、それ以外は固
定的に0となる。加減算器31は、六入カデータ(補正
データ)と、B入力データ即ち加減算51gのn+2桁
の出力データの上位にO(1ピツト)が付加されたデー
タとの加算を行なう。8入力の最上位ビットCはOであ
り、したがって加減算器31からキャリーが発生するこ
とはなく、また六入力の最上位ビットCが1であること
から加減算器31の出力データの最上位ビットCは1と
なる。この1は加減算器18の加算動作でのキャリー発
生を正しく反映したものである。
(1) When addition is performed in the adder/subtractor 18 and a carry occurs (corresponds to case 1 in FIG. 6) In this case, of the correction data supplied to the six inputs of the adder/subtractor 31, the most significant bit C is 1, and the least significant bit of dn-2 digits dn-
The 2LSB matches the most significant bit dn-IMSB of the dn-1 digit of the output data of the adder/subtractor 18, and the other bits are fixedly set to 0. The adder/subtractor 31 adds the six-input data (correction data) to the B input data, that is, the n+2 digit output data of the adder/subtractor 51g, with O (1 pit) added to the upper part. The most significant bit C of the 8 inputs is O, so no carry occurs from the adder/subtractor 31, and since the most significant bit C of the 6 inputs is 1, the most significant bit C of the output data of the adder/subtractor 31 becomes 1. This 1 correctly reflects the occurrence of a carry in the addition operation of the adder/subtractor 18.

また加減算器18の出力データのdn−1桁の最上位ビ
ットdn−IM S Bが、A人力データのdn−2桁
の最下位ビットdn−2L3 Bとして用いられるため
、加減算器18の出力データのdn−2桁の最下位ビッ
トに、次のdn−1桁の最上位ビットdn−1M S 
Bが加えられ、丸めが行なわれる。この動作は、第6因
のケース1において、記号ムで示されるビット位置(d
n−1桁の最上位ビット)のデータをセレクタ22経出
で加減算器21のキャリー人力として丸めを行なう場合
と等価である。
Furthermore, since the most significant bit dn-IM S B of the dn-1 digit of the output data of the adder/subtractor 18 is used as the least significant bit dn-2L3B of the dn-2 digit of the A manual data, the output data of the adder/subtractor 18 dn-2 digit least significant bit, next dn-1 digit most significant bit dn-1M S
B is added and rounding is performed. This operation is performed in case 1 of the sixth factor, at the bit position (d
This is equivalent to the case where the data of the n-1 digit (most significant bit) is rounded by the selector 22 and the adder/subtracter 21 as a carry.

(a 加減算器18で加算が行なわれ、キャリーが発生
しなかった場合(第6図のケース2に相当)この場合、
加減算器31の六入力に供給される補正データのうち、
dn−1桁の最下位ビットdn−1しSBが加減算器1
8の出力データの00桁の最上位    1ビットaO
M S 8に一致し、それ以外は固定的に0となる。加
減算器31は、六入力データ(補正データ〉と、B入力
データ即ち加減算器18のn+2桁の出力データの上位
にO(1ピツト)が付加されたデータとの加算を行なう
。A、8人力の最上位ビットCはいずれもOであり、し
たがって加減算器31からキャリーが発生することはな
い。また加減算器18の出力データの00桁の最上位ビ
ットgOM8Bが、六入カデータのdn−1桁の最下位
ビットdn−ILSBとして用いられるため、加減算器
18の出力データのdn−1桁の最下位ビットに、次の
00桁の最上位どットaOM S 8が加えられ、丸め
が行なわれる。この動作は、第6図のケース2において
、記号ムで示されるビット位置(00桁の最上位ビット
)のデータをセレクタ22経出で加減算器21のキャリ
ー人力として丸めを行なう場合と等価である。
(a) When addition is performed in the adder/subtractor 18 and no carry occurs (corresponding to case 2 in Figure 6), in this case,
Among the correction data supplied to the six inputs of the adder/subtractor 31,
The least significant bit of dn-1 digit dn-1 and SB are adder/subtractor 1
The most significant 1 bit aO of the 00 digit of the output data of 8
Matches M S 8, and otherwise is fixedly set to 0. The adder/subtractor 31 adds the six input data (correction data) and the B input data, that is, the n+2 digit output data of the adder/subtractor 18 with O (1 pit) added to the upper part. The most significant bits C of are both O, so no carry occurs from the adder/subtractor 31. Also, the most significant bit gOM8B of the 00 digit of the output data of the adder/subtractor 18 is the dn-1 digit of the 6-input data. Since it is used as the least significant bit dn-ILSB of the adder/subtractor 18, the most significant bit of the next 00 digit is added to the least significant bit of the dn-1 digit of the output data of the adder/subtractor 18, and rounding is performed. This operation is equivalent to the case where the data at the bit position indicated by the symbol M (the most significant bit of the 00 digit) is rounded as a carry of the adder/subtractor 21 through the selector 22 in case 2 of FIG. be.

(3加減算器18で減算が行なわれ、その結果の60桁
の内容が0でなく且つキャリーが発生した(結果が正の
)場合(第6図のケース3に相当)この場合、加減算器
31の六入力に供給される補正データのうち、dn−1
桁の最下位ビットdn−ILSBが加減算器18の出力
データの00桁の最上位ビットaOM S Bに一致し
、それ以外は固定的にOとなる。加減算器31は、六入
カデータ(補正データ)と、8入カデータ即ち加減算器
18のn+2桁の出力データの上位にO(1ピツト)が
付加されたデータとの加算を行なう。A、8入力の最上
位ごットCはOであり、したがって加減算器31からキ
ャリーが発生することはない。また加減算器18の出力
デニタの00桁の最上位ビット(IOM S Bが、六
入カデータのdn−1桁の最下位ビットdn−I L 
S Bとして用いられるため、加減算器18の出力デー
タのdn−1桁の最下位ビットに、次の00桁の最上位
ビットQQM 8 Bが加えられ、丸めが行なわれる。
(3) When subtraction is performed in the adder/subtractor 18 and the content of the 60 digits of the result is not 0 and a carry occurs (the result is positive) (corresponding to case 3 in FIG. 6), in this case, the adder/subtractor 31 Of the correction data supplied to the six inputs of dn-1
The least significant bit dn-ILSB of the digit matches the most significant bit aOM S B of the 00 digit of the output data of the adder/subtractor 18, and the other bits are fixed to O. The adder/subtractor 31 adds the 6-input data (correction data) and the 8-input data, that is, the n+2-digit output data of the adder/subtractor 18 with O (1 pit) added to the upper part. The most significant bit C of the 8 inputs A and 8 is O, so no carry is generated from the adder/subtractor 31. Also, the most significant bit of the 00 digit of the output data of the adder/subtractor 18 (IOM S B is the least significant bit of the dn-1 digit of the six-input data, dn-I L
Since it is used as S B, the most significant bit of the next 00 digit QQM 8 B is added to the least significant bit of the dn-1 digit of the output data of the adder/subtractor 18, and rounding is performed.

この動作は、M6図のケース3において、記号ムで示″
されるビット位置(+110桁の最上位ビット)のデー
タをセレクタ22経由で加減算器21のキャリー人力と
して丸めを行なう場合と等価である。
This operation is shown by the symbol M in case 3 of diagram M6.
This is equivalent to the case where the data at the bit position (most significant bit of +110 digits) is manually rounded as a carry of the adder/subtractor 21 via the selector 22.

(4)  加減算器18で減算が行なわれ、その結果の
60桁の内容が0で且つキャリーが発生した(結果が正
の)場合(第6図のケース4.5に相当)この場合、加
減算器31の六入力に供給される補正データのうち、0
0桁の最下位ビット(IOLsBが加減算器18の出力
データのg1桁の最上位ビット(IIMSBに一致し、
それ以外は固定的にOとなる。加減算器31は、A入力
データ(補正データ)と、B人力データ即ち加減算器1
8のn+2桁の出力データの上位にO(1ビット)が付
加されたデータとの加算を行なう。A、8入力の最上位
ヒツトCは0であり、したがって加減算器31からキャ
リーが発生することはない。また加減算器18の出力デ
ータの91桁の最上位ビット!lIIM S Bが、A
入力データの90桁の最下位ビットgOLSBとして用
いられるため、加減算器18の出力データの90桁の最
下位ビットに、次の91桁の最上位ビット!IIIMs
Bが加えられ、丸めが行なわれる。この動作は、第6図
のケース4,5において、記号ムで示されるビット位置
(1111桁の最上位ビット)のデータをセレクタ22
9由で加減算器21のキャリー人力として丸めを行なう
場合と等価である。なお、加減算器18で減算が行なわ
れ、その結果のdoおよび61桁の内容がOで且つキャ
リーが発生しなかった場合(第6因のケース5に相当)
は、浮動小数点データOP1.OP2の指数部の差が0
か1の場合であり、このときにはΩ1桁は必ず0である
。しだがって、上記したように91桁の最上位ビットg
IM SBで丸めを行なっても再環問題は生じない。
(4) When subtraction is performed in the adder/subtractor 18 and the content of the 60th digit of the result is 0 and a carry occurs (the result is positive) (corresponding to case 4.5 in Figure 6), in this case, the addition/subtraction Of the correction data supplied to the six inputs of the device 31, 0
The least significant bit of the 0th digit (IOLsB matches the most significant bit of the g1th digit (IIMSB) of the output data of the adder/subtractor 18,
Otherwise, it is fixed to O. The adder/subtractor 31 inputs A input data (correction data) and B human data, that is, the adder/subtractor 1.
The output data of n+2 digits of 8 is added with data in which O (1 bit) is added to the upper part. The most significant hit C of the 8 inputs A and 8 is 0, so no carry is generated from the adder/subtractor 31. Also, the most significant bit of the 91st digit of the output data of the adder/subtractor 18! IIM S B is A
The 90 least significant bits of the input data are used as gOLSB, so the 90 least significant bits of the output data of the adder/subtractor 18 are the most significant bits of the next 91 digits! IIIMs
B is added and rounding is performed. This operation, in cases 4 and 5 in FIG.
This is equivalent to the case where rounding is performed manually using the carry of the adder/subtractor 21 with 9 reasons. In addition, when subtraction is performed in the adder/subtractor 18, the resulting do and the contents of the 61st digit are O, and no carry occurs (corresponding to case 5 of the 6th factor)
is floating point data OP1. The difference in the exponent part of OP2 is 0
or 1, and in this case, the first digit of Ω is always 0. Therefore, as mentioned above, the most significant bit g of the 91st digit
Rounding with IMSB does not cause recirculation problems.

(5)加減算器18で減算が行なわれ、キャリーが発生
しなかった(結果が負の)場合(第6図のケース6に相
当) この場合、加減算器31の六入力に供給される補正デー
タのうち、最上位ビットCが1となり、それ以外は固定
的にOとなる。加減算器31は、A入力データ(補正デ
ータ)から、B入力データ、即ち加減算器18のn+2
桁の出力データの上位に0(1ビット)が付加されたデ
ータを減じる。加減算器31の減算結果は、六入力の最
上位ビットCが1.8入力の最上位ビットがOであるこ
とから109・t: 7.: A A 、+) (7)
 l Q (7)°“21“015   することから
加減算器18の負出力データが正データに変換される。
(5) When subtraction is performed in the adder/subtractor 18 and no carry occurs (the result is negative) (corresponds to case 6 in FIG. 6) In this case, the correction data supplied to the six inputs of the adder/subtractor 31 Among them, the most significant bit C is set to 1, and the other bits are fixedly set to O. The adder/subtractor 31 converts the A input data (correction data) into B input data, that is, n+2 of the adder/subtractor 18.
Subtract data with 0 (1 bit) added to the upper part of the digit output data. The subtraction result of the adder/subtractor 31 is 109·t: 7. Since the most significant bit C of the 6 inputs is 1.8 and the most significant bit of the input is O. : AA, +) (7)
l Q (7)°"21"015 Therefore, the negative output data of the adder/subtractor 18 is converted into positive data.

以上が、浮動小数点演算の第3段階である丸め/反転(
負から正への変換)の動作である。
The above is the third stage of floating-point operations, rounding/inversion (
(conversion from negative to positive).

最後に、浮動小数点演算の第4段階である正規化につい
て説明する。
Finally, normalization, which is the fourth stage of floating point arithmetic, will be explained.

加減算器31の1ビット+(n+2)桁の正の出力デー
タは、LZD検出器33および左シフタ34に供給され
る。LZD検出器33は、加減算器31の出力データの
リーディングゼロ桁′の桁数を検出する。
The 1-bit+(n+2) digit positive output data of the adder/subtractor 31 is supplied to the LZD detector 33 and left shifter 34. The LZD detector 33 detects the number of leading zero digits of the output data of the adder/subtractor 31.

この際、LZD検出器33は、加減算器31の出力デー
タの最上位°の1ビットを、それだけで最上位の1桁と
して扱う。即ち、LZD検出器33は、n+3桁のデー
タのリーディングゼロ桁の桁数のカウンタとして動作す
る。左シフタ34は、LZ[)検出器33で検出された
リーディングゼロ桁の桁数だけ加減算器31の出力デー
タを左シフトし、その上位の0桁を出力する。この左シ
フタ34からの0桁の出力データは、浮動小数点データ
OP1.OP2の浮動小数点演算結果の正規化された仮
数部を示す。
At this time, the LZD detector 33 treats the most significant bit of the output data of the adder/subtractor 31 as the most significant digit. That is, the LZD detector 33 operates as a counter for the number of leading zero digits of n+3 digit data. The left shifter 34 shifts the output data of the adder/subtractor 31 to the left by the number of leading zero digits detected by the LZ[ ) detector 33, and outputs the upper zero digit. The 0-digit output data from this left shifter 34 is floating point data OP1. The normalized mantissa part of the floating point operation result of OP2 is shown.

さて、左シフタ34で左シフトが行なわれた場合、セレ
クタ14によって選択された指数部Eの値から、左シフ
タ34の左シフト桁数だけ減じて、仮数部正規化に伴う
指数部補正を行なう必要がある。但し、これだけでは、
正しい指数より1桁少ない値となってしまうので、セレ
クタ14によって選択された指数部Eの値に予め1を加
えるようにしている。
Now, when a left shift is performed by the left shifter 34, the value of the exponent part E selected by the selector 14 is subtracted by the number of left shift digits of the left shifter 34, and the exponent part correction accompanying the mantissa part normalization is performed. There is a need. However, with this alone,
Since the value would be one digit less than the correct exponent, 1 is added in advance to the value of the exponent part E selected by the selector 14.

これは以下の理由による。即ち、この例では、LZD検
出器33で検出されるリーディングゼロ桁の桁数には仮
数部の最上位に拡張された1桁(1ビット)も含まれる
。このため、たとえ仮数部の桁数が加減算器18.31
による演算の前後で変わらなかったとしても、リーディ
ングゼロ桁の桁数は1とカウントされるからである。言
替えれば、この例ではリーディングゼロ桁数は1桁多く
カウントされるからである。上記拡張桁分の指数部補正
は、加算器35によって行なわれる。即ち、加算器35
は、セレクタ14によって選択された指数部E(浮動小
数点データOP1.OP2の指数部Eのうち大きい方の
指数部E)の値に固定値1を加える。減算器36は、加
算器35の出力データ(即ち+1補正された指数部)か
ら、LZD検出器33で検出されたリーディングゼロ桁
の桁数だけ減じる。この減算器36の出力データは、浮
動小数点データOP1゜○P2の浮動小数点演算結果の
指数部Eを示す。
This is due to the following reasons. That is, in this example, the number of leading zero digits detected by the LZD detector 33 includes one digit (one bit) extended to the most significant part of the mantissa. Therefore, even if the number of digits in the mantissa is 18.31
This is because the number of leading zero digits is counted as 1 even if it does not change before and after the operation. In other words, in this example, the number of leading zero digits is counted as one more digit. The exponent part correction for the extended digits is performed by the adder 35. That is, adder 35
adds a fixed value 1 to the value of the exponent part E selected by the selector 14 (the larger exponent part E of the exponent parts E of the floating point data OP1 and OP2). The subtracter 36 subtracts the number of leading zero digits detected by the LZD detector 33 from the output data of the adder 35 (that is, the exponent part corrected by +1). The output data of the subtracter 36 indicates the exponent part E of the floating point operation result of the floating point data OP1°○P2.

したがって、加減算器18で加算が行なわれキャリーが
発生した場合、或は加減算器31での丸めによってその
出力データの最上位ビットに1が立った場合には、LZ
D検出器33で検出されるリーディングゼロ桁の桁数は
Oとなり、加算器35による+1補正結果が、そのまま
浮動小数点演算結果の指数部Eとなる。
Therefore, if the adder/subtracter 18 performs addition and a carry occurs, or if the most significant bit of the output data is set to 1 due to rounding in the adder/subtracter 31, LZ
The number of leading zero digits detected by the D detector 33 is O, and the +1 correction result by the adder 35 directly becomes the exponent part E of the floating point arithmetic result.

上記したように、この実施例によれば、■ 丸め或は負
から正への変換用の加減算器31の処理データ長を、従
来の0桁から〈上位に1ビット)下位に2桁拡張し、仮
数部加減算用加減算器18の状態に応じて(即ち第6図
の各ケースに応じて)下位の3桁のLSBのいずれかに
、該5桁の1つ下位桁のMSBを加算できるようにして
いるので、丸め用のデータを最下位ビットから出力する
ためのシフタ(第5図のシフタ19)を必要としない。
As described above, according to this embodiment, ■ the processing data length of the adder/subtractor 31 for rounding or conversion from negative to positive is extended from the conventional 0 digits to the lower digits (1 bit in the upper part); , the MSB of one lower digit of the five digits can be added to any of the lower three LSB digits depending on the state of the adder/subtractor 18 for mantissa addition/subtraction (that is, depending on each case in FIG. 6). Therefore, there is no need for a shifter (shifter 19 in FIG. 5) for outputting rounding data from the least significant bit.

■ この種シフタが不要であることから、指数補正デー
タ切替え用のセレクタ(第5図のセレクタ23)が不要
となる。
(2) Since this type of shifter is not required, a selector for switching index correction data (selector 23 in FIG. 5) is not required.

■ 丸め或は負から正への変換用の加減算器31の処理
データ長を、従来の0桁から上位に1ビット(下位に2
桁)拡張し、キャリーによって拡張される桁を含めて予
め演算を行なうようにしているので、丸め時のキャリー
発生が防止できる。
■ The processing data length of the adder/subtractor 31 for rounding or conversion from negative to positive has been changed from the conventional 0 digit to 1 bit in the upper part (2 bit in the lower part).
Since the calculation is performed in advance including the digits to be extended by carry, the occurrence of carries during rounding can be prevented.

■ 上記■により、仮数部正規化用のシフタに右シフト
機能をもたせる必要がなくなる。
■ Due to the above (■), it is no longer necessary to provide the shifter for mantissa normalization with a right shift function.

■ 上記■により、指数部演算用には加減算器(第5図
の加減算器28)でなく減算器(減算器36)でよい。
(2) According to the above (2), a subtracter (subtractor 36) may be used instead of an adder/subtractor (adder/subtractor 28 in FIG. 5) for exponent calculation.

■ 上記■により、第5図に示すように丸め用の加減算
器21からのキャリー発生を検出してシフタ26、加減
算器28を制御する制御回路27のような回路が不要と
なる。                  1なお、
前記実施例では、加減算器31の処理データ長が1ビッ
ト+(n+2)折であるものとして説明したが、n+3
桁であってもよい。この場合、どットデータ1mを、加
減算器のへ人力の最上位桁の最下位ビット位置に供給し
、残りの上位ビット位置に固定値Oを供給すればよい。
(2) The above (2) eliminates the need for a circuit such as the control circuit 27 that detects the occurrence of a carry from the rounding adder/subtractor 21 and controls the shifter 26 and the adder/subtractor 28, as shown in FIG. 1. Furthermore,
In the above embodiment, the processing data length of the adder/subtractor 31 was explained as being 1 bit + (n+2) times, but
It may be a digit. In this case, it is sufficient to supply the dot data 1m to the least significant bit position of the most significant digit of the adder/subtractor, and supply the fixed value O to the remaining upper bit positions.

また、前記実施例では、ガードディジットが2桁である
場合について説明したが、これに限るものではない。
Further, in the embodiment described above, the case where the guard digit is two digits has been described, but the invention is not limited to this.

もし、ガードディジットが9桁の場合には、丸め或は負
から正への変換用の加減算器の処理データ長を1ビット
(桁)+ (n+Q)桁とし、仮数部正規化用の左シフ
タの入力をn+g+1桁とすればよい。
If the guard digit is 9 digits, the processing data length of the adder/subtracter for rounding or conversion from negative to positive should be 1 bit (digit) + (n+Q) digits, and the left shifter for mantissa normalization should be The input may be n+g+1 digits.

[発明の効果] 以上詳述したようにこの発明によれば、丸め(および負
から正への変換ン用の加減算器へのキャリー人力を不要
にでき、しかめ丸めによる同加減算器からのキャリーの
発生をなくすことができる。この結果、仮数部加減算用
の加減算器と丸め(および負から正への変換)用の加減
算器との間に従来設けられていたシフタなと各種回路を
不要とすることができ、回路構成の簡略化が図れる。
[Effects of the Invention] As detailed above, according to the present invention, it is possible to eliminate the need for rounding (and carry to the adder/subtractor for negative to positive conversion), and it is possible to eliminate the need for carry from the adder/subtractor due to rounding. This eliminates the need for shifters and various other circuits that were conventionally provided between the adder/subtractor for adding and subtracting the mantissa and the adder/subtractor for rounding (and converting from negative to positive). This allows the circuit configuration to be simplified.

しかも、これら回路(特にシフタ)による処理の遅れが
なくなるため、処理の高速化も図れる。
Moreover, since there is no delay in processing caused by these circuits (particularly shifters), processing speed can be increased.

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

第1図はこの発明の一実施例に係る浮動小数点演算装置
のブロック構成図、第2図は第1図に示す加減算器31
に供給される補正データの構造を示す図、第3図は第1
図に示すill I11回路32の回路構成図、第4図
は浮動小数点データのフォーマットを示す図、−第5図
は従来の浮動小数点演算装置のブロック構成図、第6図
は仮数部加減算用の加減算器の演算結果の分類を示す図
である。 13、36・・・減算器、14〜16・・・セレクタ、
17・・・右シフタ、18.31・・・加減算器、32
・・・制御回路、33・・・リーディングゼロ桁検出器
(LZD検出器)、34・・・左シフタ、35・・・加
算器。 出願人代理人 弁理士 鈴 江 武 彦第1図 第2図 第3図 第6図 矢: irreleVant
FIG. 1 is a block diagram of a floating point arithmetic unit according to an embodiment of the present invention, and FIG. 2 is an adder/subtractor 31 shown in FIG.
Figure 3 shows the structure of the correction data supplied to the
Figure 4 is a diagram showing the format of floating point data, - Figure 5 is a block diagram of a conventional floating point arithmetic unit, and Figure 6 is a block diagram of a conventional floating point arithmetic unit. FIG. 3 is a diagram showing classification of calculation results of an adder/subtractor. 13, 36...subtractor, 14-16...selector,
17... Right shifter, 18.31... Adder/subtractor, 32
... Control circuit, 33... Leading zero digit detector (LZD detector), 34... Left shifter, 35... Adder. Applicant's representative Patent attorney Takehiko Suzue Figure 1 Figure 2 Figure 3 Figure 6 Arrow: irreleVant

Claims (2)

【特許請求の範囲】[Claims] (1)eビットの指数部、1桁がmビット構成のn桁の
仮数部および同仮数部の符号を示す符号部からなる正規
化された第1および第2浮動小数点データ間の加算また
は減算を行ない、正規化された第3浮動小数点データを
出力する浮動小数点演算装置において、 上記第1および第2浮動小数点データの指数部の指数差
を算出する第1減算器と、 この第1減算器の減算結果に応じ、指数の大きい方の浮
動小数点データの指数部を選択する選択手段と、 上記第1減算器の減算結果に応じ、指数の小さい方の浮
動小数点データの仮数部を、上記第1および第2浮動小
数点データの指数の差だけ右シフトして上記第1および
第2浮動小数点データの仮数部の桁合せを行なう桁合せ
手段と、 この桁合せ手段によって桁合せされた上記第1および第
2浮動小数点データの仮数部間の加算または減算を、第
1演算モード信号に応じて行なうn+g桁(gはガード
ディジットの桁数)の第1加減算器と、 この第1加減算器の演算結果が負のときに同演算結果を
正に変換し、負でないときには同演算結果の丸めを行な
うn+g+1桁の第2加減算器であって、上記第1加減
算器の演算結果を一方の入力、第1桁乃至第n+g−4
桁並びに第n+g桁の全ビットおよび第n+g−3桁乃
至第n+g−1桁のそれぞれ上位m−1ビットが0であ
る補正データを他方の入力とし、各入力データ間の加算
または減算を第2演算モード信号に応じて行なう第2加
減算器と、 上記第1加減算器の最上位桁からのキャリー出力、上記
第1加減算器の演算結果の最上位桁の全ビット、下位1
+g桁の各桁毎の最上位ビット、および上記第1演算モ
ード信号に応じ、上記補正データの第n+g−3桁乃至
第n+g−1桁のそれぞれ最下位ビットおよび第0桁(
最上位桁)の内容と上記第2演算モード信号とを決定す
る制御回路と、 上記第2加減算器の演算結果のリーディングゼロ桁の桁
数を検出するリーディングゼロ桁検出器と、 このリーディングゼロ桁検出器によって検出されたリー
ディングゼロ桁の桁数だけ上記第2加減算器の演算結果
を左シフトして上記第3浮動小数点データの仮数部を出
力する、入力がn+g+1桁で出力がn桁の左シフタと
、 上記選択手段によって選択された指数部の指数に1を加
える加算器と、 この加算器の加算結果から上記リーディングゼロ検出器
によって検出されたリーディングゼロ桁の桁数を減じ、
上記第3浮動小数点データの指数部を出力する第2減算
器 とを具備することを特徴とする浮動小数点演算装置。
(1) Addition or subtraction between normalized first and second floating point data consisting of an e-bit exponent part, an n-digit mantissa part with one digit of m bits, and a sign part indicating the sign of the same mantissa part A floating point arithmetic unit that performs normalized third floating point data and outputs normalized third floating point data, a first subtracter that calculates an exponent difference between exponent parts of the first and second floating point data; a selection means for selecting the exponent part of the floating point data having a larger exponent according to the subtraction result of the first subtracter; digit alignment means for aligning the digits of the mantissa parts of the first and second floating point data by shifting the first and second floating point data to the right by the difference in exponents; and a first adder/subtractor of n+g digits (g is the number of digits of the guard digit) that performs addition or subtraction between the mantissa parts of the second floating point data according to the first operation mode signal; A second adder/subtractor of n+g+1 digits converts the result of the same operation into a positive value when the result is negative, and rounds the result of the same operation when the result is not negative, and the result of the operation of the first adder/subtractor is transferred to one input and the second adder/subtractor. 1st digit to n+g-4
digit, all bits of the n+g digit, and correction data in which the upper m-1 bits of each of the n+g-3 digit to n+g-1 digit are 0 are used as the other input, and addition or subtraction between each input data is performed as the second input. a second adder/subtractor that performs operations according to the operation mode signal; a carry output from the most significant digit of the first adder/subtractor; all bits of the most significant digit of the operation result of the first adder/subtractor; and the lower 1
According to the most significant bit of each +g digit and the first calculation mode signal, the least significant bit and the 0th digit (
a control circuit that determines the contents of the most significant digit) and the second operation mode signal; a leading zero digit detector that detects the number of leading zero digits of the operation result of the second adder/subtractor; The operation result of the second adder/subtractor is shifted to the left by the number of leading zero digits detected by the detector and the mantissa part of the third floating point data is output.The input is n+g+1 digits and the output is n digits to the left. a shifter; an adder that adds 1 to the exponent of the exponent part selected by the selection means; and subtracts the number of leading zero digits detected by the leading zero detector from the addition result of the adder;
and a second subtracter that outputs the exponent part of the third floating point data.
(2)上記第1加減算器の演算結果が上記第2加減算器
の一方の入力の下位桁に供給され、その上位桁には0が
供給されることを特徴とする特許請求の範囲第1項記載
の浮動小数点演算装置。
(2) The calculation result of the first adder/subtractor is supplied to the lower digit of one input of the second adder/subtractor, and 0 is supplied to the higher digit. floating point arithmetic unit.
JP59253036A 1984-11-30 1984-11-30 Floating point arithmetic unit Pending JPS61131123A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP59253036A JPS61131123A (en) 1984-11-30 1984-11-30 Floating point arithmetic unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP59253036A JPS61131123A (en) 1984-11-30 1984-11-30 Floating point arithmetic unit

Publications (1)

Publication Number Publication Date
JPS61131123A true JPS61131123A (en) 1986-06-18

Family

ID=17245584

Family Applications (1)

Application Number Title Priority Date Filing Date
JP59253036A Pending JPS61131123A (en) 1984-11-30 1984-11-30 Floating point arithmetic unit

Country Status (1)

Country Link
JP (1) JPS61131123A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6320532A (en) * 1986-07-14 1988-01-28 Hitachi Ltd Floating point arithmetic unit
JPS6371725A (en) * 1986-09-16 1988-04-01 Hitachi Ltd Operation processing device
JPH02294820A (en) * 1989-04-17 1990-12-05 Internatl Business Mach Corp <Ibm> Floating point arithmetic processor and arithmetic processing
JPH02294819A (en) * 1989-04-17 1990-12-05 Internatl Business Mach Corp <Ibm> Floating point arithmetic processor
JPH03142625A (en) * 1989-10-24 1991-06-18 Bipolar Integrated Technol Inc Integrated floating point alu architecture

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6320532A (en) * 1986-07-14 1988-01-28 Hitachi Ltd Floating point arithmetic unit
JPS6371725A (en) * 1986-09-16 1988-04-01 Hitachi Ltd Operation processing device
JPH02294820A (en) * 1989-04-17 1990-12-05 Internatl Business Mach Corp <Ibm> Floating point arithmetic processor and arithmetic processing
JPH02294819A (en) * 1989-04-17 1990-12-05 Internatl Business Mach Corp <Ibm> Floating point arithmetic processor
JPH03142625A (en) * 1989-10-24 1991-06-18 Bipolar Integrated Technol Inc Integrated floating point alu architecture

Similar Documents

Publication Publication Date Title
EP0820005B1 (en) Method and apparatus for computing floating point data
US5128889A (en) Floating-point arithmetic apparatus with compensation for mantissa truncation
JP2013012203A (en) Floating-point adder
JPH04290122A (en) Numerical expression conversion device
US6205462B1 (en) Digital multiply-accumulate circuit that can operate on both integer and floating point numbers simultaneously
US5677861A (en) Arithmetic apparatus for floating-point numbers
JP2689414B2 (en) Floating point representation converter
JPS61131123A (en) Floating point arithmetic unit
JPH10289096A (en) Logic circuit and floating point arithmetic unit
US7668892B2 (en) Data processing apparatus and method for normalizing a data value
JPH0545981B2 (en)
JP2555577B2 (en) Arithmetic unit
JP3295949B2 (en) Floating-point operation method and device
JPH0323937B2 (en)
JP2801472B2 (en) Floating point arithmetic unit
JPH05204606A (en) Floating point arithmetic system and unit
JPH02115926A (en) Floating point normalizing and rounding device
JP2734274B2 (en) Floating point adder / subtracter
JPH0413734B2 (en)
JPH02259927A (en) Floating point multiplier
JPH03102519A (en) Divider
JPH0635670A (en) Floating point adder
JPS63276121A (en) Fixed/floating data converting circuit
JPH05167456A (en) Arithmetic operation circuit
JPS63259720A (en) floating point multiplication circuit