JPH0612224A - Method and device for arithmetic processing for floating point binary number - Google Patents

Method and device for arithmetic processing for floating point binary number

Info

Publication number
JPH0612224A
JPH0612224A JP5097514A JP9751493A JPH0612224A JP H0612224 A JPH0612224 A JP H0612224A JP 5097514 A JP5097514 A JP 5097514A JP 9751493 A JP9751493 A JP 9751493A JP H0612224 A JPH0612224 A JP H0612224A
Authority
JP
Japan
Prior art keywords
digit
mantissa
output
exponent
arithmetic processing
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
JP5097514A
Other languages
Japanese (ja)
Inventor
Yoshinori Urano
美紀 浦野
Takashi Taniguchi
隆志 谷口
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP5097514A priority Critical patent/JPH0612224A/en
Publication of JPH0612224A publication Critical patent/JPH0612224A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To accelerate the denormalization of a floating point binary number. CONSTITUTION:Post-processing is performed to a mantissa M and an exponent E of the floating point binary numbers as the result of subtraction, for example, and a mantissa (m) and an exponent (e) are obtained as the result. Therefore, an output (E-1) of a decrementer 201 and an output (digit drop amount LSA of the mantissa) of a preceding '1' detection circuit 20 are inputted to a minimum value selection circuit 203. In the case of (E-1)<LSA (namely when denormalization is required,) the minimum value selection circuit 203 sets shift amount SH to the (E-1) and turns a level discrimination signal CR to '1.' In the case of (E-1)>=LSA (namely when normalization is required,) the SH is set to the LSA and the CR is turned to '0'. A left shirter 204 outputs a value performing the left shift processing of the shift amount SH to the mantissa M as the mantissa (m) of the result. A selection circuit 207 outputs '0' in the case of CR=1, and outputs the output (E-LSA) of a subtraction circuit 206 as the exponent (e) of the result in the case of CR=0.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、IEEE(the Instit
ute of Electrical and Electronics Engineers )75
4規格、あるいはこれに準拠した浮動小数点表現の2進
数を用いる演算処理方法および演算処理装置に関するも
のである。
The present invention relates to the IEEE (the Instit
ute of Electrical and Electronics Engineers) 75
The present invention relates to an arithmetic processing method and an arithmetic processing device using a binary number represented by the four standards or in compliance with the four standards.

【0002】[0002]

【従来の技術】近年、科学技術計算やグラフィック処理
の複雑化に伴って、高速かつ正確な浮動小数点演算に対
する要求が高まっている。計算機は浮動小数点数の限ら
れた桁数のみを用いて処理を行なうため、多くの場合、
浮動小数点演算で得られる結果には誤差が生じる。演算
精度は計算機のハードウェア構成に大きく依存するが、
IEEE754規格に従うことによってハードウェア構
成に依存した誤差の発生を防ぐことができる。
2. Description of the Related Art In recent years, there has been an increasing demand for high-speed and accurate floating-point arithmetic with the increasing complexity of scientific and technological calculations and graphic processing. In many cases, a computer uses only a limited number of floating-point numbers for processing.
There is an error in the result obtained by the floating point arithmetic. The calculation accuracy depends largely on the hardware configuration of the computer,
By complying with the IEEE754 standard, it is possible to prevent the occurrence of an error depending on the hardware configuration.

【0003】さて、IEEE754規格には、1ビット
の符号Sと、8ビットの指数Eと、23ビットの小数部
Fとの合計32ビットの単精度浮動小数点2進数の表現
形式が規定されている。また、1ビットの符号Sと、1
1ビットの指数Eと、52ビットの小数部Fとの合計6
4ビットの倍精度浮動小数点2進数の表現形式も規定さ
れている。通常は、小数部Fの最上位ビット(MSB)
より更に上位に仮想的な非ゼロ値ビットと小数点とが位
置するように正規化処理(ノーマライズ処理)を施した
浮動小数点数が用いられる。ただし、指数Eが正数とな
るように、実際の指数にバイアスが与えられる。例えば
単精度の場合には、実際の指数にバイアスとして127
を加えた数を指数Eとする。すなわち、単精度の正規化
数(ノーマライズド・ナンバー)として表現される実数
R1 は、 R1 =(−1)S E-127 (1.F) (1) となる。ただし、式(1)中の1.Fを仮数Mという。
In the IEEE754 standard, a representation format of a single-precision floating-point binary number having a total of 32 bits including a 1-bit code S, an 8-bit exponent E, and a 23-bit fractional part F is defined. . In addition, 1-bit code S and 1
6 total of 1-bit exponent E and 52-bit fractional part F
A representation format of a 4-bit double precision floating point binary number is also defined. Normally, the most significant bit (MSB) of the fractional part F
A floating point number subjected to normalization processing (normalization processing) so that the virtual non-zero value bit and the decimal point are located further above is used. However, the actual exponent is biased so that the exponent E becomes a positive number. For example, in the case of single precision, 127 is set as the bias for the actual index.
Let E be the number obtained by adding. In other words, real number R1 represented as single precision normalized number (normalized number) is, R1 = (- 1) a S 2 E-127 (1.F) (1). However, in the formula (1), 1. F is called the mantissa M.

【0004】また、IEEE754規格では、演算結果
が0の近傍値となった場合には、これを非正規化数(デ
ノーマライズド・ナンバー)として表現することとして
いる。例えば単精度の場合には、指数Eを0とし、かつ
小数点の1つ上のゼロ値ビットの重みが2-126となるよ
うに小数部Fをシフトする非正規化処理(デノーマライ
ズ処理)が施される。この場合、デノーマライズド・ナ
ンバーとして表現される実数R2 は、 R2 =(−1)S -126(0.F) (2) となる。この場合の仮数Mは0.Fである。
Further, according to the IEEE754 standard, when a calculation result is a value near 0, this is expressed as a denormalized number. For example, in the case of single precision, the denormalization process (the denormalization process) that sets the exponent E to 0 and shifts the fractional part F so that the weight of the zero-value bit one above the decimal point becomes 2 -126 Is given. In this case, the real R2 expressed as the de normalized numbers are, R2 = - a (1) S 2 -126 (0.F ) (2). In this case, the mantissa M is 0. It is F.

【0005】さて、絶対値がほぼ同一で符号の異なる2
つの数を加えると有効数字の桁数が大きく減る現象を
「桁落ち」という。僅差の浮動小数点数どおしの減算に
際して被減数の指数と減数の指数とが相等しい場合に
は、それらの仮数どおしの減算が、桁合わせ操作なしに
実行される。例えば、被減数の仮数が1.100101
…であり、減数の仮数が1.100010…である場合
には、仮数の減算結果は0.000011…となる。こ
のように演算結果において小数点の1つ上のビットの値
が0となった場合に「仮数の桁落ち」が生じたといい、
小数点の1つ上のビット位置から連続する0の個数を仮
数の桁落ち量という。この例では、仮数の桁落ち量が5
である。
Now, the absolute values are almost the same and the signs are different.
The phenomenon in which the number of significant figures decreases significantly when two numbers are added is called "digit loss". If the exponent of the minuend and the exponent of the subtraction are equal in the subtraction of the floating-point numbers with a small difference, then the subtraction of the mantissas is performed without a digit alignment operation. For example, the mantissa of the minuend is 1.100101.
, And when the mantissa of the subtraction is 1.100010 ..., The result of subtraction of the mantissa is 0.000011. In this way, when the value of the bit immediately above the decimal point becomes 0 in the operation result, it is said that "mantissa digit loss" occurred.
The number of consecutive zeros from the bit position one digit above the decimal point is called the mantissa cancellation amount. In this example, the mantissa digit cancellation amount is 5
Is.

【0006】このように仮数の桁落ちが生じた浮動小数
点数は、その桁落ち量に等しいシフト量の左シフト処理
を仮数Mに施し、かつ指数Eから桁落ち量を減じるよう
に該指数Eを補正することによって正規化される。以下
の説明では、仮数の桁落ちが生じた場合に必要な左シフ
ト量(Left Shift Amount )を桁落ち量LSAと表わす
こととする。
In the floating-point number in which the mantissa digit cancellation has occurred, the exponent E is subjected to the left shift processing of a shift amount equal to the digit cancellation amount and the exponent E being subtracted from the exponent E. Is normalized by correcting In the following description, the left shift amount (Left Shift Amount) required when a mantissa digit loss occurs is referred to as a digit loss amount LSA.

【0007】ところで、指数Eが仮数の桁落ち量LSA
以下である場合に正規化のために該指数Eから桁落ち量
LSAを減じると、補正後の指数が0以下となってしま
う。この場合のように演算結果をノーマライズド・ナン
バーとして表わせないときには、上記デノーマライズ処
理が必要となる。
By the way, the exponent E is the mantissa digit loss amount LSA.
When the value is less than or equal to the following, if the digit loss amount LSA is subtracted from the index E for normalization, the corrected index becomes 0 or less. If the calculation result cannot be represented as a normalized number as in this case, the denormalization process is required.

【0008】[0008]

【発明が解決しようとする課題】従来の計算機のハード
ウェアは、ノーマライズド・ナンバーのみを処理対象と
していた。つまり、ハードウエアで演算結果にノーマラ
イズ処理を施した際にこれをノーマライズド・ナンバー
として表わすことができないことが判明した場合には、
例外が発生したものとしてノーマライズ処理を中断した
うえ、ソフトウェアにデノーマライズ処理を委ねること
としていた。したがって、ノーマライズ処理の後にデノ
ーマライズ処理が実行されることとなり、所望の演算結
果を高速に得ることができないという問題があった。
In the conventional computer hardware, only the normalized number is processed. In other words, when it is found that this cannot be expressed as a normalized number when the operation result is normalized by hardware,
It was decided to interrupt the normalization process as if an exception had occurred, and then entrust the software with the denormalization process. Therefore, the denormalization process is executed after the normalization process, and there is a problem that a desired calculation result cannot be obtained at high speed.

【0009】本発明の目的は、浮動小数点2進数のデノ
ーマライズ処理をノーマライズ処理と同等に高速化する
ことにある。
An object of the present invention is to speed up the denormalization process of floating-point binary numbers as much as the normalization process.

【0010】[0010]

【課題を解決するための手段】上記目的を達成するため
に、本発明は、ノーマライズ処理を実行する前に指数E
と仮数の桁落ち量LSAとの大小関係を判別し、該判別
の結果に応じてノーマライズ処理とデノーマライズ処理
とのいずれか一方を実行する構成を採用したものであ
る。
In order to achieve the above object, the present invention provides an index E before performing a normalizing process.
And a digit-rejection amount LSA of the mantissa are discriminated, and either one of the normalizing process and the denormalizing process is executed according to the result of the discrimination.

【0011】具体的には、請求項1の発明に係る演算処
理方法は、仮数Mと指数Eとを有する浮動小数点2進数
の演算処理装置において仮数Mにシフト処理を施しかつ
指数Eを調整するための方法において、仮数M中の先行
する1のビット位置と小数点の1つ上のビット位置との
差を仮数の桁落ち量LSAとして求めるステップと、指
数Eと桁落ち量LSAとの大小を比較するステップと、
指数Eより桁落ち量LSAの方が小さい場合には桁落ち
量LSAを、他の場合には指数Eから1を減じた値を各
々シフト量SHとする左シフト処理を仮数Mに施すこと
によって演算処理結果の仮数mを得るステップと、指数
Eより桁落ち量LSAの方が小さい場合には指数Eから
桁落ち量LSAを減じた値を、他の場合には0を各々演
算処理結果の指数eとするステップとを備えた構成を採
用したものである。
Specifically, in the arithmetic processing method according to the first aspect of the present invention, in the arithmetic processing unit for a floating point binary number having the mantissa M and the exponent E, the mantissa M is shifted and the exponent E is adjusted. In the method for calculating the mantissa M, the difference between the preceding bit position of 1 in the mantissa M and the bit position one digit above the decimal point is determined as the mantissa digit loss amount LSA, and the magnitude of the exponent E and the digit loss amount LSA is calculated. The step of comparing,
By performing a left shift process on the mantissa M, where the digit loss amount LSA is smaller than the index E, the digit loss amount LSA is set, and in other cases, the value obtained by subtracting 1 from the index E is set as the shift amount SH. The step of obtaining the mantissa m of the arithmetic processing result, and the value obtained by subtracting the digit cancellation amount LSA from the exponent E when the digit cancellation amount LSA is smaller than the exponent E, and 0 in other cases, respectively. This is a configuration including a step of setting the index e.

【0012】請求項2の発明に係る演算処理装置は、浮
動小数点2進数の仮数Mにシフト処理を施しかつ該浮動
小数点2進数の指数Eを調整するための装置において、
次のような先行1検出手段と、デクリメント手段と、比
較手段と、減算手段と、選択手段と、シフト手段とを備
えた構成を採用したものである。すなわち、先行1検出
手段は、仮数M中の先行する1のビット位置を検出し、
かつ該ビット位置と小数点の1つ上のビット位置との差
を仮数の桁落ち量LSAとして出力するものである。デ
クリメント手段は、指数Eから1を減じた値を出力する
ものである。比較手段は、デクリメント手段の出力(E
−1)と先行1検出手段から出力された桁落ち量LSA
との2つの入力データの大小を比較して小さい方の入力
データを大小判別結果として出力し、かつ前記2つの入
力データのうちいずれが小さいかを示す大小判別信号を
出力するものである。減算手段は、先行1検出手段から
出力された桁落ち量LSAを指数Eから減じた値を出力
するものである。選択手段は、前記2つの入力データの
うちデクリメント手段の出力(E−1)の方が小さいこ
とを前記比較手段からの大小判別信号が示す場合には0
を、他の場合には減算手段の出力(E−LSA)を各々
演算処理結果の指数eとして出力するものである。シフ
ト手段は、比較手段から出力された大小判別結果をシフ
ト量SHとする左シフト処理を仮数Mに施すことによっ
て得た値を演算処理結果の仮数mとして出力するもので
ある。
According to a second aspect of the present invention, there is provided an arithmetic processing device for shifting a mantissa M of a floating point binary number and adjusting an exponent E of the floating point binary number.
The following configuration is adopted, which includes a preceding 1 detection unit, a decrement unit, a comparison unit, a subtraction unit, a selection unit, and a shift unit. That is, the leading 1 detection means detects the leading 1 bit position in the mantissa M,
The difference between the bit position and the bit position one digit above the decimal point is output as the mantissa digit loss amount LSA. The decrement means outputs a value obtained by subtracting 1 from the index E. The comparison means outputs the output (E
-1) and leading loss amount LSA output from the preceding 1 detection means
And the smaller input data is output as a result of the size determination, and a size determination signal indicating which of the two input data is smaller is output. The subtracting means outputs a value obtained by subtracting the carry loss amount LSA output from the preceding 1 detecting means from the index E. The selecting means sets 0 if the magnitude discriminating signal from the comparing means indicates that the output (E-1) of the decrementing means is smaller among the two input data.
In other cases, the output (E-LSA) of the subtraction means is output as the exponent e of the calculation processing result. The shift means outputs a value obtained by subjecting the mantissa M to the left shift processing in which the magnitude determination result output from the comparison means is the shift amount SH, as the mantissa m of the arithmetic processing result.

【0013】請求項3の発明では、請求項2の発明に係
る演算処理装置において、前記比較手段は前記2つの入
力データの各桁毎の大小関係を上位桁から下位桁に向か
って伝搬させることにより前記大小判別結果を上位桁か
ら順に出力するための最小値選択回路を備え、かつ前記
シフト手段は該最小値選択回路から出力された大小判別
結果の下位nビットに各々対応した左2k (k=0,
1,2,…,n−1)ビットシフタを縦続接続してなる
こととした。
According to a third aspect of the present invention, in the arithmetic processing unit according to the second aspect of the present invention, the comparing means propagates the magnitude relationship of each digit of the two input data from the upper digit to the lower digit. The shift means is provided with a minimum value selection circuit for sequentially outputting the magnitude discrimination result from the upper digit, and the shift means outputs 2 k left ( k) corresponding to the lower n bits of the magnitude discrimination result output from the minimum value selection circuit. k = 0,
1, 2, ..., N-1) bit shifters are connected in cascade.

【0014】請求項4の発明に係る演算処理装置は、次
のような先行1検出手段と、デクリメント手段と、比較
選択手段と、減算手段と、選択手段と、シフト手段とを
備えた構成を採用したものである。すなわち、先行1検
出手段は、仮数M中の先行する1のビット位置を検出
し、かつ該ビット位置と小数点の1つ上のビット位置と
の差を仮数の桁落ち量LSAとして出力するものであ
る。デクリメント手段は、指数Eから1を減じた値を出
力するものである。比較選択手段は、先行1検出手段か
ら出力された桁落ち量LSAと指数Eとの2つの入力デ
ータの大小を比較して桁落ち量LSAの方が小さい場合
には該桁落ち量LSAを、他の場合にはデクリメント手
段の出力(E−1)を各々大小判別結果として出力し、
かつ前記2つの入力データのうちいずれが小さいかを示
す大小判別信号を出力するものである。減算手段は、先
行1検出手段から出力された桁落ち量LSAを指数Eか
ら減じた値を出力するものである。選択手段は、前記2
つの入力データのうち先行1検出手段からの桁落ち量L
SAの方が小さいことを前記比較選択手段からの大小判
別信号が示す場合には減算手段の出力(E−LSA)
を、他の場合には0を各々演算処理結果の指数eとして
出力するものである。シフト手段は、比較選択手段から
出力された大小判別結果をシフト量SHとする左シフト
処理を仮数Mに施すことによって得た値を演算処理結果
の仮数mとして出力するものである。
An arithmetic processing device according to a fourth aspect of the present invention has a structure including the following leading 1 detection means, decrement means, comparison / selection means, subtraction means, selection means, and shift means. It was adopted. That is, the leading 1 detection means detects the leading bit position of 1 in the mantissa M and outputs the difference between the bit position and the bit position one digit above the decimal point as the mantissa digit loss amount LSA. is there. The decrement means outputs a value obtained by subtracting 1 from the index E. The comparison and selection means compares the magnitudes of the two input data of the digit loss amount LSA output from the preceding 1 detection means and the exponent E, and when the digit loss amount LSA is smaller, the digit loss amount LSA, In other cases, the output (E-1) of the decrement means is output as the magnitude determination result,
In addition, it outputs a magnitude determination signal indicating which of the two input data is smaller. The subtracting means outputs a value obtained by subtracting the carry loss amount LSA output from the preceding 1 detecting means from the index E. The selection means is the above 2
Digit loss amount L from the preceding 1 detection means of one input data
Output from the subtraction means (E-LSA) when the magnitude discrimination signal from the comparison and selection means indicates that SA is smaller.
In other cases, 0 is output as the exponent e of the arithmetic processing result. The shift means outputs a value obtained by subjecting the mantissa M to the left shift processing in which the magnitude determination result output from the comparison and selection means is the shift amount SH, as the mantissa m of the arithmetic processing result.

【0015】請求項5の発明では、請求項4の発明に係
る演算処理装置において、前記比較選択手段は前記2つ
の入力データの各桁毎の大小関係を上位桁から下位桁に
向かって伝搬させることにより前記大小判別結果を上位
桁から順に出力するための比較選択回路を備え、かつ前
記シフト手段は該比較選択回路から出力された大小判別
結果の下位nビットに各々対応した左2k (k=0,
1,2,…,n−1)ビットシフタを縦続接続してなる
こととした。
According to a fifth aspect of the invention, in the arithmetic processing unit according to the fourth aspect of the invention, the comparison / selection means propagates the magnitude relation of each digit of the two input data from the upper digit to the lower digit. Accordingly, a comparison and selection circuit for sequentially outputting the magnitude discrimination result from the upper digit is provided, and the shift means corresponds to the left 2 k (k) corresponding to the lower n bits of the magnitude discrimination result output from the comparison and selection circuit. = 0,
1, 2, ..., N-1) bit shifters are connected in cascade.

【0016】請求項6の発明に係る演算処理装置は、次
のような先行1検出手段と、デクリメント手段と、減算
手段と、第1の選択手段と、第2の選択手段と、シフト
手段とを備えた構成を採用したものである。すなわち、
先行1検出手段は、仮数M中の先行する1のビット位置
を検出し、かつ該ビット位置と小数点の1つ上のビット
位置との差を仮数の桁落ち量LSAとして出力するもの
である。デクリメント手段は、指数Eから1を減じた値
を出力するものである。減算手段は、先行1検出手段か
ら出力された桁落ち量LSAを指数Eから減じた値を減
算結果として出力し、かつ指数Eが桁落ち量LSA以下
であるか否かを示す大小判別信号を出力するものであ
る。第1の選択手段は、指数Eが桁落ち量LSA以下で
あることを前記減算手段からの大小判別信号が示す場合
には0を、他の場合には減算手段からの減算結果(E−
LSA)を各々演算処理結果の指数eとして出力するも
のである。第2の選択手段は、指数Eが桁落ち量LSA
以下であることを前記減算手段からの大小判別信号が示
す場合にはデクリメント手段の出力(E−1)を、他の
場合には先行1検出手段から出力された桁落ち量LSA
を各々出力するものである。シフト手段は、第2の選択
手段の出力をシフト量SHとする左シフト処理を仮数M
に施すことによって得た値を演算処理結果の仮数mとし
て出力するものである。
According to a sixth aspect of the present invention, there is provided an arithmetic processing device which comprises the following leading 1 detection means, decrement means, subtraction means, first selection means, second selection means and shift means. It adopts a configuration with. That is,
The leading 1 detection means detects the leading bit position of 1 in the mantissa M and outputs the difference between the bit position and the bit position one digit above the decimal point as the mantissa digit loss amount LSA. The decrement means outputs a value obtained by subtracting 1 from the index E. The subtraction means outputs a value obtained by subtracting the digit loss amount LSA output from the preceding 1 detection means from the index E as a subtraction result, and outputs a magnitude determination signal indicating whether the index E is less than or equal to the digit loss amount LSA. It is what is output. The first selecting means sets 0 if the magnitude discriminating signal from the subtracting means indicates that the exponent E is equal to or less than the digit cancellation amount LSA, and in other cases, the subtraction result (E-
LSA) is output as an exponent e of each calculation processing result. The second selection means is that the index E is the digit loss amount LSA.
The output (E-1) of the decrementing means when the magnitude discriminating signal from the subtracting means indicates that the following is true, and in other cases, the digit loss amount LSA output from the preceding 1 detecting means.
Are output respectively. The shift means performs a left shift process in which the output of the second selection means is the shift amount SH and the mantissa M.
Is output as the mantissa m of the arithmetic processing result.

【0017】請求項7の発明に係る演算処理装置は、次
のような先行1検出手段と、減算手段と、第1の選択手
段と、第2の選択手段と、シフト処理手段とを備えた構
成を採用したものである。すなわち、先行1検出手段
は、仮数M中の先行する1のビット位置を検出し、かつ
該ビット位置と小数点の1つ上のビット位置との差を仮
数の桁落ち量LSAとして出力するものである。減算手
段は、先行1検出手段から出力された桁落ち量LSAを
指数Eから減じた値を減算結果として出力し、かつ指数
Eが桁落ち量LSA以下であるか否かを示す大小判別信
号を出力するものである。第1の選択手段は、指数Eが
桁落ち量LSA以下であることを前記減算手段からの大
小判別信号が示す場合には0を、他の場合には減算手段
からの減算結果(E−LSA)を各々演算処理結果の指
数eとして出力するものである。第2の選択手段は、指
数Eが桁落ち量LSA以下であることを前記減算手段か
らの大小判別信号が示す場合には指数Eを、他の場合に
は先行1検出手段から出力された桁落ち量LSAを各々
出力するものである。シフト処理手段は、指数Eが桁落
ち量LSA以下であることを前記減算手段からの大小判
別信号が示す場合には第2の選択手段の出力から1を減
じた値を、他の場合には該第2の選択手段の出力そのも
のを各々シフト量SHとする左シフト処理を仮数Mに施
すことによって得た値を演算処理結果の仮数mとして出
力するものである。
An arithmetic processing unit according to a seventh aspect of the present invention comprises the following leading 1 detection means, subtraction means, first selection means, second selection means, and shift processing means. The configuration is adopted. That is, the leading 1 detection means detects the leading bit position of 1 in the mantissa M and outputs the difference between the bit position and the bit position one digit above the decimal point as the mantissa digit loss amount LSA. is there. The subtraction means outputs a value obtained by subtracting the digit loss amount LSA output from the preceding 1 detection means from the index E as a subtraction result, and outputs a magnitude determination signal indicating whether the index E is less than or equal to the digit loss amount LSA. It is what is output. The first selecting means sets 0 when the magnitude discriminating signal from the subtracting means indicates that the exponent E is equal to or less than the digit cancellation amount LSA, and in other cases, the subtraction result (E-LSA) from the subtracting means. ) Is output as the exponent e of the calculation processing result. The second selecting means outputs the exponent E when the magnitude discriminating signal from the subtracting means indicates that the exponent E is less than or equal to the digit cancellation amount LSA, and the digit output from the preceding 1 detecting means in other cases. The drop amount LSA is output respectively. The shift processing means subtracts 1 from the output of the second selecting means when the magnitude discriminating signal from the subtracting means indicates that the exponent E is less than or equal to the digit cancellation amount LSA, and in other cases. A value obtained by subjecting the mantissa M to the left shift processing in which the output itself of the second selecting means is the shift amount SH is output as the mantissa m of the calculation processing result.

【0018】請求項8の発明では、請求項7の発明に係
る演算処理装置において、前記シフト処理手段は、前記
第2の選択手段の出力(E又はLSA)をシフト量SH
とする左シフト処理を仮数Mに施すことによって得た値
を出力するための左シフタと、指数Eが桁落ち量LSA
以下であることを前記減算手段からの大小判別信号が示
す場合には前記左シフタの出力に右1ビットシフト処理
を施すことによって得た値を、他の場合には該左シフタ
の出力そのものを各々演算処理結果の仮数mとして出力
するための右1ビットシフタとを備えることとした。
According to an eighth aspect of the invention, in the arithmetic processing unit according to the seventh aspect of the invention, the shift processing means shifts the output (E or LSA) of the second selecting means by a shift amount SH.
And a left shifter for outputting a value obtained by subjecting the mantissa M to the left shift processing, and the exponent E having a digit loss amount LSA.
If the magnitude discrimination signal from the subtracting means indicates that the following is true, the value obtained by subjecting the output of the left shifter to the right 1-bit shift processing is used, and in other cases, the output of the left shifter itself is used. A right 1-bit shifter for outputting the mantissa m of the arithmetic processing result is provided.

【0019】また、請求項9の発明では、請求項6又は
7の発明に係る演算処理装置において、前記減算手段
は、指数Eと先行1検出手段から出力された桁落ち量L
SAとを2つの入力データとして前記減算結果(E−L
SA)を求め、かつ該2つの入力データの減算における
最下位桁から最上位桁までの桁借り伝搬を考慮した桁借
り生成信号および桁借り伝搬信号に基づいて前記大小判
別信号を生成するための減算回路を備えることとした。
According to a ninth aspect of the present invention, in the arithmetic processing unit according to the sixth or seventh aspect of the invention, the subtracting means outputs the exponent E and the carry loss amount L output from the leading 1 detecting means.
The subtraction result (E−L
SA) and for generating the magnitude discriminating signal based on the carry borrow generation signal and the carry borrow propagation signal in consideration of the borrow propagation from the least significant digit to the most significant digit in the subtraction of the two input data. A subtraction circuit was provided.

【0020】請求項10の発明に係る減算回路は、nビ
ットの入力データX,YについてX−Yの演算を行ない
結果を出力する機能を備え、かつ該演算における第0桁
から第(n−1)桁までの桁借り伝搬を考慮した桁借り
生成信号および桁借り伝搬信号に基づいて前記入力デー
タの大小関係X≦Yを表わす大小判別信号を生成し出力
する機能を備えた構成を採用したものである。
A subtraction circuit according to a tenth aspect of the present invention has a function of performing an X-Y operation on n-bit input data X and Y and outputting the result, and the 0th digit to the (n-th) digit in the operation. 1) A configuration having a function of generating and outputting a magnitude discriminating signal representing a magnitude relation X ≦ Y of the input data based on a borrow borrow generating signal and a borrow borrow propagating signal in consideration of borrow borrow propagation up to a digit is adopted. It is a thing.

【0021】[0021]

【作用】請求項1の発明によれば、指数Eと仮数の桁落
ち量LSAとの大小比較によって、演算処理結果がノー
マライズド・ナンバーとなるか、デノーマライズド・ナ
ンバーとなるかが判定される。演算処理結果がノーマラ
イズド・ナンバーとなる場合(E>LSA)には、仮数
Mのシフト量SHとして桁落ち量LSAが選択され、結
果の指数eとして指数Eから桁落ち量LSAを減じた値
が選択される(ノーマライズ処理)。一方、演算処理結
果がデノーマライズド・ナンバーとなる場合(E≦LS
A)には、仮数Mのシフト量SHとして指数Eから1を
減じた値が選択され、結果の指数eとして0が選択され
る(デノーマライズ処理)。
According to the first aspect of the present invention, it is determined whether the arithmetic processing result is a normalized number or a denormalized number by comparing the exponent E and the mantissa digit loss amount LSA. It When the arithmetic processing result is a normalized number (E> LSA), the digit loss amount LSA is selected as the shift amount SH of the mantissa M, and the value obtained by subtracting the digit loss amount LSA from the exponent E as the exponent e of the result. Is selected (normalization process). On the other hand, when the operation processing result is the denormalized number (E ≦ LS
In A), a value obtained by subtracting 1 from the index E is selected as the shift amount SH of the mantissa M, and 0 is selected as the resulting index e (denormalization processing).

【0022】請求項2の発明によれば、請求項1の発明
に係る演算処理方法を効率良く実行するためのハードウ
ェアが提供される。デノーマライズ処理の場合にシフト
量SHとして選択されるべき第1のデータ(E−1)
と、ノーマライズ処理の場合にシフト量SHとして選択
されるべき第2のデータ(LSA)とが、比較手段に各
々入力データとして与えられる。比較手段は、第1のデ
ータ(E−1)から第2のデータ(LSA)を減じた値
が負になるかどうかによって、演算処理結果がノーマラ
イズド・ナンバーとなるか、デノーマライズド・ナンバ
ーとなるかを判定する。シフト手段は、仮数Mに施すべ
き左シフト処理のシフト量SHとして第1および第2の
データのうちの小さい方を採用する。つまり、該シフト
手段は、ノーマライズ処理とデノーマライズ処理とに共
用される。
According to the second aspect of the invention, there is provided hardware for efficiently executing the arithmetic processing method according to the first aspect of the invention. First data (E-1) to be selected as the shift amount SH in the case of denormalization processing
And the second data (LSA) to be selected as the shift amount SH in the case of the normalizing process are given to the comparison means as input data. The comparison means determines whether the arithmetic processing result is a normalized number or a denormalized number depending on whether the value obtained by subtracting the second data (LSA) from the first data (E-1) becomes negative. Is determined. The shift means adopts the smaller one of the first and second data as the shift amount SH of the left shift process to be applied to the mantissa M. That is, the shift means is shared by the normalizing process and the denormalizing process.

【0023】請求項3の発明によれば、最小値選択回路
により、前記第1および第2のデータ(E−1,LS
A)の大小判別結果が上位桁から順に決定される。シフ
ト手段は、該大小判別結果の桁が決定されるごとに、該
決定された桁に応じたシフト量(2k ビット)の左シフ
ト処理を仮数Mに施す。
According to the third aspect of the invention, the first and second data (E-1, LS) are made by the minimum value selection circuit.
The magnitude determination result of A) is determined in order from the upper digit. Every time the digit of the magnitude discrimination result is determined, the shift means performs a left shift process on the mantissa M by a shift amount (2 k bits) according to the determined digit.

【0024】請求項4の発明によれば、仮数の桁落ち量
LSAと指数Eとが各々第1および第2の入力データと
して比較選択手段に与えられる。比較選択手段は、第1
の入力データ(LSA)から第2の入力データ(E)を
減じた値が負になるかどうかによって、演算処理結果が
ノーマライズド・ナンバーとなるか、デノーマライズド
・ナンバーとなるかを判定する。また、該比較選択手段
は、演算処理結果がノーマライズド・ナンバーとなる場
合(E>LSA)には桁落ち量LSAを、演算処理結果
がデノーマライズド・ナンバーとなる場合(E≦LS
A)には第3の入力データとしてのデクリメント手段の
出力(E−1)を各々仮数Mのシフト量SHとして出力
する。つまり、比較選択手段は、第3の入力データが確
定する前に第1および第2の入力データの大小比較を開
始できるのである。
According to the invention of claim 4, the mantissa digit loss amount LSA and the exponent E are given to the comparison and selection means as the first and second input data, respectively. The comparison / selection means is the first
Whether the result of the arithmetic processing is a normalized number or a denormalized number is determined depending on whether the value obtained by subtracting the second input data (E) from the input data (LSA) is negative. . Further, the comparison / selection means uses the digit loss amount LSA when the calculation processing result is a normalized number (E> LSA), and when the calculation processing result is a denormalized number (E ≦ LS).
In (A), the output (E-1) of the decrement means as the third input data is output as the shift amount SH of the mantissa M, respectively. That is, the comparison / selection means can start the magnitude comparison of the first and second input data before the third input data is determined.

【0025】請求項5の発明によれば、比較選択回路に
より、前記第1および第2のデータ(LSA,E)の大
小判別結果が上位桁から順に決定される。シフト手段
は、該大小判別結果の桁が決定されるごとに、該決定さ
れた桁に応じたシフト量(2kビット)の左シフト処理
を仮数Mに施す。
According to the fifth aspect of the present invention, the comparison / selection circuit sequentially determines the magnitude determination result of the first and second data (LSA, E) from the upper digit. Every time the digit of the magnitude discrimination result is determined, the shift means performs a left shift process on the mantissa M by a shift amount (2 k bits) according to the determined digit.

【0026】請求項6の発明によれば、指数Eと仮数の
桁落ち量LSAとが各々第1および第2の入力データと
して減算手段に与えられる。減算手段は、減算結果(E
−LSA)を出力するだけでなく、第1の入力データ
(E)から第2の入力データ(LSA)を減じた値が0
以下になるかどうかによって、演算処理結果がノーマラ
イズド・ナンバーとなるか、デノーマライズド・ナンバ
ーとなるかを判定する。この判定の結果に応じて、デク
リメント手段の出力(E−1)又は桁落ち量LSAが仮
数Mのシフト量SHとして選択される。つまり、減算手
段は、ノーマライズ処理の場合の指数Eの補正と、演算
処理結果の判定とを同時に実行するものである。
According to the sixth aspect of the present invention, the exponent E and the mantissa digit loss amount LSA are given to the subtraction means as the first and second input data, respectively. The subtraction means calculates the subtraction result (E
-LSA) is output, and the value obtained by subtracting the second input data (LSA) from the first input data (E) is 0.
Whether or not the calculation processing result is a normalized number or a denormalized number is determined depending on whether or not: Depending on the result of this determination, the output (E-1) of the decrement means or the digit loss amount LSA is selected as the shift amount SH of the mantissa M. That is, the subtraction means simultaneously executes the correction of the exponent E in the case of normalization processing and the determination of the calculation processing result.

【0027】請求項7の発明によれば、演算処理結果が
ノーマライズド・ナンバーとなる場合(E>LSA)に
は桁落ち量LSAが、演算処理結果がデノーマライズド
・ナンバーとなる場合(E≦LSA)には指数Eが各々
シフト処理手段に与えられる。このうち指数Eがシフト
処理手段に与えられる場合には、該シフト処理手段中に
おいて左シフト量が1だけ減じられる。
According to the invention of claim 7, when the arithmetic processing result is a normalized number (E> LSA), the digit loss amount LSA is, and when the arithmetic processing result is a denormalized number (E> LSA). The index E is given to the shift processing means for ≤ LSA). When the index E is given to the shift processing means, the left shift amount is reduced by 1 in the shift processing means.

【0028】請求項8の発明によれば、シフト量可変の
左シフタとその出力側に接続された右1ビットシフタと
により、所要のシフト量SH(LSA又はE−1)の左
シフト処理が仮数Mに施される。
According to the eighth aspect of the present invention, the left shift processing of the required shift amount SH (LSA or E-1) is performed by the mantissa by the left shifter of variable shift amount and the right 1-bit shifter connected to the output side thereof. It is applied to M.

【0029】請求項9の発明によれば、2つの入力デー
タの減算(E−LSA)における最下位桁から最上位桁
までの桁借り生成信号および桁借り伝搬信号の利用によ
り、第1の入力データ(E)から第2の入力データ(L
SA)を減じた値が0以下になるかどうかを示す大小判
別信号が生成される。
According to the invention of claim 9, the first input is made by using the borrow generation signal and the borrow propagation signal from the least significant digit to the most significant digit in the subtraction (E-LSA) of two input data. From the data (E) to the second input data (L
A magnitude determination signal indicating whether the value obtained by subtracting (SA) becomes 0 or less is generated.

【0030】請求項10の発明によれば、nビット入力
データX,Yの各ビットをXi ,Yi (i=0〜n−
1)とすると、X−Yの演算に際して、まず1桁毎に桁
借り生成信号Igi と桁借り伝搬信号Ipi とが作られ
る。次に、該Igi およびIpi (i=0〜n−1)に
基づき、かつ下位桁からの桁借り伝搬を考慮して、第k
桁から第j桁(k<j)までの桁借り生成信号Igjkお
よび桁借り伝搬信号Ipjkが作られる。最終的に、第0
桁から第(n−1)桁までの全ビットの桁借り伝搬を考
慮した桁借り生成信号Ig(n-1)0および桁借り伝搬信号
Ip(n-1)0が作られる。Ig(n-1)0=1はX<Yを、I
p(n-1)0=1はX=Yを各々表わす。つまり、Ig(n-
1)0とIp(n-1)0とのいずれか一方が1である場合に、
X≦Yとなる。このようにして2つの入力データX,Y
の大小関係X≦Yを表わす大小判別信号が生成される。
また、桁借り生成信号および桁借り伝搬信号は、演算結
果(X−Y)の算出にも用いられる。演算結果の算出と
大小判別信号の生成とにハードウェアの大部分を共用で
きることとなる。
According to the tenth aspect of the present invention, each bit of the n-bit input data X, Y is represented by Xi, Yi (i = 0 to n-).
In the case of 1), the carry borrow generation signal Igi and the carry borrow propagation signal Ipi are first generated for each digit in the calculation of XY. Next, based on the Igi and Ipi (i = 0 to n-1) and considering borrow propagation from the lower digit, the k-th
The digit borrow generation signal Igjk and the digit borrow propagation signal Ipjk from the digit to the j-th digit (k <j) are generated. Finally, the 0th
A borrow generation signal Ig (n-1) 0 and a borrow propagation signal Ip (n-1) 0 are created in consideration of the borrow propagation of all bits from the digit to the (n-1) th digit. If Ig (n-1) 0 = 1, X <Y, I
p (n-1) 0 = 1 represents X = Y. That is, Ig (n-
When either 1) 0 or Ip (n-1) 0 is 1,
X ≦ Y. In this way, the two input data X and Y
A magnitude discrimination signal representing the magnitude relation X ≦ Y of is generated.
The borrow generation signal and the borrow propagation signal are also used to calculate the calculation result (XY). Most of the hardware can be shared between the calculation of the calculation result and the generation of the magnitude discrimination signal.

【0031】[0031]

【実施例】以下、本発明の実施例に係る演算処理方法及
びその実施に使用する演算処理装置について、図面を参
照しながら説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An arithmetic processing method according to an embodiment of the present invention and an arithmetic processing device used for implementing the same will be described below with reference to the drawings.

【0032】図1は、浮動小数点2進数のための本発明
の実施例に係る演算処理方法の処理の流れを示すフロー
チャート図である。ノーマライズド・ナンバーどおしの
演算(例えば減算)の結果としての入力浮動小数点2進
数の仮数Mおよび指数Eに後処理を施すことによって、
該仮数Mおよび指数Eを出力浮動小数点2進数の仮数m
および指数eに変換する手順を示したものである。以
下、単精度の場合についてステップ毎に説明するが、図
1の演算処理方法は倍精度の場合にも適用可能である。
FIG. 1 is a flow chart showing a processing flow of an arithmetic processing method according to an embodiment of the present invention for floating point binary numbers. By post-processing the input floating-point binary mantissa M and the exponent E as the result of the operation (eg subtraction) of the normalized numbers,
The mantissa M and the exponent E are output, and the mantissa m of the floating point binary number is
And a procedure for converting into an index e. Hereinafter, the case of single precision will be described step by step, but the arithmetic processing method of FIG. 1 can also be applied to the case of double precision.

【0033】まず初めに、仮数の桁落ち量LSAを求め
るために、仮数M中の先行する1のビット位置を検出す
る。桁落ち量LSAは、検出された先行1のビット位置
と小数点の1つ上のビット位置との差として求められる
(ステップ101)。次に、指数Eと桁落ち量LSAと
の大小比較を行なう(ステップ102)。
First, the leading bit position of 1 in the mantissa M is detected in order to obtain the digit loss amount LSA of the mantissa. The digit loss amount LSA is obtained as a difference between the detected leading 1 bit position and the bit position one digit above the decimal point (step 101). Then, the exponent E is compared with the amount of digit loss LSA (step 102).

【0034】E≦LSAの場合には、演算処理結果をデ
ノーマライズド・ナンバーとして表現するようにデノー
マライズ処理が実行される。したがって、指数Eが0に
なるように該指数Eを低減するとともに、該低減量に見
合ったシフト量の左シフト処理を仮数Mに施す必要があ
る。ただし、ノーマライズド・ナンバーにおける小数点
の1つ上のビットは2-127の重みを持つが、前記の式
(2)に示すようにデノーマライズド・ナンバーにおけ
る該ビットの重みは2-126であるので、仮数Mの左シフ
ト処理にあたってシフト量を1ビット控える必要があ
る。このため、仮数のシフト量SHはE−1とする(ス
テップ103)。また、演算処理結果の指数eを0とす
る(ステップ104)。
When E≤LSA, the denormalization process is executed so that the calculation process result is expressed as a denormalized number. Therefore, it is necessary to reduce the exponent E so that the exponent E becomes 0 and to perform the left shift processing of the shift amount corresponding to the reduction amount on the mantissa M. However, the bit above the decimal point in the normalized number has a weight of 2 -127 , but the weight of the bit in the denormalized number is 2 -126 as shown in the above equation (2). Therefore, it is necessary to reduce the shift amount by 1 bit in the left shift processing of the mantissa M. Therefore, the mantissa shift amount SH is set to E-1 (step 103). Further, the index e of the calculation processing result is set to 0 (step 104).

【0035】一方、E>LSAの場合には、ノーマライ
ズ処理を実行するように、仮数のシフト量SHをLSA
とし(ステップ105)、演算処理結果の指数eをE−
LSAとする(ステップ104)。この際、指数e(=
E−LSA)は正である。
On the other hand, in the case of E> LSA, the mantissa shift amount SH is set to LSA so that the normalization process is executed.
(Step 105), the exponent e of the arithmetic processing result is E-
LSA (step 104). At this time, the index e (=
E-LSA) is positive.

【0036】ステップ107では、ステップ103ある
いはステップ105で得られたシフト量SHに従って仮
数Mに左シフト処理を施すことにより、演算処理結果の
仮数mを得る。
In step 107, the mantissa M is left-shifted in accordance with the shift amount SH obtained in step 103 or step 105 to obtain the mantissa m of the arithmetic processing result.

【0037】以上の演算処理方法によれば、指数Eと仮
数の桁落ち量LSAとの大小比較の結果に応じて処理の
流れを制御することにより、演算処理結果がデノーマラ
イズド・ナンバーとなる場合でも、ノーマライズド・ナ
ンバーの場合と同じように処理を高速実行することがで
きる。なお、ステップ103においてシフト量SHをE
−1ではなくEに設定するよう変更し、ステップ107
における仮数Mの左シフト処理の前又は後に、E≦LS
Aの場合に限って右1ビットシフト処理を仮数Mにさら
に施すようにしてもよい。
According to the above arithmetic processing method, the arithmetic processing result is a denormalized number by controlling the processing flow according to the result of the comparison of the exponent E and the mantissa digit loss amount LSA. Even in the case, the processing can be executed at high speed as in the case of the normalized number. Note that the shift amount SH is set to E in step 103.
Change to set to E instead of -1, step 107
Before or after the mantissa M is left-shifted in
Only in the case of A, the mantissa M may be further subjected to right 1-bit shift processing.

【0038】上記演算処理方法の実施に使用する本発明
の実施例に係る第1〜第4の演算処理装置について、順
次説明する。
The first to fourth arithmetic processing devices according to the embodiments of the present invention used for implementing the above arithmetic processing method will be sequentially described.

【0039】図2に第1の演算処理装置の構成を示す。
この演算処理装置は、デクリメンタ201、先行1検出
回路202、最小値選択回路203、左シフタ204、
仮数結果レジスタ205、減算回路206、選択回路2
07および指数結果レジスタ208を備えている。
FIG. 2 shows the configuration of the first arithmetic processing unit.
This arithmetic processing device includes a decrementer 201, a preceding 1 detection circuit 202, a minimum value selection circuit 203, a left shifter 204,
Mantissa result register 205, subtraction circuit 206, selection circuit 2
07 and exponent result register 208.

【0040】デクリメンタ201は、指数Eから1を減
じた値を出力するものである。先行1検出回路202
は、仮数M中の小数点の1つ上のビットから最下位ビッ
ト(LSB)の方向へ検索して最初に1となっているビ
ット位置を検出し、該検出されたビット位置と小数点の
1つ上のビット位置との差を桁落ち量LSAとして出力
するものである。最小値選択回路203は、デクリメン
タ201の出力(E−1)と先行1検出回路202の出
力LSAとの2つの入力データの大小を比較して小さい
方の入力データをシフト量SHとして出力し、かつ該2
つの入力データのうちいずれが小さいかを示す大小判別
信号CRを出力するものである。(E−1)<LSAで
ある場合(即ちE≦LSAである場合)にはSH=E−
1かつCR=1であり、(E−1)≧LSAである場合
(即ちE>LSAである場合)にはSH=LSAかつC
R=0である。左シフタ204は、最小値選択回路20
3の出力SHで指定されるシフト量の左シフト処理を仮
数Mに施すことによって得た値を演算処理結果の仮数m
として出力するものである。仮数結果レジスタ205
は、左シフタ204の出力mを格納するものである。
The decrementer 201 outputs a value obtained by subtracting 1 from the index E. Leading 1 detection circuit 202
Is the first bit position in the mantissa M which is searched for in the direction of the least significant bit (LSB) from the bit immediately above the decimal point in the mantissa M, and detects the first bit position, and the detected bit position and one of the decimal points. The difference from the above bit position is output as the carry loss amount LSA. The minimum value selection circuit 203 compares the magnitude of two input data of the output (E-1) of the decrementer 201 and the output LSA of the preceding 1 detection circuit 202 and outputs the smaller input data as the shift amount SH, And the 2
A magnitude discrimination signal CR indicating which of the two input data is smaller is output. When (E-1) <LSA (that is, when E ≦ LSA), SH = E−
1 and CR = 1 and (E-1) ≧ LSA (that is, E> LSA), SH = LSA and C
R = 0. The left shifter 204 has a minimum value selection circuit 20.
The value obtained by subjecting the mantissa M to the left shift processing of the shift amount specified by the output SH of 3 is the mantissa m of the calculation processing result.
Is output as. Mantissa result register 205
Is for storing the output m of the left shifter 204.

【0041】減算回路206は、指数Eから先行1検出
回路202の出力LSAを減じた値を出力するものであ
る。選択回路207は、CR=1の場合には0を、CR
=0の場合には減算回路206の出力(E−LSA)を
各々演算処理結果の指数eとして出力するものである。
指数結果レジスタ208は、選択回路207の出力eを
格納するものである。
The subtraction circuit 206 outputs a value obtained by subtracting the output LSA of the preceding 1 detection circuit 202 from the exponent E. The selection circuit 207 outputs 0 when CR = 1 and CR
When = 0, the output (E-LSA) of the subtraction circuit 206 is output as the exponent e of the calculation processing result.
The exponent result register 208 stores the output e of the selection circuit 207.

【0042】図2の構成によれば、最小値選択回路20
3は、デクリメンタ201の出力(E−1)から先行1
検出回路202の出力(LSA)を減じた値が負になる
かどうかによって、演算処理結果がノーマライズド・ナ
ンバーとなるか、デノーマライズド・ナンバーとなるか
を判定する。この判定の結果に応じてノーマライズ処理
とデノーマライズ処理とのいずれか一方を実行するよう
に、仮数Mのシフト量SHおよび演算処理結果の指数e
が各々決定される。この際、左シフタ204は、ノーマ
ライズ処理とデノーマライズ処理とに共用される。
According to the configuration of FIG. 2, the minimum value selection circuit 20
3 is preceded by 1 from the output (E-1) of the decrementer 201
Depending on whether the value obtained by subtracting the output (LSA) of the detection circuit 202 becomes negative, it is determined whether the operation processing result is a normalized number or a denormalized number. The shift amount SH of the mantissa M and the exponent e of the arithmetic processing result are executed so that either one of the normalizing process and the denormalizing process is executed according to the result of this determination.
Are determined respectively. At this time, the left shifter 204 is used for both the normalizing process and the denormalizing process.

【0043】さて、図2中の最小値選択回路203は、
各々8ビットの2つの入力データX,Yの大小を比較し
て小さい方の入力データを出力データZとし、かつX<
Yのときに大小判別信号出力端子Bの論理値を1とする
機能を備えたものである。この最小値選択回路203
は、図3に示すように入力回路311、中段回路312
および出力回路313を備えており、2つの入力データ
X,Yの各桁毎の大小関係を上位桁から下位桁に向かっ
て伝搬させることにより、出力データZを最上位桁から
順にかつ高速に決定するよう構成されている(特開平3
−12735号公報参照)。
Now, the minimum value selection circuit 203 in FIG.
The size of two 8-bit input data X and Y is compared, the smaller input data is designated as output data Z, and X <
It has a function of setting the logical value of the magnitude discrimination signal output terminal B to 1 when Y. This minimum value selection circuit 203
Is an input circuit 311, an intermediate circuit 312, as shown in FIG.
And the output circuit 313, and the output data Z is determined in order from the most significant digit and at high speed by propagating the magnitude relationship of each digit of the two input data X and Y from the upper digit to the lower digit. Is configured to be
(See No. 12735).

【0044】入出力データX,Y,Zの各ビットをXi
,Yi ,Zi(i=0〜7)とすると、まず入力回路
311において各桁毎に大小関係決定関数gi および大
小関係保留関数pi が作られる。gi =1はXi <Yi
を、pi =1はXi =Yi を各々表わす。
Each bit of the input / output data X, Y, Z is set to Xi.
, Yi, Zi (i = 0 to 7), first, in the input circuit 311, a magnitude relation determining function gi and a magnitude relation holding function pi are created for each digit. gi = 1 is Xi <Yi
, Pi = 1 represents Xi = Yi, respectively.

【0045】次に、該入力回路311の出力gi および
pi に基づいて、中段回路312により、第j桁から第
k桁(j<k)までの大小関係決定関数gjkおよび大小
関係保留関数pjkが作られる。例えば、g67=1は2ビ
ットの大小関係X7 X6 <Y7 Y6 を、p67=1は2ビ
ットの等値関係X7 X6 =Y7 Y6 を各々表わす。ま
た、g47=1は4ビットの大小関係X7 X6 X5 X4 <
Y7 Y6 Y5 Y4 を、p47=1は4ビットの等値関係X
7 X6 X5 X4 =Y7 Y6 Y5 Y4 を各々表わす。これ
らの大小関係決定関数gi ,gjkおよび大小関係保留関
数pi ,pjkは、上位桁から下位桁に向かって伝搬させ
られる。
Next, based on the outputs gi and pi of the input circuit 311, the middle stage circuit 312 determines the magnitude relation determining function gjk and the magnitude relation holding function pjk from the jth digit to the kth digit (j <k). Made For example, g67 = 1 represents a 2-bit magnitude relationship X7 X6 <Y7 Y6, and p67 = 1 represents a 2-bit equality relationship X7 X6 = Y7 Y6. Also, g47 = 1 is a 4-bit magnitude relationship X7 X6 X5 X4 <
Y7 Y6 Y5 Y4, p47 = 1 is a 4-bit equivalence relation X
7 X6 X5 X4 = Y7 Y6 Y5 Y4, respectively. The magnitude relation determining functions gi and gjk and the magnitude relation holding functions pi and pjk are propagated from the upper digit to the lower digit.

【0046】このようにして各桁(第i桁)から最上位
桁(第7桁)までの大小関係決定関数gi7が求められる
と、各桁では、gi7=1である場合にはXi を、gi7=
0の場合にはYi を各々選択し、これをZi とする。こ
れにより、8ビットの出力データZ(最小値)が最上位
桁から順に求められる。ただし、図3の出力回路313
では、Z7 はg7 に応じて、Z6 はg67に応じて、Z5
,Z4 はg47に応じて、Z3 〜Z0 はg07に応じて各
々決定される。X<Yのときに1、X≧Yのときに0と
なる第0桁から第7桁までの大小関係決定関数g07は、
大小判別信号出力端子Bから出力される。
In this way, when the magnitude relation determining function gi7 from each digit (i-th digit) to the most significant digit (7th digit) is obtained, Xi is calculated at each digit when gi7 = 1. gi7 =
In the case of 0, Yi is selected and designated as Zi. As a result, 8-bit output data Z (minimum value) is sequentially obtained from the most significant digit. However, the output circuit 313 of FIG.
Then, Z7 depends on g7, Z6 responds to g67, and Z5
, Z4 are determined according to g47, and Z3 to Z0 are determined according to g07. The magnitude relationship determining function g07 from the 0th digit to the 7th digit, which is 1 when X <Y and 0 when X ≧ Y, is
It is output from the size determination signal output terminal B.

【0047】一方、左シフタ204は、図2に示すよう
に、仮数Mの入力側から順に16ビット、8ビット、4
ビット、2ビット、1ビットの合計5個の個別左シフタ
を連結して構成され、最小値選択回路203の出力Z7
〜Z0 のうちの下位5ビットが各個別左シフタの制御信
号となっている。つまり、最小値選択回路203の出力
(シフト量SH)が最上位桁から順に決定されると、左
シフタ204ではシフト量の多い16ビットシフタから
順次起動されるのである。これにより、最小値選択回路
203の出力の桁が上位から順に決定されるごとに、該
決定された桁に応じたシフト量(2k ビット)の左シフ
ト処理が仮数Mに施される。
On the other hand, the left shifter 204, as shown in FIG. 2, has 16 bits, 8 bits, and 4 bits in order from the input side of the mantissa M.
The output Z7 of the minimum value selection circuit 203 is formed by connecting a total of five individual left shifters of 1 bit, 2 bits, and 1 bit.
The lower 5 bits of Z0 to Z0 are control signals for the individual left shifters. That is, when the output (shift amount SH) of the minimum value selection circuit 203 is sequentially determined from the most significant digit, the left shifter 204 is sequentially activated from the 16-bit shifter with the large shift amount. As a result, every time the digit of the output of the minimum value selection circuit 203 is determined in order from the higher order, the mantissa M is subjected to the left shift processing of the shift amount (2 k bits) according to the determined digit.

【0048】以上のとおり、図2および図3の構成によ
れば、出力データZを上位桁から順に決定する最小値選
択回路203と、シフト量の多いシフタから順に起動さ
れる多段の左シフタ204とを備えた構成を採用したの
で、仮数Mの左シフト処理を高速化できる。なお、単精
度の場合の仮数Mおよび指数Eの各々のビット数を考慮
して最小値選択回路203を8ビット構成とし、左シフ
タ204を左2k (k=0〜4)ビットシフタの5段構
成としたが、これらの構成は仮数Mおよび指数Eのビッ
ト数に応じて適宜変更され得る。
As described above, according to the configurations of FIGS. 2 and 3, the minimum value selection circuit 203 that determines the output data Z in order from the upper digit, and the multistage left shifter 204 that is activated in order from the shifter with the largest shift amount. Since the configuration including and is adopted, the left shift processing of the mantissa M can be speeded up. In consideration of the number of bits of each of the mantissa M and the exponent E in the case of single precision, the minimum value selection circuit 203 has an 8-bit configuration, and the left shifter 204 has five stages of left 2 k (k = 0 to 4) bit shifters. Although the configurations have been adopted, these configurations can be appropriately changed according to the number of bits of the mantissa M and the exponent E.

【0049】図4に第2の演算処理装置の構成を示す。
図4の演算処理装置では、図2中の最小値選択回路20
3が比較選択回路401に置き換えられている。また、
図4中の選択回路402は、CR=1の場合には減算回
路206の出力(E−LSA)を、CR=0の場合には
0を各々出力する点で図2中の選択回路207とは機能
が異なる。
FIG. 4 shows the configuration of the second arithmetic processing unit.
In the arithmetic processing device of FIG. 4, the minimum value selection circuit 20 of FIG.
3 is replaced by the comparison / selection circuit 401. Also,
The selection circuit 402 in FIG. 4 outputs the output (E-LSA) of the subtraction circuit 206 when CR = 1 and outputs 0 (0) when CR = 0, respectively. Have different functions.

【0050】比較選択回路401は、先行1検出回路2
02の出力LSAと指数Eとの2つの入力データの大小
を比較してLSAの方が小さい場合にはLSAを、他の
場合にはデクリメンタ201の出力(E−1)を各々シ
フト量SHとして出力し、かつLSAとEとのうちいず
れが小さいかを示す大小判別信号CRを出力するもので
ある。LSA<Eである場合にはSH=LSAかつCR
=1であり、LSA≧Eである場合にはSH=E−1か
つCR=0である。
The comparison / selection circuit 401 is the leading 1 detection circuit 2
The output LSA of 02 and the index E are compared in magnitude, and when the LSA is smaller, the LSA is set, and in other cases, the output (E-1) of the decrementer 201 is set as the shift amount SH. It outputs a large / small discriminating signal CR indicating which of LSA and E is smaller. If LSA <E, then SH = LSA and CR
= 1 and LSA ≧ E, then SH = E−1 and CR = 0.

【0051】図4の構成によれば、比較選択回路401
は、先行1検出回路202の出力LSAから指数Eを減
じた値が負になるかどうかによって、演算処理結果がノ
ーマライズド・ナンバーとなるか、デノーマライズド・
ナンバーとなるかを判定する。この際、比較選択回路4
01は、図2中の最小値選択回路203の場合とは違っ
てデクリメンタ201の出力が確定する前に2つの入力
データの大小比較を開始できるので、判定が高速化され
る。そして、この判定の結果に応じてノーマライズ処理
とデノーマライズ処理とのいずれか一方を実行するよう
に、仮数Mのシフト量SHおよび演算処理結果の指数e
が各々決定される。この際、左シフタ204は、ノーマ
ライズ処理とデノーマライズ処理とに共用される。
According to the configuration of FIG. 4, the comparison / selection circuit 401
Depending on whether or not the value obtained by subtracting the exponent E from the output LSA of the preceding 1 detection circuit 202 becomes negative, the operation processing result becomes a normalized number or a denormalized number.
Determine if it will be a number. At this time, the comparison / selection circuit 4
Unlike in the case of the minimum value selection circuit 203 in FIG. 2, 01 can start the size comparison of the two input data before the output of the decrementer 201 is fixed, so that the determination can be speeded up. Then, the shift amount SH of the mantissa M and the exponent e of the calculation processing result are executed so that either one of the normalization processing and the denormalization processing is executed according to the result of this determination.
Are determined respectively. At this time, the left shifter 204 is used for both the normalizing process and the denormalizing process.

【0052】さて、図4中の比較選択回路401は、各
々8ビットの第1および第2の入力データX,Yの大小
を比較してX<Yの場合にはXを、X≧Yの場合には同
じく8ビットの第3の入力データSを各々出力データZ
とし、かつX<Yのときに大小判別信号出力端子Bの論
理値を1とする機能を備えたものである。この比較選択
回路401は、図5に示すように入力回路411、中段
回路412および出力回路413を備えており、前記最
小値選択回路203の場合と同様に、2つの入力データ
X,Yの各桁毎の大小関係を上位桁から下位桁に向かっ
て伝搬させることにより、出力データZを最上位桁から
順にかつ高速に決定するよう構成されている。
The comparison / selection circuit 401 in FIG. 4 compares the magnitudes of the first and second 8-bit input data X and Y, respectively, and when X <Y, X is set, and X ≧ Y. In the case, similarly, the 8-bit third input data S is output data Z respectively.
And a function of setting the logical value of the magnitude discrimination signal output terminal B to 1 when X <Y. As shown in FIG. 5, the comparison / selection circuit 401 includes an input circuit 411, a middle-stage circuit 412, and an output circuit 413. As in the case of the minimum value selection circuit 203, each of the two input data X and Y is input. By propagating the magnitude relation for each digit from the upper digit to the lower digit, the output data Z is determined in order from the most significant digit and at high speed.

【0053】図4および図5の構成によれば、出力デー
タZを上位桁から順に決定する比較選択回路401と、
シフト量の多いシフタから順に起動される多段の左シフ
タ204とを備えた構成を採用したので、仮数Mの左シ
フト処理を高速化できる。なお、単精度の場合の仮数M
および指数Eの各々のビット数を考慮して比較選択回路
401を8ビット構成とし、左シフタ204を左2
k (k=0〜4)ビットシフタの5段構成としたが、こ
れらの構成は仮数Mおよび指数Eのビット数に応じて適
宜変更され得る。
According to the configurations of FIGS. 4 and 5, a comparison / selection circuit 401 for determining the output data Z in order from the upper digit,
Since the configuration including the multi-stage left shifter 204 that is activated in order from the shifter with the largest shift amount is adopted, the left shift processing of the mantissa M can be speeded up. Note that the mantissa M for single precision
In consideration of the number of bits of each of E and E, the comparison / selection circuit 401 has an 8-bit configuration, and the left shifter 204 is left 2
Although a 5-stage configuration of k (k = 0 to 4) bit shifters is used, these configurations can be appropriately changed according to the number of bits of the mantissa M and the exponent E.

【0054】図6に第3の演算処理装置の構成を示す。
この演算処理装置中のデクリメンタ201、先行1検出
回路202、仮数結果レジスタ205、第1の選択回路
207および指数結果レジスタ208は、図2中の同一
符号の構成要素と同じ機能を有するものである。図6に
おいて、601は減算回路、602は第2の選択回路、
603は左シフタである。
FIG. 6 shows the configuration of the third arithmetic processing unit.
The decrementer 201, the leading 1 detection circuit 202, the mantissa result register 205, the first selection circuit 207, and the exponent result register 208 in this arithmetic processing device have the same functions as the components having the same reference numerals in FIG. . In FIG. 6, 601 is a subtraction circuit, 602 is a second selection circuit,
Reference numeral 603 is a left shifter.

【0055】減算回路601は、先行1検出回路202
の出力LSAを指数Eから減じた値(E−LSA)を減
算結果として出力し、かつE≦LSAであるか否かを示
す大小判別信号Ibを出力するものである。E≦LSA
である場合にはIb=1であり、E>LSAである場合
にはIb=0である。第1の選択回路207は、Ib=
1の場合には0を、Ib=0の場合には減算回路601
の出力(E−LSA)を各々演算処理結果の指数eとし
て出力する。第2の選択回路602は、Ib=1の場合
にはデクリメンタ201の出力(E−1)を、Ib=0
の場合には先行1検出回路202の出力LSAを各々シ
フト量SHとして出力するものである。左シフタ603
は、第2の選択回路602の出力SHで指定されるシフ
ト量の左シフト処理を仮数Mに施すことによって得た値
を演算処理結果の仮数mとして出力するものである。左
シフタ603の内部構成は、前記多段シフタ(図2中の
204)に限らない。
The subtraction circuit 601 is a leading 1 detection circuit 202.
Is output as a subtraction result, and a magnitude discrimination signal Ib indicating whether or not E ≦ LSA is output. E ≦ LSA
If Ib = 1, and if E> LSA, then Ib = 0. The first selection circuit 207 has Ib =
When 1 is 0, when Ib = 0, the subtraction circuit 601
(E-LSA) is output as the exponent e of the arithmetic processing result. The second selection circuit 602 sets the output (E-1) of the decrementer 201 to Ib = 0 when Ib = 1.
In this case, the output LSA of the preceding 1 detection circuit 202 is output as each shift amount SH. Left shifter 603
Outputs the value obtained by subjecting the mantissa M to the left shift processing of the shift amount designated by the output SH of the second selection circuit 602, as the mantissa m of the arithmetic processing result. The internal configuration of the left shifter 603 is not limited to the multistage shifter (204 in FIG. 2).

【0056】図6中の減算回路601は、図2中の減算
回路206および最小値選択回路203の各々の機能を
兼ね備えたものであって、指数Eの補正に供せられる減
算結果(E−LSA)を出力すると同時に、EからLS
Aを減じた値が0以下になるかどうかによって、演算処
理結果がノーマライズド・ナンバーとなるか、デノーマ
ライズド・ナンバーとなるかを判定する。この判定の結
果に応じてノーマライズ処理とデノーマライズ処理との
いずれか一方を実行するように、仮数Mのシフト量SH
および演算処理結果の指数eが各々決定される。この
際、左シフタ603は、ノーマライズ処理とデノーマラ
イズ処理とに共用される。
The subtraction circuit 601 in FIG. 6 has the respective functions of the subtraction circuit 206 and the minimum value selection circuit 203 in FIG. 2, and the subtraction result (E- (LSA) is output, and at the same time, E to LS
Whether the arithmetic processing result is a normalized number or a denormalized number is determined depending on whether the value obtained by subtracting A becomes 0 or less. The shift amount SH of the mantissa M is set so that either one of the normalizing process and the denormalizing process is executed according to the result of this determination.
And the index e of the arithmetic processing result is determined. At this time, the left shifter 603 is used for both the normalize process and the denormalize process.

【0057】さて、図6中の減算回路601は、各々8
ビットの2つの入力データX,Yのについて減算結果
(X−Y)を出力データZとし、かつX≦Yのときに大
小判別信号Ibの論理値を1とする機能を備えたもので
ある。この減算回路601は、図7に示すように入力回
路611、中段回路612および出力回路613を備え
ており、2つの入力データX,Yの各桁毎の大小関係を
下位桁から上位桁に向かって伝搬させることにより出力
データZを決定するよう構成されている。
Now, the subtraction circuits 601 in FIG.
The subtraction result (X−Y) of the two bit input data X and Y is used as output data Z, and the logical value of the magnitude determination signal Ib is set to 1 when X ≦ Y. As shown in FIG. 7, the subtraction circuit 601 includes an input circuit 611, a middle circuit 612, and an output circuit 613, and the magnitude relationship of the two input data X and Y for each digit is changed from the lower digit to the upper digit. The output data Z is determined by propagating the output data Z.

【0058】入出力データX,Y,Zの各ビットをXi
,Yi ,Zi(i=0〜7)とすると、まず入力回路
611において各桁毎に桁借り生成信号Igi および桁
借り伝搬信号Ipi が作られる。桁借り生成信号Igi
は、広く知られているとおり、第i桁に関するXi −Y
i の演算において第(i+1)桁からの桁借りが発生し
たことをIgi =1が表わすように作られる減算実行の
ための信号である。ただし、Igi =1はXi <Yi で
あることをも表わしている。一方、桁借り伝搬信号Ip
i は、同様に広く知られているとおり、演算Xi −Yi
において、第i桁から第(i−1)桁への桁借りが発生
している場合にIpi =1であれば第(i+1)桁から
の桁借りが発生していると判定できるように作られる減
算実行のための他の信号である。ただし、第(i−1)
桁に発生した桁借りによって第(i+1)桁からの桁借
りが発生するのであるから、Ipi =1はXi =Yi で
あることをも表わしている。
Each bit of input / output data X, Y, Z is set to Xi.
, Yi, Zi (i = 0 to 7), first, the input circuit 611 generates the borrow generation signal Igi and the borrow propagation signal Ipi for each digit. Borrow generation signal Igi
Is, as is widely known, Xi-Y with respect to the i-th digit.
It is a signal for executing subtraction, which is created so that Ig i = 1 indicates that borrowing from the (i + 1) th digit has occurred in the operation of i. However, Igi = 1 also means that Xi <Yi. On the other hand, the borrow propagation signal Ip
i is the operation Xi-Yi, as is also widely known.
In I, if a borrow from the i-th digit to the (i-1) th digit occurs, if Ipi = 1, it can be determined that a borrow from the (i + 1) th digit occurs. It is another signal for performing the subtraction performed. However, the (i-1)
Since borrowing from a digit causes borrowing from the (i + 1) th digit, Ipi = 1 also indicates that Xi = Yi.

【0059】次に、該入力回路611の出力Igi およ
びIpi に基づいて、中段回路612により、第k桁か
ら第j桁(k<j)までの桁借り生成信号Igjkおよび
桁借り伝搬信号Ipjkが作られる。例えば、第2桁から
第3桁までの桁借り生成信号Ig32は、2ビットの演算
X3 X2 −Y3 Y2 において第4桁からの桁借りが発生
したことをIg32=1が表わすように作られる減算実行
のための信号である。ただし、Ig32=1は2ビットの
大小関係X3 X2 <Y3 Y2 をも表わしている。一方、
第2桁から第3桁までの桁借り伝搬信号Ip32は、演算
X3 X2 −Y3Y2 において、第2桁から第1および第
0桁の2ビットへの桁借りが発生している場合にIp32
=1であれば第4桁からの桁借りが発生していると判定
できるように作られる減算実行のための他の信号であ
る。ただし、第1桁または第0桁に発生した桁借りによ
って第4桁からの桁借りが発生するのであるから、Ip
32=1は2ビットの等値関係X3 X2 =Y3 Y2 をも表
わしている。これらの桁借り生成信号Igi ,Igjkお
よび桁借り伝搬信号Ipi ,Ipjkは、下位桁から上位
桁に向かって伝搬させられる。
Next, based on the outputs Igi and Ipi of the input circuit 611, the intermediate circuit 612 generates the borrow generation signal Igjk and the borrow propagation signal Ipjk from the kth digit to the jth digit (k <j). Made For example, the borrow generation signal Ig32 from the second digit to the third digit is made so that Ig32 = 1 indicates that the borrow from the fourth digit has occurred in the 2-bit operation X3 X2-Y3 Y2. It is a signal for execution. However, Ig32 = 1 also represents a 2-bit magnitude relationship X3 X2 <Y3 Y2. on the other hand,
The borrow propagation signal Ip32 from the second digit to the third digit is Ip32 when the borrow from the second digit to the two bits of the first digit and the zeroth digit occurs in the operation X3X2-Y3Y2.
If = 1, it is another signal for execution of subtraction that is made so that it can be determined that borrowing from the fourth digit has occurred. However, because borrowing from the first digit or zeroth digit causes borrowing from the fourth digit, Ip
32 = 1 also represents the 2-bit equivalence relation X3 X2 = Y3 Y2. The borrow generation signals Igi and Igjk and the borrow propagation signals Ipi and Ipjk are propagated from the lower digit to the upper digit.

【0060】このようにして最下位桁(第0桁)から各
桁(第i桁)までの桁借り生成信号Igi0が求められる
と、各桁では、出力回路613においてIpi とIg(i
-1)0とに基づいてZi が生成される。ただし、Z1 はI
p1 とIg0 とに基づいて生成される。最下位桁からの
桁借りはないので、Z0 はIp0 のみに応じて決定され
る。
In this way, when the borrow borrow generation signal Igi0 from the least significant digit (0th digit) to each digit (ith digit) is obtained, Ipi and Ig (i in the output circuit 613 at each digit.
Zi is generated based on -1) 0. However, Z1 is I
It is generated based on p1 and Ig0. Since there is no borrow from the least significant digit, Z0 is determined only by Ip0.

【0061】第0桁から第7桁までの桁借り生成信号I
g70および桁借り伝搬信号Ip70のうちの少なくとも一
方が1であることは、X≦Yを表わす。すなわち、大小
判別信号Ibは、 Ib=Ig70+Ip70 (3) と表現することができる。ところが、 Ig70=Ig74+Ip74・Ig30 (4) Ip70=Ip74・Ip30 (5) であることから、 Ib=Ig74+Ip74・Ig30+Ip74・Ip30 =Ig74+Ip74・(Ig30+Ip30) (6) となる。図7の出力回路613では、式(6)の関係を
用いて大小判別信号Ibを生成している。
The borrow generation signal I from the 0th digit to the 7th digit
The fact that at least one of g70 and the borrow propagation signal Ip70 is 1 represents X ≦ Y. That is, the magnitude discrimination signal Ib can be expressed as Ib = Ig70 + Ip70 (3). However, since Ig70 = Ig74 + Ip74 · Ig30 (4) Ip70 = Ip74 · Ip30 (5), Ib = Ig74 + Ip74 · Ig30 + Ip74 · Ip30 = Ig74 + Ip74 · (Ig30 + Ip30) (6). In the output circuit 613 of FIG. 7, the magnitude determination signal Ib is generated using the relationship of the equation (6).

【0062】一般に、X−Yの減算を実行するための減
算回路において減算結果が負になるかどうかを判定する
ことは容易である。最上位桁に桁借りが生じるかどうか
を判断すればよいのである。ところが、減算結果が0以
下になるかどうかを判定することは困難である。減算結
果が0になるかどうかを判断することが難しいからであ
る。減算結果の全てのビットが0であることを確認した
り、X−Yが負ではなくかつX−Y−1が負であること
を確認したりするための回路を付加することが考えられ
るが、減算回路のハードウェア量が増大する。ところ
が、図7の減算回路601によれば、ハードウェアの大
部分が出力データZの算出とX≦Y(X−Y≦0)を表
わす大小判別信号Ibの生成とに共用されるので、その
ハードウェア量の削減が可能になる。
In general, it is easy to determine whether or not the subtraction result is negative in the subtraction circuit for executing the X-Y subtraction. All you have to do is determine whether or not the highest digit will be borrowed. However, it is difficult to determine whether the subtraction result becomes 0 or less. This is because it is difficult to determine whether the subtraction result becomes 0. It is possible to add a circuit for confirming that all the bits of the subtraction result are 0, or confirming that XY is not negative and XY-1 is negative. , The amount of hardware of the subtraction circuit increases. However, according to the subtraction circuit 601 of FIG. 7, most of the hardware is shared between the calculation of the output data Z and the generation of the magnitude determination signal Ib representing X ≦ Y (X−Y ≦ 0). The amount of hardware can be reduced.

【0063】図8に第4の演算処理装置の構成を示す。
図8の演算処理装置では、図7中のデクリメンタ201
を取り去る代りに、右1ビットシフタ604を左シフタ
603と仮数結果レジスタ205との間に介在させてい
る。左シフタ603と右1ビットシフタ604とは、双
方向シフタ605を構成する。
FIG. 8 shows the configuration of the fourth arithmetic processing unit.
In the arithmetic processing device of FIG. 8, the decrementer 201 of FIG.
Instead of removing, the right 1-bit shifter 604 is interposed between the left shifter 603 and the mantissa result register 205. The left shifter 603 and the right 1-bit shifter 604 form a bidirectional shifter 605.

【0064】第2の選択回路602は、Ib=1の場合
には指数Eを、Ib=0の場合には先行1検出回路20
2の出力LSAを各々シフト量SHとして左シフタ60
3に出力する。右1ビットシフタ604は、Ib=1の
場合には左シフタ603の出力に右1ビットシフト処理
を施すことによって得た値を、Ib=0の場合には該左
シフタ603の出力そのものを各々演算処理結果の仮数
mとして出力するものである。
The second selection circuit 602 uses the exponent E when Ib = 1 and the preceding 1 detection circuit 20 when Ib = 0.
The left shifter 60 sets the output LSA of 2 as the shift amount SH.
Output to 3. The right 1-bit shifter 604 calculates the value obtained by subjecting the output of the left shifter 603 to the right 1-bit shift processing when Ib = 1 and the output itself of the left shifter 603 when Ib = 0. It is output as the mantissa m of the processing result.

【0065】図8の構成によれば、演算処理結果がデノ
ーマライズド・ナンバーになるとの判定(Ib=1)が
減算回路601(図7の内部構成を持つ。)によって下
された場合には、左シフタ603に与えられるシフト量
SHがEに設定されると同時に右1ビットシフタ604
によるシフト動作が起動させられる結果、所望のシフト
量(E−1)の左シフト処理が仮数Mに施されることと
なる。一方、演算処理結果がノーマライズド・ナンバー
になると判定された場合(Ib=0)には、左シフタ6
03に与えられるシフト量SHがLSAに設定されると
同時に右1ビットシフタ604のシフト動作が停止させ
られる結果、所望のシフト量(LSA)の左シフト処理
が仮数Mに施される。つまり、図8の構成によれば、右
1ビットシフタ603を設けることによって図6中のデ
クリメンタ201が不要になり、演算処理装置の構成が
簡略化される。演算処理結果の指数eの決定方法は、図
6の場合と同様である。
According to the configuration of FIG. 8, when it is determined by the subtraction circuit 601 (having the internal configuration of FIG. 7) that the calculation processing result becomes the denormalized number (Ib = 1). , The shift amount SH given to the left shifter 603 is set to E and at the same time the right 1-bit shifter 604
As a result of activating the shift operation by, the mantissa M is subjected to the left shift processing of the desired shift amount (E-1). On the other hand, when it is determined that the arithmetic processing result is the normalized number (Ib = 0), the left shifter 6
As the shift amount SH given to 03 is set to LSA and the shift operation of the right 1-bit shifter 604 is stopped at the same time, the mantissa M is subjected to the left shift process of a desired shift amount (LSA). That is, according to the configuration of FIG. 8, by providing the right 1-bit shifter 603, the decrementer 201 in FIG. 6 becomes unnecessary, and the configuration of the arithmetic processing device is simplified. The method of determining the index e of the calculation processing result is the same as in the case of FIG.

【0066】なお、図8に示す例では右1ビットシフタ
604を左シフタ603の出力側に設けたが、これを左
シフタ603の入力側に設けても差し支えない。
In the example shown in FIG. 8, the right 1-bit shifter 604 is provided on the output side of the left shifter 603, but it may be provided on the input side of the left shifter 603.

【0067】[0067]

【発明の効果】以上説明してきたとおり、請求項1の発
明によれば、ノーマライズ処理を実行する前に指数Eと
仮数の桁落ち量LSAとの大小関係を判別し、該判別の
結果に応じてノーマライズ処理とデノーマライズ処理と
のいずれか一方を実行するように仮数Mのシフト量およ
び演算処理結果の指数を各々決定する構成を採用したの
で、浮動小数点2進数の演算結果が高速に得られること
となる。つまり、演算処理結果がデノーマライズド・ナ
ンバーとなる場合であっても、ノーマライズド・ナンバ
ーの場合と同じように処理を高速実行することができ
る。
As described above, according to the first aspect of the present invention, the magnitude relationship between the exponent E and the mantissa digit loss amount LSA is discriminated before the normalizing process is executed, and the result is discriminated according to the discrimination result. Since the shift amount of the mantissa M and the exponent of the arithmetic processing result are respectively decided so as to execute either one of the normalization processing and the denormalization processing, the arithmetic result of the floating point binary number can be obtained at high speed. It will be. That is, even when the arithmetic processing result is the denormalized number, the processing can be executed at high speed as in the case of the normalized number.

【0068】請求項2の発明によれば、演算処理結果が
ノーマライズド・ナンバーとなるか、デノーマライズド
・ナンバーとなるかを判定するための比較手段を設け、
該判定の結果に応じて仮数Mのシフト量および演算処理
結果の指数を各々決定することとしたので、請求項1の
発明に係る演算処理方法を効率良く実行するための演算
処理装置(ハードウェア)を提供することができる。し
たがって、デノーマライズ処理をソフトウェアに委ねて
いた従来に比べて、デノーマライズ処理の高速化を図る
ことができる。しかもシフト手段をノーマライズ処理と
デノーマライズ処理とに共用することとしたので、ハー
ドウェアが削減される。
According to the second aspect of the present invention, the comparison means is provided for determining whether the arithmetic processing result is the normalized number or the denormalized number.
Since the shift amount of the mantissa M and the exponent of the arithmetic processing result are respectively determined according to the result of the judgment, the arithmetic processing device (hardware) for efficiently executing the arithmetic processing method according to the invention of claim 1. ) Can be provided. Therefore, the denormalization process can be speeded up as compared with the conventional case in which the denormalization process is entrusted to software. Moreover, since the shift means is used for both the normalizing process and the denormalizing process, the hardware is reduced.

【0069】請求項3の発明によれば、請求項2の発明
に係る演算処理装置において、出力を上位桁から順に決
定する最小値選択回路と、シフト量の多いシフタから順
に起動される多段シフタとを備えた構成を採用したの
で、仮数Mの左シフト処理を高速化できる。
According to the invention of claim 3, in the arithmetic processing device according to the invention of claim 2, a minimum value selection circuit for sequentially determining an output from a higher digit and a multi-stage shifter activated in order from a shifter with a large shift amount. Since the configuration including and is adopted, the left shift processing of the mantissa M can be speeded up.

【0070】請求項4の発明によれば、大小比較の対象
となる第1および第2の入力データとは異なる第3の入
力データ(デクリメント手段の出力)をシフト量SHと
して出力し得る比較選択手段を備えた構成を採用したの
で、第3の入力データが確定する前に第1および第2の
入力データの大小比較を開始できる結果、演算処理が高
速化される。
According to the invention of claim 4, the third selection data (the output of the decrement means) different from the first and the second input data to be compared in magnitude is output as the shift amount SH. Since the configuration including the means is adopted, the comparison of the magnitudes of the first and second input data can be started before the third input data is determined, and as a result, the arithmetic processing is speeded up.

【0071】請求項5の発明によれば、請求項4の発明
に係る演算処理装置において、出力を上位桁から順に決
定する比較選択回路と、シフト量の多いシフタから順に
起動される多段シフタとを備えた構成を採用したので、
仮数Mの左シフト処理を高速化できる。
According to a fifth aspect of the present invention, in the arithmetic processing unit according to the fourth aspect of the invention, there is provided a comparison / selection circuit for sequentially determining an output from a higher digit, and a multi-stage shifter activated in order from a shifter with a larger shift amount. Since the configuration with is adopted,
The left shift processing of the mantissa M can be speeded up.

【0072】請求項6の発明によれば、ノーマライズ処
理の場合の指数Eの補正と演算処理結果がノーマライズ
ド・ナンバーとなるか、デノーマライズド・ナンバーと
なるかの判定とを同時に実行し得る減算手段を備えた構
成を採用したので、ハードウェアが削減される。
According to the sixth aspect of the present invention, the correction of the index E in the case of the normalizing process and the determination as to whether the calculation process result is the normalized number or the denormalized number can be executed at the same time. Since the configuration including the subtraction unit is adopted, the hardware is reduced.

【0073】請求項7の発明によれば、ノーマライズ処
理の場合の指数Eの補正と演算処理結果がノーマライズ
ド・ナンバーとなるか、デノーマライズド・ナンバーと
なるかの判定とを同時に実行し得る減算手段を備えた構
成を採用したので、ハードウェアが削減される。また、
演算処理結果がデノーマライズド・ナンバーとなる場合
に左シフト量を調整し得るシフト処理手段を備えた構成
を採用したので、ハードウェアがさらに削減される。
According to the invention of claim 7, the correction of the exponent E in the case of the normalizing process and the judgment of whether the arithmetic processing result is the normalized number or the denormalized number can be simultaneously executed. Since the configuration including the subtraction unit is adopted, the hardware is reduced. Also,
Since the configuration including the shift processing means capable of adjusting the left shift amount when the calculation processing result becomes the denormalized number is adopted, the hardware is further reduced.

【0074】請求項8の発明によれば、請求項7の発明
に係る演算処理装置において、シフト量可変の左シフタ
とその出力側に接続された右1ビットシフタとを備えた
シフト処理手段の構成を採用したので、左シフト量の調
整を容易に実現できる。
According to the invention of claim 8, in the arithmetic processing device according to the invention of claim 7, the shift processing means is provided with a left shifter with a variable shift amount and a right 1-bit shifter connected to the output side thereof. Since, the adjustment of the left shift amount can be easily realized.

【0075】請求項9又は10の発明によれば、減算結
果を算出しかつ該減算結果が0以下になるかどうかを示
す大小判別信号を生成するに際し、2つの入力データの
減算における最下位桁から最上位桁までの桁借り伝搬を
考慮した桁借り生成信号および桁借り伝搬信号を利用す
る構成を採用したので、ハードウェア量を削減した減算
手段(減算回路)を実現できる。
According to the invention of claim 9 or 10, when the subtraction result is calculated and the magnitude discriminating signal indicating whether the subtraction result becomes 0 or less is generated, the least significant digit in the subtraction of the two input data. To the most significant digit, the structure using the borrow borrow generation signal and the borrow borrow propagation signal in consideration of the borrow propagation is adopted, so that the subtraction means (subtraction circuit) with reduced hardware amount can be realized.

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

【図1】本発明の実施例に係る演算処理方法の処理の流
れを示すフローチャート図である。
FIG. 1 is a flowchart showing a processing flow of an arithmetic processing method according to an embodiment of the present invention.

【図2】本発明の実施例に係る第1の演算処理装置の構
成を示すブロック図である。
FIG. 2 is a block diagram showing a configuration of a first arithmetic processing unit according to an embodiment of the present invention.

【図3】図2中の最小値選択回路の内部構成を示す回路
図である。
FIG. 3 is a circuit diagram showing an internal configuration of a minimum value selection circuit in FIG.

【図4】本発明の実施例に係る第2の演算処理装置の構
成を示すブロック図である。
FIG. 4 is a block diagram showing a configuration of a second arithmetic processing unit according to an embodiment of the present invention.

【図5】図4中の比較選択回路の内部構成を示す回路図
である。
5 is a circuit diagram showing an internal configuration of a comparison / selection circuit in FIG.

【図6】本発明の実施例に係る第3の演算処理装置の構
成を示すブロック図である。
FIG. 6 is a block diagram showing a configuration of a third arithmetic processing unit according to an embodiment of the present invention.

【図7】図6中の減算回路の内部構成を示す回路図であ
る。
7 is a circuit diagram showing an internal configuration of a subtraction circuit in FIG.

【図8】本発明の実施例に係る第4の演算処理装置の構
成を示すブロック図である。
FIG. 8 is a block diagram showing a configuration of a fourth arithmetic processing unit according to an embodiment of the present invention.

【符号の説明】[Explanation of symbols]

201 デクリメンタ(デクリメント手段) 202 先行1検出回路(先行1検出手段) 203 最小値選択回路(比較手段) 204 左シフタ(シフト手段) 205 仮数結果レジスタ 206 減算回路(減算手段) 207 選択回路(選択手段,第1の選択手段) 208 指数結果レジスタ 401 比較選択回路(比較選択手段) 402 選択回路(選択手段) 601 減算回路(減算手段) 602 第2の選択回路(第2の選択手段) 603 左シフタ(シフト手段) 604 右1ビットシフタ 605 双方向シフタ(シフト処理手段) 201 Decrementor (decrement means) 202 Leading 1 detection circuit (leading 1 detection means) 203 Minimum value selection circuit (comparison means) 204 Left shifter (shift means) 205 Mantissa result register 206 Subtraction circuit (subtraction means) 207 Selection circuit (selection means) , First selection means) 208 exponent result register 401 comparison selection circuit (comparison selection means) 402 selection circuit (selection means) 601 subtraction circuit (subtraction means) 602 second selection circuit (second selection means) 603 left shifter (Shift means) 604 Right 1-bit shifter 605 Bidirectional shifter (shift processing means)

Claims (10)

【特許請求の範囲】[Claims] 【請求項1】 仮数と指数とを有する浮動小数点2進数
の演算処理装置において前記仮数にシフト処理を施しか
つ前記指数を調整するための演算処理方法であって、 前記仮数中の先行する1のビット位置と小数点の1つ上
のビット位置との差を該仮数の桁落ち量として求めるス
テップと、 前記指数と前記桁落ち量との大小を比較するステップ
と、 前記指数より前記桁落ち量の方が小さい場合には該桁落
ち量を、他の場合には前記指数から1を減じた値を各々
シフト量とする左シフト処理を前記仮数に施すことによ
って演算処理結果の仮数を得るステップと、 前記指数より前記桁落ち量の方が小さい場合には該指数
から該桁落ち量を減じた値を、他の場合には0を各々演
算処理結果の指数とするステップとを備えたことを特徴
とする演算処理方法。
1. An arithmetic processing method for performing shift processing on the mantissa and adjusting the exponent in an arithmetic processing device for a floating point binary number having a mantissa and an exponent. Determining the difference between the bit position and the bit position one digit above the decimal point as the digit loss amount of the mantissa, comparing the magnitude of the exponent and the digit loss amount, and calculating the digit loss amount from the exponent. A step of obtaining a mantissa as a result of the arithmetic processing by subjecting the mantissa to a left shift process in which the digit cancellation amount is smaller when the one is smaller and the shift amount is a value obtained by subtracting 1 from the exponent in other cases. , A value obtained by subtracting the digit cancellation amount from the exponent when the digit cancellation amount is smaller than the exponent, and 0 being the exponent of the arithmetic processing result in other cases. Characteristic arithmetic processing Law.
【請求項2】 浮動小数点2進数の仮数にシフト処理を
施しかつ該浮動小数点2進数の指数を調整するための演
算処理装置であって、 前記仮数中の先行する1のビット位置を検出し、かつ該
ビット位置と小数点の1つ上のビット位置との差を該仮
数の桁落ち量として出力するための先行1検出手段と、 前記指数から1を減じた値を出力するためのデクリメン
ト手段と、 前記デクリメント手段の出力と前記先行1検出手段から
出力された桁落ち量との2つの入力データの大小を比較
して小さい方の入力データを大小判別結果として出力
し、かつ前記2つの入力データのうちいずれが小さいか
を示す大小判別信号を出力するための比較手段と、 前記先行1検出手段から出力された桁落ち量を前記指数
から減じた値を出力するための減算手段と、 前記2つの入力データのうち前記デクリメント手段の出
力の方が小さいことを前記比較手段からの大小判別信号
が示す場合には0を、他の場合には前記減算手段の出力
を各々演算処理結果の指数として出力するための選択手
段と、 前記比較手段から出力された大小判別結果をシフト量と
する左シフト処理を前記仮数に施すことによって得た値
を演算処理結果の仮数として出力するためのシフト手段
とを備えたことを特徴とする演算処理装置。
2. An arithmetic processing unit for performing shift processing on a mantissa of a floating-point binary number and adjusting an exponent of the floating-point binary number, detecting a preceding bit position of 1 in the mantissa, And a leading 1 detection means for outputting the difference between the bit position and the bit position one place above the decimal point as the precision loss of the mantissa, and a decrement means for outputting a value obtained by subtracting 1 from the exponent. Comparing the magnitudes of the two input data, the output of the decrementing means and the digit cancellation amount output from the preceding 1 detecting means, and outputting the smaller input data as the magnitude determination result, and the two input data. Comparing means for outputting a magnitude discriminating signal indicating which of the two is smaller; subtracting means for outputting a value obtained by subtracting the digit loss amount output from the preceding 1 detection means from the exponent; Of the two input data, 0 is output if the magnitude discriminating signal from the comparing means indicates that the output of the decrementing means is smaller, and otherwise, the output of the subtracting means is output as the operation result. Selection means for outputting as an exponent, and shift for outputting a value obtained by subjecting the mantissa to left shift processing with the magnitude determination result output from the comparing means as a shift amount, as the mantissa of the arithmetic processing result. An arithmetic processing unit comprising:
【請求項3】 請求項2記載の演算処理装置において、 前記比較手段は、前記2つの入力データの各桁毎の大小
関係を上位桁から下位桁に向かって伝搬させることによ
り前記大小判別結果を上位桁から順に出力するための最
小値選択回路を備え、かつ前記シフト手段は、前記最小
値選択回路から出力された大小判別結果の下位nビット
に各々対応した左2k (k=0,1,2,…,n−1)
ビットシフタを縦続接続してなることを特徴とする演算
処理装置。
3. The arithmetic processing unit according to claim 2, wherein the comparing means propagates the magnitude relationship of each digit of the two input data from a higher digit to a lower digit to obtain the magnitude discrimination result. The shift means is provided with a minimum value selection circuit for sequentially outputting from the upper digit, and the shift means outputs left 2 k (k = 0, 1) corresponding to the lower n bits of the magnitude discrimination result output from the minimum value selection circuit. , 2, ..., n-1)
An arithmetic processing unit comprising bit shifters connected in cascade.
【請求項4】 浮動小数点2進数の仮数にシフト処理を
施しかつ該浮動小数点2進数の指数を調整するための演
算処理装置であって、 前記仮数中の先行する1のビット位置を検出し、かつ該
ビット位置と小数点の1つ上のビット位置との差を該仮
数の桁落ち量として出力するための先行1検出手段と、 前記指数から1を減じた値を出力するためのデクリメン
ト手段と、 前記先行1検出手段から出力された桁落ち量と前記指数
との2つの入力データの大小を比較して桁落ち量の方が
小さい場合には該桁落ち量を、他の場合には前記デクリ
メント手段の出力を各々大小判別結果として出力し、か
つ前記2つの入力データのうちいずれが小さいかを示す
大小判別信号を出力するための比較選択手段と、 前記先行1検出手段から出力された桁落ち量を前記指数
から減じた値を出力するための減算手段と、 前記2つの入力データのうち前記先行1検出手段から出
力された桁落ち量の方が小さいことを前記比較選択手段
からの大小判別信号が示す場合には前記減算手段の出力
を、他の場合には0を各々演算処理結果の指数として出
力するための選択手段と、 前記比較選択手段から出力された大小判別結果をシフト
量とする左シフト処理を前記仮数に施すことによって得
た値を演算処理結果の仮数として出力するためのシフト
手段とを備えたことを特徴とする演算処理装置。
4. An arithmetic processing unit for performing shift processing on a mantissa of a floating point binary number and adjusting an exponent of the floating point binary number, wherein a preceding bit position of 1 in the mantissa is detected, And a leading 1 detection means for outputting the difference between the bit position and the bit position one place above the decimal point as the precision loss of the mantissa, and a decrement means for outputting a value obtained by subtracting 1 from the exponent. Comparing the magnitudes of two input data of the leading loss detecting unit and the exponent and comparing the magnitudes of the two input data, if the leading loss is smaller, the leading loss is used. In other cases, the leading loss is used. A comparison / selection means for outputting the output of the decrement means as a magnitude discrimination result and for outputting a magnitude discrimination signal indicating which of the two input data is smaller, and a digit output from the preceding 1 detection means. Drop amount A subtraction unit for outputting a value subtracted from the exponent; and a magnitude discriminating signal from the comparison and selection unit indicating that the digit cancellation amount output from the preceding 1 detection unit out of the two input data is smaller. In the case shown, selection means for outputting the output of the subtraction means, and 0 in other cases as the exponent of the arithmetic processing result, and the left and the left which have the magnitude determination result output from the comparison selection means as the shift amount. An arithmetic processing unit, comprising: a shift means for outputting a value obtained by applying a shift process to the mantissa as a mantissa of an arithmetic processing result.
【請求項5】 請求項4記載の演算処理装置において、 前記比較選択手段は、前記2つの入力データの各桁毎の
大小関係を上位桁から下位桁に向かって伝搬させること
により前記大小判別結果を上位桁から順に出力するため
の比較選択回路を備え、かつ前記シフト手段は、前記比
較選択回路から出力された大小判別結果の下位nビット
に各々対応した左2k (k=0,1,2,…,n−1)
ビットシフタを縦続接続してなることを特徴とする演算
処理装置。
5. The arithmetic processing device according to claim 4, wherein the comparison / selection unit propagates the magnitude relation of each digit of the two input data from a higher digit to a lower digit, and the magnitude discrimination result. Is sequentially output from the upper digit, and the shift means includes left 2 k (k = 0, 1, 1) corresponding to the lower n bits of the magnitude discrimination result output from the comparison / select circuit. 2, ..., n-1)
An arithmetic processing unit comprising bit shifters connected in cascade.
【請求項6】 浮動小数点2進数の仮数にシフト処理を
施しかつ該浮動小数点2進数の指数を調整するための演
算処理装置であって、 前記仮数中の先行する1のビット位置を検出し、かつ該
ビット位置と小数点の1つ上のビット位置との差を該仮
数の桁落ち量として出力するための先行1検出手段と、 前記指数から1を減じた値を出力するためのデクリメン
ト手段と、 前記先行1検出手段から出力された桁落ち量を前記指数
から減じた値を減算結果として出力し、かつ前記指数が
前記桁落ち量以下であるか否かを示す大小判別信号を出
力するための減算手段と、 前記指数が前記桁落ち量以下であることを前記減算手段
からの大小判別信号が示す場合には0を、他の場合には
前記減算手段からの減算結果を各々演算処理結果の指数
として出力するための第1の選択手段と、 前記指数が前記桁落ち量以下であることを前記減算手段
からの大小判別信号が示す場合には前記デクリメント手
段の出力を、他の場合には前記先行1検出手段から出力
された桁落ち量を各々出力するための第2の選択手段
と、 前記第2の選択手段の出力をシフト量とする左シフト処
理を前記仮数に施すことによって得た値を演算処理結果
の仮数として出力するためのシフト手段とを備えたこと
を特徴とする演算処理装置。
6. An arithmetic processing unit for performing shift processing on a mantissa of a floating point binary number and adjusting an exponent of the floating point binary number, wherein a preceding bit position of 1 in the mantissa is detected, And a leading 1 detection means for outputting the difference between the bit position and the bit position one place above the decimal point as the precision loss of the mantissa, and a decrement means for outputting a value obtained by subtracting 1 from the exponent. In order to output a value obtained by subtracting the digit loss amount output from the preceding 1 detection means as the subtraction result, and to output a magnitude determination signal indicating whether the index is less than or equal to the digit loss amount. Of the subtraction means and 0 when the magnitude discrimination signal from the subtraction means indicates that the exponent is equal to or less than the digit cancellation amount, and in other cases, the subtraction result from the subtraction means is calculated. Output as an index of And a first selecting means for controlling the output of the decrementing means when the magnitude discriminating signal from the subtracting means indicates that the exponent is equal to or less than the digit cancellation amount. Second selection means for respectively outputting the digit cancellation amount output from the detection means, and a value obtained by subjecting the mantissa to a left shift process using the output of the second selection means as a shift amount An arithmetic processing unit, comprising: a shift means for outputting a mantissa of a processing result.
【請求項7】 浮動小数点2進数の仮数にシフト処理を
施しかつ該浮動小数点2進数の指数を調整するための演
算処理装置であって、 前記仮数中の先行する1のビット位置を検出し、かつ該
ビット位置と小数点の1つ上のビット位置との差を該仮
数の桁落ち量として出力するための先行1検出手段と、 前記先行1検出手段から出力された桁落ち量を前記指数
から減じた値を減算結果として出力し、かつ前記指数が
前記桁落ち量以下であるか否かを示す大小判別信号を出
力するための減算手段と、 前記指数が前記桁落ち量以下であることを前記減算手段
からの大小判別信号が示す場合には0を、他の場合には
前記減算手段からの減算結果を各々演算処理結果の指数
として出力するための第1の選択手段と、 前記指数が前記桁落ち量以下であることを前記減算手段
からの大小判別信号が示す場合には前記指数を、他の場
合には前記先行1検出手段から出力された桁落ち量を各
々出力するための第2の選択手段と、 前記指数が前記桁落ち量以下であることを前記減算手段
からの大小判別信号が示す場合には前記第2の選択手段
の出力から1を減じた値を、他の場合には前記第2の選
択手段の出力そのものを各々シフト量とする左シフト処
理を前記仮数に施すことによって得た値を演算処理結果
の仮数として出力するためのシフト処理手段とを備えた
ことを特徴とする演算処理装置。
7. An arithmetic processing unit for performing shift processing on a mantissa of a floating point binary number and adjusting an exponent of the floating point binary number, which detects a leading bit position of 1 in the mantissa, Further, the leading 1 detection means for outputting the difference between the bit position and the bit position one digit above the decimal point as the digit loss amount of the mantissa, and the digit loss amount output from the leading 1 detection means from the exponent. Subtracting means for outputting the subtracted value as a subtraction result, and for outputting a magnitude discrimination signal indicating whether or not the exponent is equal to or less than the digit loss amount, and the exponent is equal to or less than the digit loss amount. When the magnitude discrimination signal from the subtracting means indicates 0, in other cases, the first selecting means for outputting the subtraction result from the subtracting means as an exponent of the arithmetic processing result, and the exponent It is less than the amount of cancellation Second selection means for outputting the exponent when the magnitude discrimination signal from the subtraction means indicates, and otherwise, the digit cancellation amount output from the preceding 1 detection means, and A value obtained by subtracting 1 from the output of the second selecting means when the magnitude discriminating signal from the subtracting means indicates that the exponent is equal to or less than the digit cancellation amount, and in other cases, the second selecting An arithmetic processing unit, comprising: a shift processing means for outputting a value obtained by subjecting the mantissa to a left shift processing in which the output itself of the means is used as a shift amount, respectively, as a mantissa of the arithmetic processing result.
【請求項8】 請求項7記載の演算処理装置において、 前記シフト処理手段は、 前記第2の選択手段の出力をシフト量とする左シフト処
理を前記仮数に施すことによって得た値を出力するため
の左シフタと、 前記指数が前記桁落ち量以下であることを前記減算手段
からの大小判別信号が示す場合には前記左シフタの出力
に右1ビットシフト処理を施すことによって得た値を、
他の場合には前記左シフタの出力そのものを各々演算処
理結果の仮数として出力するための右1ビットシフタと
を備えたことを特徴とする演算処理装置。
8. The arithmetic processing unit according to claim 7, wherein the shift processing means outputs a value obtained by subjecting the mantissa to a left shift processing using the output of the second selecting means as a shift amount. And a value obtained by subjecting the output of the left shifter to the right 1-bit shift processing when the magnitude discriminating signal from the subtracting means indicates that the exponent is equal to or less than the digit cancellation amount. ,
In other cases, the arithmetic processing device is provided with a right 1-bit shifter for outputting the output itself of the left shifter as a mantissa of each arithmetic processing result.
【請求項9】 請求項6又は7に記載の演算処理装置に
おいて、 前記減算手段は、 前記指数と前記先行1検出手段から出力された桁落ち量
とを2つの入力データとして前記減算結果を求め、かつ
該2つの入力データの減算における最下位桁から最上位
桁までの桁借り伝搬を考慮した桁借り生成信号および桁
借り伝搬信号に基づいて前記大小判別信号を生成するた
めの減算回路を備えたことを特徴とする演算処理装置。
9. The arithmetic processing device according to claim 6, wherein the subtraction unit obtains the subtraction result by using the exponent and the digit loss amount output from the preceding 1 detection unit as two input data. And a subtraction circuit for generating the magnitude discrimination signal based on the borrow borrow generation signal and the borrow borrow propagation signal in consideration of the borrow propagation from the least significant digit to the most significant digit in the subtraction of the two input data. An arithmetic processing unit characterized by the above.
【請求項10】 nビットの入力データX,Yについて
X−Yの演算を行ない結果を出力する機能を備え、かつ
該演算における第0桁から第(n−1)桁までの桁借り
伝搬を考慮した桁借り生成信号および桁借り伝搬信号に
基づいて前記入力データの大小関係X≦Yを表わす大小
判別信号を生成し出力する機能を備えたことを特徴とす
る減算回路。
10. A function of performing an X-Y operation on n-bit input data X, Y and outputting a result, and carrying out borrow propagation from the 0th digit to the (n-1) th digit in the operation. A subtraction circuit having a function of generating and outputting a magnitude discriminating signal representing a magnitude relation X≤Y of the input data based on a considered borrow generation signal and a borrow propagation signal.
JP5097514A 1992-04-23 1993-04-23 Method and device for arithmetic processing for floating point binary number Pending JPH0612224A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5097514A JPH0612224A (en) 1992-04-23 1993-04-23 Method and device for arithmetic processing for floating point binary number

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP10448792 1992-04-23
JP4-104487 1992-04-23
JP5097514A JPH0612224A (en) 1992-04-23 1993-04-23 Method and device for arithmetic processing for floating point binary number

Publications (1)

Publication Number Publication Date
JPH0612224A true JPH0612224A (en) 1994-01-21

Family

ID=26438669

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5097514A Pending JPH0612224A (en) 1992-04-23 1993-04-23 Method and device for arithmetic processing for floating point binary number

Country Status (1)

Country Link
JP (1) JPH0612224A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5699285A (en) * 1995-10-16 1997-12-16 Mitsubishi Denki Kabushiki Kaisha Normalization circuit device of floating point computation device
KR20150107614A (en) * 2014-03-14 2015-09-23 에이알엠 리미티드 A data processing apparatus and method for performing a shift function on a binary number

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5699285A (en) * 1995-10-16 1997-12-16 Mitsubishi Denki Kabushiki Kaisha Normalization circuit device of floating point computation device
KR20150107614A (en) * 2014-03-14 2015-09-23 에이알엠 리미티드 A data processing apparatus and method for performing a shift function on a binary number

Similar Documents

Publication Publication Date Title
JP3178746B2 (en) Format converter for floating point numbers
EP0472139B1 (en) A floating-point processor
JP4500358B2 (en) Arithmetic processing apparatus and arithmetic processing method
JPH0776911B2 (en) Floating point arithmetic unit
US5111421A (en) System for performing addition and subtraction of signed magnitude floating point binary numbers
US20120239719A1 (en) Floating-Point Addition Acceleration
WO1999040508A1 (en) Fast adder/subtractor for signed floating point numbers
US5260889A (en) Computation of sticky-bit in parallel with partial products in a floating point multiplier unit
JP2757671B2 (en) Priority encoder and floating point adder / subtracter
US5513362A (en) Method of and apparatus for normalization of a floating point binary number
KR20210147070A (en) multi-input floating point adder
JPH0612224A (en) Method and device for arithmetic processing for floating point binary number
JP2558669B2 (en) Floating point arithmetic unit
JP2645422B2 (en) Floating point processor
JP2010102431A (en) Floating decimal point arithmetic circuit, floating decimal point arithmetic method, and servo-controlled system
JP3187824B2 (en) Normalization circuit
JP2856792B2 (en) Floating point arithmetic unit
JP4428778B2 (en) Arithmetic device, arithmetic method, and computing device
JPH05167456A (en) Arithmetic operation circuit
JP3137131B2 (en) Floating point multiplier and multiplication method
JP2801472B2 (en) Floating point arithmetic unit
JP3124286B2 (en) Floating point arithmetic unit
JPH0383126A (en) Floating-point multiplier
JP3100868B2 (en) Arithmetic unit for floating point numbers
JP3077880B2 (en) Sticky bit detection circuit

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20020430