JPS59226944A - Addition and subtraction system of floating point data - Google Patents

Addition and subtraction system of floating point data

Info

Publication number
JPS59226944A
JPS59226944A JP58103152A JP10315283A JPS59226944A JP S59226944 A JPS59226944 A JP S59226944A JP 58103152 A JP58103152 A JP 58103152A JP 10315283 A JP10315283 A JP 10315283A JP S59226944 A JPS59226944 A JP S59226944A
Authority
JP
Japan
Prior art keywords
addition
floating point
subtraction
point data
digit
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.)
Granted
Application number
JP58103152A
Other languages
Japanese (ja)
Other versions
JPH0239809B2 (en
Inventor
Koichi Ueda
上田 孝一
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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP58103152A priority Critical patent/JPS59226944A/en
Publication of JPS59226944A publication Critical patent/JPS59226944A/en
Publication of JPH0239809B2 publication Critical patent/JPH0239809B2/ja
Granted 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
    • 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/499Denomination or exception handling, e.g. rounding or overflow
    • G06F7/49936Normalisation mentioned as feature only

Abstract

PURPOSE:To reduce the addition/subtraction time of the floating point data by checking the presence or absence of an invalid digit in parallel to the execution of addition/subtraction and therefore the shift amount for normalization is fixed at a time point when the result of addition/subtraction is obtained. CONSTITUTION:When mantissa parts of two floating point data are given to registers OP1 and OP2, an adder 5 performs an algebraical addition of the mantissa parts. At the same time, a carry signal is produced to a specific bit position by a carry look-ahead logic mechanism CLAH4. Then valid patterns (00-0, 11- 1, 11-10) are detected for upper digits from an optional bit by a valid digit detection logic mechanism DET3. Then the carry signal obtained by the CLAH4 and the valid pattern information obtained from the DET3 are fed to a shift amount production logic mechanism. Thus a shift amount which shifts the valid digit is obtained in accordance with a logical equation. Then the arithmetic result obtained from the adder 5 is shifted in response to the obtained shift amount. Thus the addition/subtraction is carried out for the floating point data.

Description

【発明の詳細な説明】 (al  発明の技術分野 本発明は、仮数部1.指数部、符号部からなる2つの浮
動小数点データについて、加減算を行い、上位桁に無効
桁が発生した場合に、正規化に必要なシフト量を高速に
求める方式に関す。
Detailed Description of the Invention (al) Technical Field of the Invention The present invention performs addition and subtraction on two floating point data consisting of a mantissa part, an exponent part, and a sign part, and when an invalid digit occurs in the upper digit, Concerning a method for quickly determining the amount of shift necessary for normalization.

山) 技術の背景 仮数部、指数部、符号部からなる2つの浮動小数点デー
タの加減算においては、桁合わせ、仮数部の加算、正規
化が行われる。その為に先ず、2つのオペランドの指数
部が比較され、小さい方の指数部を持った仮数部が右シ
フトされ、16進数として1桁シフトされる毎に、指数
部を1増やし、指数部が一致する迄シフトを続ける。上
記右シフトされる際、最後にシフトアウトされた16進
数の1桁は保護桁として保存される。
Technical background When adding or subtracting two floating point data consisting of a mantissa, an exponent, and a sign, digit alignment, addition of the mantissa parts, and normalization are performed. To do this, first, the exponent parts of the two operands are compared, and the mantissa with the smaller exponent part is shifted to the right, and each time it is shifted by one digit as a hexadecimal number, the exponent part is incremented by 1, and the exponent part is Continue shifting until they match. When shifting to the right, the last digit of the hexadecimal number shifted out is saved as a guard digit.

2つのオペランドの指数部が等しくて、右シフトされな
かった場合、下位の零の1桁が保護桁として付加された
ものと見なされる。
If the exponents of the two operands are equal and are not shifted to the right, one lower zero digit is assumed to have been added as a guard digit.

上記桁合わせ動作において、指数部が一致すると、仮数
部が代数的に加算され、中間和を出力する。この時、仮
数部の加算の結果、桁上がりがあると、中間和は右ヘシ
フトされ、桁上がりが最上位桁となり、指数部に1が加
えられる。
In the above digit alignment operation, when the exponent parts match, the mantissa parts are added algebraically and an intermediate sum is output. At this time, if there is a carry as a result of addition of the mantissa part, the intermediate sum is shifted to the right, the carry becomes the most significant digit, and 1 is added to the exponent part.

この中間和の上位桁に無効パターンがある場合、中間和
は正規化に必要なだけ左シフトされ、最下位桁には零が
はいり、1桁左シフトする毎に、指数部は1だけ減ぜら
れる。
If there is an invalid pattern in the upper digits of this intermediate sum, the intermediate sum is shifted to the left by the amount necessary for normalization, the lowest digit is filled with zero, and the exponent part is decreased by 1 for each digit shifted to the left. It will be done.

本発明は、上記浮動小数点データの加減算方式において
、上位桁に無効パターン(例えば、正数においてはo 
o−−−−−−−o 、  負数においては11−−−
一−・−1)が発生した場合の上記左シフト処理を高速
に行う方式に関連している。
In the above floating point data addition/subtraction method, the present invention provides an invalid pattern (for example, o for positive numbers) in the upper digits.
o------o, 11--- for negative numbers
This relates to a method for performing the above-mentioned left shift processing at high speed when 1-.-1) occurs.

(11,1従来技術と問題点 浮動小数点データの加減算を行った場合、上位桁に無効
桁が発生する場合があり、従来は加減算実行後の結果よ
り、無効桁が有るかどうかを調べていた為、実行時間が
長くなる問題が′あった。
(11.1 Conventional technology and problems When adding or subtracting floating point data, invalid digits may occur in the upper digits. Conventionally, it was checked whether there were invalid digits based on the result after performing addition or subtraction. Therefore, there was a problem of long execution time.

(dl  発明の目的 本発明は上記従来の欠点に鑑み、実際の加減算の実行と
並列に、無効桁の有無を調べ、少なくとも加減算結果が
得られた時点で、正規化の為のシフト量が確定している
方式を提供することを目的とするものである。
(dl Purpose of the Invention In view of the above conventional drawbacks, the present invention examines the presence or absence of invalid digits in parallel with the actual execution of addition/subtraction, and at least determines the shift amount for normalization when the addition/subtraction results are obtained.) The purpose is to provide a method that allows

(el  発明の構成 そしてこの目的は、本発明によれば2つのデータを加算
又は減算し、正規化する浮動小数点加減算回路において
、2つのデータを加算/減算する第1の手段と、2つの
データの特定の連続した部分に対して、下位からのキャ
リーを考えない時に、その特定部分が加減算の結果によ
り、00−・・−・−0パターンになることを検出する
第2の手段と、11・−・−−−−−−−−−4パター
ンになることを検出する第3の手段と、11−−−−−
−−10パターンになることを検出する第4の手段と、
上記第1の手段の1部として、或いはそれとは別にキャ
リー伝搬条件から特定のビット位置に対するキャリーイ
ン信号を作成するキャリー・ルック・アヘッド回路の第
5の手段とを有し、上記第1の手段により作成される加
減算の結果を使用せずに、上記第2〜第5の手段によっ
て、正規化に必要なシフト量を求める方法を提供するこ
とによって達成され、少なくとも加減算結果が得られた
時点で、正規化のためのシフト量も確立している為、浮
動小数点データの演算時間を短縮することが可能となる
According to the present invention, in a floating point addition/subtraction circuit that adds or subtracts two data and normalizes the same, the present invention provides a first means for adding/subtracting two data; 11. A second means for detecting that the specific continuous part becomes a 00-...--0 pattern as a result of addition and subtraction when carrying from a lower order is not considered; ----------- Third means for detecting 4 patterns, and 11--
--Fourth means for detecting that there are 10 patterns;
a fifth means of a carry look ahead circuit for creating a carry-in signal for a specific bit position from a carry propagation condition as a part of the first means or separately; This is achieved by providing a method for determining the shift amount necessary for normalization by the second to fifth means described above without using the addition/subtraction results created by Since the shift amount for normalization is also established, it is possible to shorten the calculation time for floating point data.

(f)  発明の実施例 本発明の主旨は、浮動小数点データの演算結果の無効桁
を早期に検出しようとするものであるが、ある桁より上
位の桁の無効桁は: ■ oo−−−−−−−−−−o・Ci■ 11−−−
−−−−−−−−1 ■ 1t−−〜−−−−・−−−一−・−10・Ciに
よって判定できることは容易に理解できることである。
(f) Embodiments of the Invention The gist of the present invention is to detect invalid digits in the calculation result of floating point data at an early stage, but invalid digits higher than a certain digit are as follows: ■ oo--- ---------o・Ci ■ 11---
It is easy to understand that it can be determined by ----------1 ■ 1t----------1--10.Ci.

但し、こごでCiはキャリー信号を示すものとする。However, here it is assumed that Ci indicates a carry signal.

従って、本発明は2つのオペランドの浮動小数点データ
の演算と並列に、演算結果のある桁より上位の桁につい
て、上記■〜■の無効パターンを検出し、その無効パタ
ーンから正規化の為のシフト量を求める手段に帰着する
Therefore, in parallel with the calculation of the floating point data of the two operands, the present invention detects the invalid patterns of ■ to ■ above for digits higher than a certain digit of the calculation result, and performs the shift for normalization from the invalid pattern. It comes down to the means to find the quantity.

以下本発明の実施例を図面によって詳述する。Embodiments of the present invention will be described in detail below with reference to the drawings.

先ず、無効パターンを検出する手段力・ら8Q明する。First, we will explain the means for detecting invalid patterns.

任意の上位桁がoo−−−−一・・−・−0/々ターン
であることを検出する為には、2つのオペランドOPI
とOP2のそれぞれの連続する3ビ・ノド(An +A
n + L^n+2)と(Bn +Bn+1.Bn+2
 )とG二つし\て、第1図で示す(11〜(5)の演
算のいずれかが論理“1”トナル場合に限られるが、こ
れを前述の(反数部の特定部分(n w m + 1ピ
ツ))&こつむ1てみると、第2図(イ)の論理式で示
される演算結果力<8命理“1”であることを検出すれ
ば良し)。
To detect that any high-order digit is oo----1...-0/2 turns, use the two operands OPI.
and OP2, each successive 3-bit throat (An +A
n + L^n+2) and (Bn +Bn+1.Bn+2
) and two G\, as shown in Figure 1, only if any of the operations (11 to (5)) is a logical "1" tonal, but this can be changed to the specific part of the reciprocal part (n w m + 1 pits)) & Kotsumu 1 It is sufficient to detect that the operation result force shown by the logical formula in FIG. 2 (a) < 8 statement "1").

この論理式を求める過程につむ)てしよ特願昭57−2
29421に開示されているので、ここでしよ省略する
が、特願昭57−229421にお(、%て番よ、2つ
のオペランドデータの最下位ビ・ノドが00又番よ11
の特殊条イ牛(即ち排他的論理和でない)番こ限定され
てしするので、第2図(イ)で示される条件番こしま0
0−・−−−−−−−−。
In the process of finding this logical formula)
29421, so I will omit it here, but in Japanese Patent Application No. 57-229421, the lowest bit and node of the two operand data are 00 and 11.
Since the number of special conditions (i.e., not exclusive OR) is limited, the condition number 0 shown in Figure 2 (a) is
0-・------.

又は11−−−−−−−−−−−−・1の両パターンを
含んでむ)ることになる。従って、2つのオペランドの
加算斧吉果力り00−−−−−−−−−−−0となる条
件に限定するとすれば、2つのオペランドの最下位ビッ
トが排他的論理和でないことが必要であり、第2図(ロ
)に示す論理式の演算結果が論理“1″となる条件とな
る。ここにEは排他的論理和、0は論理和をそれぞれ示
している。
or 11----------1). Therefore, if we limit the condition to such that the sum of the two operands is 00-------0, it is necessary that the least significant bit of the two operands is not an exclusive OR. This is the condition that the calculation result of the logical formula shown in FIG. 2 (b) becomes logic "1". Here, E indicates exclusive OR, and 0 indicates logical OR.

従って、2つのオペランドの加算結果が11−−−−−
−−−1となる条件は、第2図(ロ)の最下位ビットの
論理について、その否定をとり (ハ)で示される論理
式の演算結果が論理“1”であれば良いことになる。
Therefore, the result of addition of the two operands is 11
---The condition for 1 is that the logic of the least significant bit in Figure 2 (b) is negated and the result of the operation of the logical formula shown in (c) is logic "1". .

同様にして、2つのオペランドの加算結果が11−−−
−−−−−−−−10となる条件を求める場合を説明す
ると、この場合は2つのオペランドOPI 、OF2の
それぞれの連続する3ビツト(An 、An + 1+
An + 2 )と(Bn、Bn+1.Bn+2 )に
ついて、第3図に示す(1)〜(5)の演算のいずれか
が論理“l”となる場合に限られ、浮動小数点データの
仮数部の任意の特定部分について見ると、第4図(イ)
で示される論理式の演算結果が論理“1”であることを
検出すれば良く、この論理式は前述の特願昭57−22
9421で開示されている手順と同じ手順を用いること
によって求められる。
Similarly, the addition result of the two operands is 11---
−−−−−−−−10. In this case, each consecutive 3 bits (An, An + 1+
For An + 2 ) and (Bn, Bn+1.Bn+2 ), only when any of the operations (1) to (5) shown in Figure 3 results in logic "l", the mantissa part of floating point data Looking at any specific part, Figure 4 (a)
It is only necessary to detect that the result of the calculation of the logical formula shown by
It is determined by using the same procedure as disclosed in No. 9421.

然して、この論理式においても11−−−−−−−−−
−−4のパターンが含まれているので、上記11・−・
・−IOとなるパターンのみを求める為には、2つのオ
ペランドの最下位ビットが排他的論理和でないことが必
要であり、結局第4図(ロ)で示す論理式の演算結果が
論理“1”となることを検出すれば良いことになる。
However, in this logical formula as well, 11
--Since pattern 4 is included, the above 11.--
・In order to obtain only the pattern that is -IO, it is necessary that the least significant bit of the two operands is not an exclusive OR, and the result of the operation of the logical formula shown in Figure 4 (b) is a logical "1". It is sufficient to detect that ”.

以上は、浮動小数点データの仮数部の任意の特定部分の
パターンがoo−−−−−−−−−−−oか11−−−
−−−−−−−−1か或いは1t−−−−−−−10か
を検出する論理式であるが、上記仮数部の上位桁の無効
桁を判定する為には、上記特定部分の最下位ビットに上
がってくるキャリービットを付加して考える必要があり
、一般にはキャリー伝搬条件から特定のビット位置に対
するキャリーイン信号(Ci)を求めるキャリー・ルッ
ク・アヘッド論理で作成し、この信号と上記無効パター
ンとで、前述の■〜■に示した論理条件を採ることによ
り、上位桁の無効桁の判定ができる。
The above shows that the pattern of any specific part of the mantissa of floating point data is either oo------o or 11---
-------------This is a logical formula for detecting whether it is 1 or 1t---------10, but in order to determine the invalid digits of the upper digits of the mantissa, it is necessary to It is necessary to consider adding a carry bit that goes up to the least significant bit, and generally it is created using carry look ahead logic to find a carry-in signal (Ci) for a specific bit position from the carry propagation conditions, and this signal and By using the above-mentioned invalid pattern and applying the logical conditions shown in (1) to (2) above, it is possible to determine whether the upper digits are invalid.

即ち、■の時は00−−−−−−−−−−0パターンで
あるのでキャリーイン信号’ (Ci)がない場合にの
み、全“0″となり無効桁となる。
That is, in the case of (2), since the pattern is 00-----0, all the digits become "0" and become invalid digits only when there is no carry-in signal' (Ci).

■の時は11− ・−・−1パターンであるのでキャリ
ーイン信号(Ci)が有っても、無くても11−・−−
−−−−一1又はoo−−−−−−・−〇となり無効桁
となる。
In the case of ■, the pattern is 11-・---1, so whether there is a carry-in signal (Ci) or not, 11-・--
------1 or oo-------・-〇, which becomes an invalid digit.

■の時は11−−−−−−−10パターンであるので、
必ずキャリーイン信号(C4)が必要で、キャリーイン
信号(C4)が上がってくると11・−−−−−−−−
−−4となり無効桁となることが判る。
■When it is 11------10 patterns,
A carry-in signal (C4) is always required, and when the carry-in signal (C4) goes up, 11.
--4, which means that it is an invalid digit.

次にシフト量を作成する手段について説明する。Next, the means for creating the shift amount will be explained.

上記検出手段によって、2つの浮動小数点データの仮数
部を加算した結果、無効桁が発生することが判ると、該
仮数部を構成する4ビット単位の16進数の各桁単位で
、その無効桁について左シフトを行い正規化する必要が
ある。
When the detection means detects that an invalid digit occurs as a result of adding the mantissa parts of two floating point data, the invalid digit is determined for each digit of the 4-bit hexadecimal number that makes up the mantissa part. It is necessary to perform a left shift and normalize.

この時のシフト量の作成方法としては、シフト位置が特
定できれば種々考えられるので、特に限定する必要はな
いが、本発明での一実施例を説明すると以下の通りとな
る。
Various methods can be considered for creating the shift amount at this time as long as the shift position can be specified, so there is no need to limit it in particular, but one embodiment of the present invention will be described as follows.

本実施例においては、例えば少なくとも48ビットシフ
ト以上シフトする必要がある場合について、その第1段
階である48ビツトのシフト量をきめる論理式を、第2
図(ロ)(ハ)及び第4図(ロ)を参照しながら、前述
の無効桁判定条件■〜■を考えてまとめると、第5図に
示す論理式が得られ、この論理式による演算結果が論理
“1”になった時、48ピントの左シフトを行うことが
できる。この式の前半かのと■の場合を示し、後半が■
の場合を示している。この論理式においてEおよび■は
排他的論理和、0は論理和、Aは論理積を示す記号であ
り、Ciはキャリーイン信号、6〜51は浮動小数点デ
ータの各桁位置を示している。
In this embodiment, for example, in the case where it is necessary to shift at least 48 bits or more, the logical formula that determines the amount of shift of 48 bits, which is the first stage, is changed to the second stage.
By considering and summarizing the invalid digit determination conditions ■ to ■ while referring to Figures (B), (C), and Figure 4 (B), the logical formula shown in Figure 5 is obtained, and the calculation using this logical formula is When the result is a logic "1", a left shift of 48 points can be performed. The first half of this equation shows the case of ■, and the second half is ■
The case is shown below. In this logical formula, E and ■ are symbols indicating exclusive OR, 0 is a logical OR, A is a symbol indicating logical product, Ci is a carry-in signal, and 6 to 51 indicate each digit position of floating point data.

この例では、浮動小数点データの仮数部は8〜63ビツ
ト(但し保護桁を除く)であって、48ビ・7トのシフ
トを行う仮数部の対象ピント位置は8〜51ビツト迄と
なる。実際には最上位桁での桁上がりビット、符号ビッ
トを有効ビットと考えて4〜51迄の48ビツトが、こ
の場合のシフト対象桁となる。
In this example, the mantissa part of the floating point data is 8 to 63 bits (excluding guard digits), and the target focus position of the mantissa part to be shifted by 48 bits/7 bits is 8 to 51 bits. Actually, considering the carry bit and sign bit of the most significant digit as valid bits, 48 bits from 4 to 51 are the digits to be shifted in this case.

次に、これまで説明してきた無効桁検出機構。Next is the invalid digit detection mechanism that has been explained so far.

キャリー・ルック・アヘッド論理機構、シフト量作成論
理機構を用いた本発明の一実施例を説明する。第6図が
そのブロック図であって、1.2はそれぞれ浮動小数点
データの仮数部を蓄積するレジスタ(OPI 、0P2
) 、 3は上記仮数部の任意の特定部分についてoo
−−−−−−−−−−−o 、 1i−−−−−・−1
、11−−−−−−−10パターンを検出する無効桁検
出論理機構(DET)、4は特定ビット位置に対するキ
ャリー信号を作成するキャリー・ルック・アヘッド論理
機構(CLAH)、5は仮数部の加算器、6は無効桁検
出論理機構(DET )3とキャリー・ルック・アヘッ
ド論理機構(CLAH) 4のデータを用いて無効桁を
4ビット単位でシフトするシフト量を作成するシフト量
作成論理機構、7.8はシフト量作成論理機構6で作成
された複数のシフト信号S48 、 S32 、 S1
6 、 S00及び5S12.5SO8,5SO4,5
SOOによって演算結果をシフトするシフターである。
An embodiment of the present invention using a carry look ahead logic mechanism and a shift amount creation logic mechanism will be described. FIG. 6 is its block diagram, and 1.2 is a register (OPI, 0P2) that stores the mantissa part of floating point data, respectively.
), 3 is oo for any specific part of the mantissa above
−−−−−−−−−−−o, 1i−−−−・−1
, 11 ------- 10 Invalid digit detection logic (DET) that detects patterns, 4 Carry Look Ahead logic (CLAH) that creates a carry signal for a specific bit position, 5 the mantissa part adder, 6 is an invalid digit detection logic (DET) 3 and carry look ahead logic (CLAH) 4 is a shift amount creation logic that creates a shift amount to shift invalid digits in units of 4 bits using the data of 4; , 7.8 are a plurality of shift signals S48, S32, S1 created by the shift amount creation logic mechanism 6.
6, S00 and 5S12.5SO8,5SO4,5
This is a shifter that shifts the calculation result by SOO.

上記シフト信号S48 、 S32 、 S16 、 
SOOは16ビツト差でそれぞれ48ビツト、32ビツ
ト、16ビソト00ビツトシフトさせる時に付勢され、
シフト信号5S12.5SO8,5SO4,5SOOは
4ビツト差でそれぞれ12ヒンH−、os ヒツト04
ビツト、00ビツトシフトさせる時に付勢される。これ
らのシフト信号を組み合わせることによって、任意のシ
フト量(但し4ビット単位)を指定することができる。
The above shift signals S48, S32, S16,
SOO is activated when shifting 48 bits, 32 bits, and 16 bits to 00 bits with a difference of 16 bits, respectively.
The shift signals 5S12.5SO8, 5SO4, and 5SOO have a 4-bit difference of 12 h-, os hit 04, respectively.
It is activated when shifting bits or 00 bits. By combining these shift signals, it is possible to specify an arbitrary shift amount (in units of 4 bits).

この図面において、レジスタ(OPI 、0P2) 1
’+2に2つの浮動小数点データの仮数部が与えられる
と、加算器5で仮数部についての代数的加算が行われる
、と同時にキャリー・ルック・アヘッド論理機構(CL
AH) 4で特定のビット位置に対するキャリー信号が
作成され、無効桁検出論理機構(DET)3で任意のピ
ントから上位の桁につりての無効パターン(OO−−−
−−一・・−0、11−−−−−−−−−4、11−−
−−−−−10パターン)が検出される。
In this drawing, register (OPI, 0P2) 1
'+2 is given the mantissa parts of two floating point data, the adder 5 performs algebraic addition of the mantissa parts, and at the same time the carry look ahead logic (CL
AH) 4 creates a carry signal for a specific bit position, and invalid digit detection logic (DET) 3 detects an invalid pattern (OO----) from an arbitrary focus to the upper digit.
--1...-0, 11-----4, 11--
-----10 patterns) are detected.

続いて、キャリー・ルック・アヘッド論理機構(CLA
H) 4で得られたキャリー信号と無効桁検出論理機構
(DET ) 3で得られた無効パターン情報とがシフ
ト量作成論理機構6において、例えば第5図で示した論
理式(この場合は48ビツトシフトの例)に従って、無
効桁をシフトするシフト量が作成され、加算器5で得ら
れた演算結果を、このシフト量に従ってシフトすること
により浮動小数点データの加減算を行うことができる。
Next, carry look ahead logic (CLA)
H) The carry signal obtained in step 4 and the invalid pattern information obtained in invalid digit detection logic (DET) 3 are processed by the shift amount creation logic 6, for example, using the logical formula shown in FIG. 5 (in this case, 48 According to the bit shift example), a shift amount for shifting invalid digits is created, and by shifting the operation result obtained by the adder 5 according to this shift amount, addition and subtraction of floating point data can be performed.

以上、第1図〜第5図で説明してきたo o−−−−−
−−−−−・0 、11−−−−−−−−−−−1 、
11−−−−−−10パターン検出論理及びシフト量作
成論理は、あくまでも1例であって、この方法に限るも
のでないことはいう迄もない。
The above has been explained using Figures 1 to 5 o o------
------・0, 11----------1,
11--10 The pattern detection logic and shift amount creation logic are just examples, and it goes without saying that the method is not limited to these.

(g)  発明の効果 以上詳細に説明したように、本発明によれば浮動小数点
データによる加減算演算と並列に、ある桁より上位の桁
の無効パターンを検出し、更にその無効パターンを正規
化するためのシフト量を計算し、少なくとも加減算結果
が得られた時点では、上記シフト量が確立しているので
、浮動小数点データの加減算時間を短縮できる効果があ
る。
(g) Effects of the Invention As explained in detail above, according to the present invention, invalid patterns in digits higher than a certain digit are detected in parallel with addition/subtraction operations using floating point data, and the invalid patterns are further normalized. Since the shift amount has been established at least when the addition/subtraction result is obtained by calculating the shift amount for the floating point data, there is an effect that the time required for addition/subtraction of floating point data can be shortened.

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

第1図は00−−−−−−−−0又は1 t−−−−−
−−−−−1パターンの存在を検出する条件を説明する
図、第2図は浮動小数点データの仮数部の特定部分につ
いて、第1図の無効パターンを検出する論理を説明する
図。 第3図は11−−−−−−−10パターンの存在を検出
する条件を説明する図、第4図は浮動小数点データの仮
数部の特定部分について、第3図の無効ノでターンを検
出する論理を説明する図、第5図は無効桁を正規化する
為のシフト量を作成する論理の一実施例を説明する図、
第6図は本発明の一実施例をブロック図で示す図である
。 図面において、EOR、E 、 −V−は排他的論理和
記号、 OR,Oは論理和記号、 AND 、 Aは論
理積記号を示し、1.2はレジスタ(OPI 、0P2
) 、 3は無効桁検出論理機構(DET ) 、 4
はキャリー・ルック・アヘッド論理機構(CLAH) 
、 5は加算器、6はシフト量作成論理機構、7,8は
シフターをそれぞれ示す。
Figure 1 shows 00------0 or 1 t-------
FIG. 2 is a diagram illustrating the logic for detecting the invalid pattern in FIG. 1 with respect to a specific part of the mantissa part of floating point data. Figure 3 is a diagram explaining the conditions for detecting the existence of the 11-------10 pattern, Figure 4 is a diagram for detecting a turn at the invalid node in Figure 3 for a specific part of the mantissa part of floating point data. Figure 5 is a diagram explaining an example of logic for creating a shift amount for normalizing invalid digits.
FIG. 6 is a block diagram showing one embodiment of the present invention. In the drawing, EOR, E, -V- are exclusive OR symbols, OR, O are logical sum symbols, AND, A are logical product symbols, and 1.2 is a register (OPI, 0P2).
), 3 is invalid digit detection logic (DET), 4
is carry look ahead logic (CLAH)
, 5 is an adder, 6 is a shift amount creation logic mechanism, and 7 and 8 are shifters, respectively.

Claims (1)

【特許請求の範囲】[Claims] 2つのデータを加算又は減算し、正規化する浮動小数点
加減算回路において、2つのデータを加算/減算する第
1の手段と、2つのデータの特定の連続した部分に対し
て、下位からのキャリーを考えない時に、その特定部分
が加減算の結果により、00−−−−−−−−0パター
ンになることを検出する第2の手段と、11−−−−−
−−−−−4パターンになることを検出する第3の手段
と、11−−−−−−10パターンになることを検出す
る第4の手段と、上記第1の手段の1部として、或いは
それとは別にキャリー伝搬条件から特定のピント位置に
対するキャリーイン信号を作成するキャリー・ルック・
アヘンド回路の第5の手段とを有し、上記第1の手段に
より作成される加減算の結果を使用せずに、上記第2〜
第5の手段によって、正規化に必要なシフト量を求める
ことを特徴とする浮動小数点データ加減算方式。
In a floating point addition/subtraction circuit that adds or subtracts two data and normalizes the data, a first means for adding/subtracting two data and a carry from a lower order for a specific continuous portion of the two data are used. a second means for detecting that the specific part becomes a 00-------0 pattern as a result of addition and subtraction when not thinking;
-------A third means for detecting that the pattern becomes 4, and a fourth means for detecting that the pattern becomes 11, and as a part of the first means, Alternatively, carry-look
and a fifth means of an adend circuit, and the second to
A floating point data addition/subtraction method characterized in that a shift amount necessary for normalization is determined by the fifth means.
JP58103152A 1983-06-09 1983-06-09 Addition and subtraction system of floating point data Granted JPS59226944A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP58103152A JPS59226944A (en) 1983-06-09 1983-06-09 Addition and subtraction system of floating point data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP58103152A JPS59226944A (en) 1983-06-09 1983-06-09 Addition and subtraction system of floating point data

Publications (2)

Publication Number Publication Date
JPS59226944A true JPS59226944A (en) 1984-12-20
JPH0239809B2 JPH0239809B2 (en) 1990-09-07

Family

ID=14346526

Family Applications (1)

Application Number Title Priority Date Filing Date
JP58103152A Granted JPS59226944A (en) 1983-06-09 1983-06-09 Addition and subtraction system of floating point data

Country Status (1)

Country Link
JP (1) JPS59226944A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61177538A (en) * 1985-01-29 1986-08-09 エイ・テイ・アンド・ティ・コーポレーション Position detection for highest-order numeral
JPS63208938A (en) * 1987-02-26 1988-08-30 Hitachi Ltd Flag generating circuit
JPS63262723A (en) * 1987-04-20 1988-10-31 Matsushita Electric Ind Co Ltd Arithmetic processing method
JPS6486237A (en) * 1987-06-19 1989-03-30 Digital Equipment Corp Apparatus and method for accelerating effective subtraction procedure of floating point by estimation of absolute value of difference in threshold of exponential part
EP0362580A2 (en) * 1988-10-07 1990-04-11 International Business Machines Corporation Leading 0/1 anticipator (LZA)
JPH0357019A (en) * 1989-07-26 1991-03-12 Toshiba Corp Floating-point data adding and subtracting circuit
JPH0362124A (en) * 1989-07-28 1991-03-18 Nec Ic Microcomput Syst Ltd Adding circuit
JPH04278630A (en) * 1991-03-06 1992-10-05 Koufu Nippon Denki Kk Floating point adder/subtractor
JPH07225671A (en) * 1993-12-06 1995-08-22 Internatl Business Mach Corp <Ibm> Result normalization mechanism and method of operation

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS51147932A (en) * 1975-06-02 1976-12-18 Ibm Sum detection logical circuit
JPS5587243A (en) * 1978-12-25 1980-07-01 Fujitsu Ltd Zero detection system of adder output

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS51147932A (en) * 1975-06-02 1976-12-18 Ibm Sum detection logical circuit
JPS5587243A (en) * 1978-12-25 1980-07-01 Fujitsu Ltd Zero detection system of adder output

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61177538A (en) * 1985-01-29 1986-08-09 エイ・テイ・アンド・ティ・コーポレーション Position detection for highest-order numeral
JPS63208938A (en) * 1987-02-26 1988-08-30 Hitachi Ltd Flag generating circuit
JPS63262723A (en) * 1987-04-20 1988-10-31 Matsushita Electric Ind Co Ltd Arithmetic processing method
JPS6486237A (en) * 1987-06-19 1989-03-30 Digital Equipment Corp Apparatus and method for accelerating effective subtraction procedure of floating point by estimation of absolute value of difference in threshold of exponential part
JPH0545980B2 (en) * 1987-06-19 1993-07-12 Digital Equipment Corp
EP0362580A2 (en) * 1988-10-07 1990-04-11 International Business Machines Corporation Leading 0/1 anticipator (LZA)
EP0362580B1 (en) * 1988-10-07 1996-04-24 International Business Machines Corporation Leading 0/1 anticipator (LZA)
JPH0357019A (en) * 1989-07-26 1991-03-12 Toshiba Corp Floating-point data adding and subtracting circuit
JPH0362124A (en) * 1989-07-28 1991-03-18 Nec Ic Microcomput Syst Ltd Adding circuit
JPH04278630A (en) * 1991-03-06 1992-10-05 Koufu Nippon Denki Kk Floating point adder/subtractor
JPH07225671A (en) * 1993-12-06 1995-08-22 Internatl Business Mach Corp <Ibm> Result normalization mechanism and method of operation

Also Published As

Publication number Publication date
JPH0239809B2 (en) 1990-09-07

Similar Documents

Publication Publication Date Title
JP2508912B2 (en) Floating point adder
US7461117B2 (en) Floating point unit with fused multiply add and method for calculating a result with a floating point unit
US6360189B1 (en) Data processing apparatus and method for performing multiply-accumulate operations
US4994996A (en) Pipelined floating point adder for digital computer
US4999803A (en) Floating point arithmetic system and method
US10310818B2 (en) Floating point chained multiply accumulate
JP2001092636A (en) Device and method for processing data for applying floating point arithmetic to first, second and third operand
US4758974A (en) Most significant digit location
JPH0544046B2 (en)
JPS59226944A (en) Addition and subtraction system of floating point data
CN108694037B (en) Apparatus and method for estimating shift amount when floating point subtraction is performed
US10061561B2 (en) Floating point addition with early shifting
US6499044B1 (en) Leading zero/one anticipator for floating point
JPH0520028A (en) Mantissa part processing circuit of floating-point arithmetic unit for addition and subtraction
US5117384A (en) Method and apparatus for exponent adder
CN111290790B (en) Conversion device for converting fixed point into floating point
US7003540B2 (en) Floating point multiplier for delimited operands
US10275218B1 (en) Apparatus and method for subtracting significand values of floating-point operands
JPH0479014B2 (en)
JPH08202530A (en) Processor and method for floating decimal point addition and subtraction having before-normalization rounding means
JP3174974B2 (en) Floating point arithmetic device and method
US5689721A (en) Detecting overflow conditions for negative quotients in nonrestoring two&#39;s complement division
JP6871513B2 (en) Arithmetic unit and control method of arithmetic unit
JP2752698B2 (en) Floating point addition / subtraction circuit
JPH0377534B2 (en)