JPH0365722A - Floating-point arithmetic unit - Google Patents

Floating-point arithmetic unit

Info

Publication number
JPH0365722A
JPH0365722A JP1201396A JP20139689A JPH0365722A JP H0365722 A JPH0365722 A JP H0365722A JP 1201396 A JP1201396 A JP 1201396A JP 20139689 A JP20139689 A JP 20139689A JP H0365722 A JPH0365722 A JP H0365722A
Authority
JP
Japan
Prior art keywords
digit
exponent part
carry
adder
exponent
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
JP1201396A
Other languages
Japanese (ja)
Inventor
Tsuguyasu Hatsuda
次康 初田
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 JP1201396A priority Critical patent/JPH0365722A/en
Publication of JPH0365722A publication Critical patent/JPH0365722A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To simplify a circuit, and besides, to reduce power consumption, and to detect underflow and overflow at high speed by executing the arithmetic operation of an exponent part by using one adder or one subtracter. CONSTITUTION:The exponent part of a computed result is obtained by converting once the exponent part into the complement of '2' by logical- inverting 101 the exponent part, and converting again the computed result between the complements of '2' into the complement of '2'. Since the addition of deviation quantity at the time of the subtracting or the dividing the deviation quantity in the case of floating-point multiplication is computed by being included in the correction of the complement of '2', it can be executed by using one adder 103 or one subtracter in spite of the arithmetic operation of three numbers. Besides, the logical inversion 101, 102, 104 of the exponent part required for the conversion into the complement of '2' needs only to change some logic at the time of generating carry, propagating the carry and generating final sum of the usual adder, and it can be realized without adding any extra hardware. Thus, since the arithmetic operation of the exponent part can be executed by using one adder or one subtracter, hardware quantity can be reduced.

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は浮動小数点演算装置、特にI EEE 754
規格に準拠する浮動小数点乗算及び浮動小数点除算の演
算を行う浮動小数点演算装置に関する。
DETAILED DESCRIPTION OF THE INVENTION (Industrial Application Field) The present invention relates to floating point arithmetic devices, particularly IEEE 754
The present invention relates to a floating-point arithmetic device that performs standard-compliant floating-point multiplication and floating-point division operations.

(従来の技術) まず、IEEE754規格の浮動小数点数の演算につい
て説明する。IEEE754規格の浮動小数点数は、 (−1)”・2g−”−(1,F)   ・−・・・(
1)という形式を持つ、(1)式においてSは符号ビッ
ト、Eは指数部分データ、BはEを正方向へ偏位させる
ための偏位量、Fは仮数部分データである。
(Prior Art) First, floating point number operations according to the IEEE754 standard will be explained. The floating point number according to the IEEE754 standard is (-1)"・2g-"-(1,F) ・-・・・(
In equation (1), S is a sign bit, E is exponent part data, B is a deviation amount for shifting E in the positive direction, and F is mantissa part data.

指数の桁数をnとすると、Bは B=2”+2″1+・・・・・・21+ 1 = 2”
−1−1の形式で表わされる。単精度浮動小数点数の場
合には、n=8でB=127. Fは23桁長となる。
If the number of digits of the exponent is n, then B = 2" + 2" 1+...21+ 1 = 2"
-1-1 format. For single-precision floating point numbers, n=8 and B=127. F is 23 digits long.

また倍精度浮動小数点数の場合には、n=11でB=1
023、 Fは52桁長となる。被演算数X、演算数Y
を。
In the case of double-precision floating point numbers, n=11 and B=1
023, F is 52 digits long. Operand number X, operand number Y
of.

X=(1)”21IX−”(1,Fx)   −・=(
2)X=(−↓)’Y 2”−”−(1,FY)   
・・・−(3)とおくと、乗算の場合の指数部分の演算
は、(Ex−B)+(EY−B)=(Ex+EY−B)
−B・・・・・・(4)として行い、除算の場合の指数
部の演算は、(EX−B)−(EY−B)=(EX−E
Y+B)−B  ・・−(5)として行う。すなわち、
積の指数部分は被乗数の指数部分と乗数の指数部分とを
加算しその結果から偏位fBを引くことによって、また
商の指数部分は被乗数の指数部分から乗数の指数部分を
減算し、その減算結果に偏移量Bを加えることによって
得られる。
X=(1)”21IX-”(1,Fx) −・=(
2)X=(-↓)'Y 2"-"-(1,FY)
...-(3), the calculation of the exponent part in the case of multiplication is (Ex-B)+(EY-B)=(Ex+EY-B)
-B・・・・・・(4), and the calculation of the exponent part in the case of division is (EX-B)-(EY-B)=(EX-E
Perform as Y+B)-B...-(5). That is,
The exponent part of the product is obtained by adding the exponent part of the multiplicand and the exponent part of the multiplier and subtracting the deviation fB from the result, and the exponent part of the quotient is obtained by subtracting the exponent part of the multiplier from the exponent part of the multiplicand, and It is obtained by adding the deviation amount B to the result.

第7図は従来の浮動小数点演算装置の指数部演算器の構
成を示すものである。第7図において、701は被乗数
のn桁の指数部分E□710と乗数のn桁指数部分E 
、711を加算する第1加算器、702は第I加算器7
01の出力と偏位量Bの2の補数712を加算し、演算
結果(E、+EY−B)713を出力する第2加算器、
703は第2加算器702の出力を所定の数値と比較し
て乗算結果のアンダーフロー、オーバーフローを検出す
る検出器、714は検出器714から出力されるアンダ
ーフロー信号、715はオーバーフロー信号である。な
お、除算の場合の指数部演算器は、第7図の第I加算器
701を減算器に変更し、また第2加算器702で減算
器の出力と偏位量Bを加算する構成にすることで実現さ
れる。
FIG. 7 shows the configuration of an exponent part calculator of a conventional floating point arithmetic unit. In Figure 7, 701 is the n-digit exponent part E of the multiplicand and the n-digit exponent part E of the multiplier.
, 711, and 702 is the I-th adder 7.
a second adder that adds the output of 01 and the two's complement 712 of the deviation amount B, and outputs the calculation result (E, +EY-B) 713;
703 is a detector that compares the output of the second adder 702 with a predetermined value to detect underflow or overflow of the multiplication result; 714 is an underflow signal output from the detector 714; and 715 is an overflow signal. In addition, in the case of division, the exponent part arithmetic unit is configured such that the I adder 701 in FIG. 7 is changed to a subtracter, and the second adder 702 adds the output of the subtracter and the deviation amount B. This is achieved by

(発明が解決しようとする課題) しかしながら、上記従来の指数演算器では、■EEE7
54規格の浮動小数点乗算または浮動小数点除算を実行
する浮動小数点演算装置において、指数部分の演算のた
めに2個の加算器が必要なため、装置全体の回路が大規
模化、複雑化するという問題があった。また回路規模が
大きくなるに従って消費電力が増大し、演算に要する時
間が増大するという問題があった。さらに、第2の加算
器で加算を実行してからその後演算結果を所定の定数と
比較することによってアンダーフロー、オーバーフロー
の検出を行っていたため、全演算結果を得るまでに長い
時間が必要であり、浮動小数点演算を高速に実行する上
で問題があった。
(Problem to be Solved by the Invention) However, in the above conventional exponent calculator, ■EEE7
In a floating-point arithmetic unit that performs floating-point multiplication or floating-point division in accordance with the X.54 standard, two adders are required to calculate the exponent part, resulting in an increase in the scale and complexity of the overall circuitry of the device. was there. Furthermore, as the circuit size increases, power consumption increases and the time required for calculation increases. Furthermore, since underflow and overflow were detected by performing addition in the second adder and then comparing the calculation result with a predetermined constant, it took a long time to obtain all the calculation results. , there was a problem in executing floating point operations at high speed.

本発明は上記従来の問題を解決するものであり、指数部
分の演算を1つの加算器または減算器で行うことによっ
て、回路が簡単でかつ消費電力が少なく、またアンダー
フロー、オーバーフローを高速に検出する浮動小数点演
算装置を提供することを目的とするものである。
The present invention solves the above-mentioned conventional problems, and by performing calculations on the exponent part with a single adder or subtracter, the circuit is simple and consumes less power, and underflows and overflows can be detected quickly. The object of the present invention is to provide a floating point arithmetic unit that performs the following functions.

(課題を解決するための手段) 本発明は上記目的を達成するために、被演算数または演
算数のn桁長からなる指数部分の一方を入力し論理反転
して出力する第1の手段と、他方の指数部分を入力し第
n −2桁から第0桁を論理反転して出力する第2の手
段とを備え、浮動小数点乗算の場合には前記第1の手段
の出力と前記第2の手段や出力とを加算する加算器を備
え、また、浮動小数点除算の場合には前記第1の手段ま
たは第2の手段で論理反転された被除数の指数部分から
、前記第2の手段または第1の手段で論理反転された除
数の指数部分を減算する減算器を備え。
(Means for Solving the Problem) In order to achieve the above object, the present invention provides a first means for inputting one of an operand or an exponent part of an n-digit length of an operand, inverting the logic, and outputting the result. , and a second means for inputting the other exponent part and logically inverting the n-2nd to 0th digits and outputting the resultant, and in the case of floating point multiplication, the output of the first means and the second means are provided. In addition, in the case of floating point division, from the exponent part of the dividend logically inverted by the first means or the second means, the second means or the second means or the output is added. a subtracter for subtracting the exponent part of the divisor whose logic has been inverted by means of step 1;

さらに前記加算器または減算器の出力を反転する第3の
手段とを備え、第3の手段の出力を演算結果の指数部分
とするようにしたものである。
The apparatus further includes third means for inverting the output of the adder or subtracter, and the output of the third means is used as the exponent part of the calculation result.

(作 用) したがって、本発明によれば、指数部分を論理反転する
ことによって一旦2の補数に直し、2の補数同士の演算
結果を再度2の補数に直すことにより演算結果の指数部
分を求めている。浮動小数点乗算の場合の偏位量の減算
または浮動小数点除算の場合の偏位量の加算は、2の補
数の補正の中に含めて計算しているため、3つの数の演
算にもかかわらず1つの加算器または減算器で実行でき
る。また2の補数化に必要な指数部分の論理反転は、通
常の加算器の桁上げ生成、桁上げ伝搬、最終和生成時の
論理を若干変更するだけでよく、余分なハードウェアを
追加することなく実現できる。
(Function) Therefore, according to the present invention, the exponent part of the operation result is obtained by first converting the exponent part into a two's complement number by inverting the logic, and then converting the operation result between the two's complement numbers again into a two's complement number. ing. The subtraction of the deviation amount in the case of floating point multiplication or the addition of the deviation amount in the case of floating point division is calculated by including it in the two's complement correction, so despite the operation of three numbers, Can be implemented with one adder or subtracter. In addition, the logic inversion of the exponent part required for two's complement conversion requires only slight changes to the logic during carry generation, carry propagation, and final sum generation of the ordinary adder, and requires no additional hardware. It can be achieved without any problem.

(実施例) 第1図は本発明の第1の実施例における浮動小数点演算
装置の乗算器指数部演算器の構成を示したものである。
(Embodiment) FIG. 1 shows the configuration of a multiplier exponent part arithmetic unit of a floating point arithmetic unit in a first embodiment of the present invention.

第1図の実施例は、IEEE754規格の単精度浮動小
数点数を扱い、指数部分は8桁のデータ幅を持つものと
する。第1図において、101は被乗数の指数部分11
0の論理反転を生成する第1の論理反転回路、102は
乗数の指数部分111の下位7桁(第6桁〜第O桁)の
論理反転を生成する第2の論理反転回路、103は第1
.第2の論理反転回路101.102の出力と乗数の指
数部分111の最上位桁(第7桁〉114とを加算する
加算器、104は加算器103の出力を論理反転する第
3の論理反転回路であって、演算結果(Ex+EY−1
27; B= 2I′−1−1=127)112を出力
する。105は被乗数の指数部分の最上位桁(第7桁)
113と乗数の指数部分の最上位桁(第7桁)114が
ともに“O”でかつ加算器103の第6桁からの桁上げ
117がある場合にアンダーフローを、また被乗数2乗
数の指数部分の最上位桁113.114がともに“l”
でかつ加算器103から第6桁の桁上げ116がない場
合にオーバーフローを検出する第Iの検出器、106は
被乗数。
The embodiment shown in FIG. 1 deals with single-precision floating point numbers according to the IEEE754 standard, and the exponent part has a data width of 8 digits. In Figure 1, 101 is the exponent part 11 of the multiplicand.
A first logic inversion circuit that generates a logic inversion of 0, 102 a second logic inversion circuit that generates a logic inversion of the lower seven digits (6th digit to Oth digit) of the exponent part 111 of the multiplier, and 103 a 1
.. An adder that adds the output of the second logic inversion circuit 101, 102 and the most significant digit (seventh digit) 114 of the exponent part 111 of the multiplier; 104 is a third logic inversion that logic inverts the output of the adder 103; It is a circuit, and the calculation result (Ex+EY-1
27; B=2I'-1-1=127) Outputs 112. 105 is the most significant digit (7th digit) of the exponent part of the multiplicand
113 and the most significant digit (7th digit) 114 of the exponent part of the multiplier are both "O" and there is a carry 117 from the 6th digit of the adder 103, an underflow occurs, and the exponent part of the multiplicand 2 multiplier The most significant digits 113 and 114 are both "l"
106 is a multiplicand.

乗数の指数部分の最上位桁113.114がともに“1
”でかつ第3の論理反転回路104の出力がすべて“工
”である場合にオーバーフローを検出する第2の検出器
、 116.117は加算器103の第6桁から出力さ
れる桁上げであって、第0桁への初期桁上げC+411
5がない場合とある場合の桁上げである6118はアン
ダーフロー信号、119は第1のオーバーフロー信号、
120は第2のオーバーフロー信号である。
The most significant digits 113 and 114 of the exponent part of the multiplier are both “1”
” and all the outputs of the third logic inversion circuit 104 are “work”, the second detector detects an overflow. 116.117 is a carry output from the 6th digit of the adder 103. Initial carry to 0th digit C+411
6118, which is a carry when there is no 5 and when there is a 5, is an underflow signal, 119 is a first overflow signal,
120 is a second overflow signal.

次に上記第1の実施例の動作について説明する。Next, the operation of the first embodiment will be explained.

IEEE754規格について前記(4)式で示したよう
に、乗算器の指数部演算器では、 E2=Ex+EY−B =Ex+Ev−2n−1+1  −−−−・・(6)を
求める。ただし、第1図の実施例の場合n=8である。
As shown in equation (4) above for the IEEE754 standard, the exponent part calculator of the multiplier calculates E2=Ex+EY-B=Ex+Ev-2n-1+1 --- (6). However, in the case of the embodiment shown in FIG. 1, n=8.

この(6)式を2の補数の関係式−A=A+1   ・
・・・・・(7)を用いて以下のように変形する。なお
、(7)式において、Aは各桁が2数表現で表わされた
数、AはAの各桁の論理反転した数である。
This equation (6) is converted into the two's complement relational expression -A=A+1 ・
...Using (7), transform as follows. Note that in equation (7), A is a number in which each digit is expressed in two numbers, and A is a number obtained by inverting the logic of each digit of A.

E、=Ex+EY−21′−”+1 =Ex+1+EY+1−211−1−1=−(Ex+E
Y+2’−’)−1 =  Ex十EY+2′1−1     ・・・・−(
8)(8)式は、被乗数の指数部分の論理反転と乗数の
指数部分の論理反転と2n−1を加算し、加算結果を論
理反転することで浮動小数点乗算の指数部演算が実行で
きることを示している。2111−1の加算は、被乗数
または乗数の一方の数のみ最上位桁を論理反転しないこ
とで実現できる。第1の実施例でのアンダーフローとオ
ーバーフローの検出について説明する。(1)式で示さ
れた数表現において。
E, =Ex+EY-21'-"+1 =Ex+1+EY+1-211-1-1=-(Ex+E
Y+2'-')-1 = Ex 1EY+2'1-1 ・・・-(
8) Equation (8) shows that the exponent part operation of floating-point multiplication can be performed by adding the logical inversion of the exponent part of the multiplicand, the logical inversion of the exponent part of the multiplier, and 2n-1, and inverting the addition result. It shows. The addition of 2111-1 can be realized by not inverting the logic of the most significant digit of either the multiplicand or the multiplier. Detection of underflow and overflow in the first embodiment will be explained. (1) In the numerical expression shown in Eq.

アンダーフローは、 (E −B )≦−B  ・・・・・・(9)オーバー
フローは (E −B )≧B+1   ・・・・・・(10)の
範囲と定められている。第2図は単精度浮動小数点数の
乗算の場合、Ex+EYの値に対するE工+Ey+2”
−”−Ez=Ex+Ey千2°−1の各値It示したも
のである。第2図と(9)式、  (io)式より、一
般にn桁幅の指数部分を持つ浮動小数点数の乗算でのア
ンダーフローの条件として次項が導かれる。
Underflow is defined as (E-B)≦-B (9), and overflow is defined as (E-B)≧B+1 (10). In the case of multiplication of single-precision floating point numbers, Figure 2 shows the value of E + Ey + 2'' for the value of Ex + EY.
−”−Ez=Ex+Ey 1,2°−1 It shows each value It. From Figure 2 and equations (9) and (io), it is generally possible to multiply floating point numbers with an exponent part of n digits width. The following term is derived as the underflow condition.

■ ExとEYの第n −1桁がともに“O”でかつ−
百、十E、+2”の全桁の数がすべて1″″の場合。
■ The nth -1st digit of Ex and EY are both "O" and -
If all digits of 100, 10E, +2" are 1"".

■ ExとE7の第n−1桁がともに“OF+でかつE
xとEYの第n−2桁から第m桁(n−2≧m≧0:m
は整数)までの連続した各桁においてどちらかに“O”
がある場合。
■ Both the n-1st digit of Ex and E7 are “OF+” and E
From the n-2nd digit to the m-th digit of x and EY (n-2≧m≧0: m
is an integer) in each consecutive digit
If there is.

上記■は第2図においてEx十EY=127がアンダー
フローとなることから導かれる。また■は、Ex+E、
≦126 (01111110: 2進数表示)となる
ためには、第7桁目を“17Fとする桁上げがないこと
が必要なことから導かれる。またn桁幅の指数部分を持
つ浮動小数点数の乗算でのオーバーフローの条件として
次項が導かれる。
The above equation (2) is derived from the fact that Ex+EY=127 in FIG. 2 results in an underflow. Also, ■ is Ex+E,
≦126 (01111110: binary representation) This is derived from the fact that there must be no carry with the 7th digit being ``17F.'' Also, for floating point numbers with an exponent part that is n digits wide, The following term is derived as a condition for overflow in multiplication.

■ ExとE、の第n−1桁がともに“l”でかつE 
t = E x + E Y + 2 ” −1の全桁
の数がすべて1”の場合。
■ The n-1st digits of Ex and E are both “l” and E
t = Ex + E Y + 2'' - When all the digits of 1 are 1''.

■ ExとE、の第n−1桁がともに“l”でかつEx
とEYの第n−2桁から第n+1桁(n−2≧氾≧0:
Qは整数)までの連続した各桁において少なくともどち
らかに“1”がある場合。
■ The n-1st digits of Ex and E are both “l” and Ex
and the n-2nd digit to the n+1st digit of EY (n-2≧Flood≧0:
Q is an integer) when there is a 1 in at least one of the consecutive digits.

上記■は第2図のEx+EY=382がオーバーフロー
となることから導かれる。また■は、Ex+EV=38
3がオーバーフローとなることと、Ex十EY≧384
 (110000000: 2進数表示)となるために
は。
The above equation (2) is derived from the fact that Ex+EY=382 in FIG. 2 is an overflow. Also, ■ is Ex+EV=38
3 becomes an overflow, and Ex 1 EY ≧ 384
(110000000: binary representation).

Ex+EYの第7桁目が# I IIとなる桁上げが必
要なことから導かれる。ここで、E、十E、+2”−”
の桁上げに注目する。
This is derived from the fact that a carry is required so that the seventh digit of Ex+EY becomes #I II. Here, E, 10E, +2”-”
Pay attention to the carry increase.

Ex=X、、X、、−−−−−−X1X。Ex=X,,X,,---X1X.

EY=Yゎ−、Yゎ−2・・・・・・ Y工Y0とおく
と、第1桁(i≦n−2)の桁上げC,は次の論理式で
示される。
EY=Yゎ-, Yゎ-2... If we set Y-Y0, the carry C of the first digit (i≦n-2) is expressed by the following logical formula.

C+=X+ ・Yt”(Xt+Y+)Ct−1−紅・行
+(酊十E)紅;・訂;+(紅十「)(石−t”Yt−
x)Cr −z=X+ ” Yt”(Xt”Yt)Xt
−1” Yt −x+(x++y+)(訂:・訓;)訂
;・行:+・・・・・・+(Xt+Y+)(口・[)・
・・・・・・・(訂+Y2 ) (x、+Y、)X、・
Yo”(XT”y、)(口・[;)・・・・・・・・(
「十訂)(訂+Yi)(証十汀)C−1上記(11)式
において、 (11)式は、初期桁上げC−0がありかつ第1桁から
の桁上げC,がある場合は、第1桁から第5桁(i≧j
)までの連続した桁の2数の少なくとも1つが“Q I
tであることを示している。なお(8)式から、C−□
の設定によるE8の値が、E2=Ex+EY+2″″′
1+1=Ex+Ev−211−1・・・・・・(12)
となることが導かれる。すなわち、第2図では初期桁上
げC−1を設定することによってEx+E、≦127の
場合に第6桁から桁上げが発生する。従って、指数部分
の桁幅がnの場合、2数の第n−1桁がともに“0”で
かつ初期桁上げがありかつ第n−2桁からの桁上げがあ
る場合には上記アンダーフローの条件の、■に対応して
おり、これを求めることによってアンダーフローを検出
することができる。第1図の実施例では、加算器の第6
桁から桁上げ117が上記桁上げに対応しており、アン
ダーフローはアンダーフロー信号118によって検出さ
れる。一方、第1桁の桁上げの論理反転で了は次の論理
式のようになる。
C+ =
x) Cr −z=X+ “Yt”(Xt”Yt)Xt
-1” Yt -x+(x++y+) (edited:・Kun;)edited;・line:+・・・・・・+(Xt+Y+)(mouth・[)・
・・・・・・(revised+Y2) (x,+Y,)X,・
Yo"(XT"y,)(mouth・[;)・・・・・・・・・(
"10th edition) (revised + Yi) (proof 10th edition) C-1 In the above formula (11), formula (11) is when there is an initial carry C-0 and a carry C from the first digit. is the first to fifth digit (i≧j
) at least one of the two numbers with consecutive digits up to “Q I
It shows that t. Furthermore, from equation (8), C-□
The value of E8 according to the setting is E2=Ex+EY+2″″′
1+1=Ex+Ev-211-1...(12)
It follows that That is, in FIG. 2, by setting the initial carry C-1, a carry occurs from the 6th digit when Ex+E≦127. Therefore, when the digit width of the exponent part is n, if both the n-1st digits of two numbers are "0", there is an initial carry, and there is a carry from the n-2nd digit, the above underflow occurs. This corresponds to condition (2), and by determining this, underflow can be detected. In the embodiment of FIG.
A carry 117 from the digit corresponds to the above carry, and an underflow is detected by an underflow signal 118. On the other hand, by reversing the logic of the carry of the first digit, the result becomes as shown in the following logical formula.

= Xi ・Yl+ (Xl+Yt)Ct−1”XI”
 Yt”(XI”Yt)XI−1−Y、−0”(XI”
Yt) (XI−1”Yt−8)c+−=x+ ・Yt
”(Xt”Yt)XI −t ・Yt −1+(X++
Yt)(XI−t”Yt−z)XI−z S Y、−,
4+−++++”(XI”Yt)(XI−1”Yt−2
) ” ””” ” (Xz”Yt)(Xz”Yt)X
oY。
= Xi ・Yl+ (Xl+Yt)Ct-1"XI"
Yt"(XI"Yt)XI-1-Y,-0"(XI"
Yt) (XI-1"Yt-8)c+-=x+ ・Yt
”(Xt”Yt)XI −t ・Yt −1+(X++
Yt) (XI-t”Yt-z)XI-z S Y, -,
4+-++++” (XI”Yt) (XI-1”Yt-2
) ” ””” ” (Xz”Yt) (Xz”Yt)X
oY.

+(X1+Y1)(XI−8”Yt−u)  ・ −−
・ (X2”%)(Xt”Yx)(Xo+Yo)C−x
”(13)式は、初期桁上げC−1がなく(τ;=1)
かつ第1桁からの桁上げがない場合は、第1桁から第5
桁(i≧j)までの連続した桁の2数の少なくとも1つ
が“1”であることを示している。従って、指数部分の
桁幅がnの場合、2数の第n−1行がともに“1”でか
つ初期桁上げがなくかつ第n −2桁からの桁上げがな
い場合には上記オーバーフローの条件■に対応しており
、これを求、めることによってオーバーフローを検出す
ることができる。
+(X1+Y1)(XI-8"Yt-u) ・ --
・ (X2”%) (Xt”Yx) (Xo+Yo)C-x
”Formula (13) has no initial carry C-1 (τ;=1)
And if there is no carry from the 1st digit, the 1st to 5th digit
This indicates that at least one of the two consecutive digits up to the digit (i≧j) is “1”. Therefore, when the digit width of the exponent part is n, if both the n-1st rows of the two numbers are "1" and there is no initial carry and there is no carry from the n-2nd digit, the above overflow occurs. This corresponds to condition (2), and by determining this, overflow can be detected.

第1図の実施例では、加算器の第6桁からの桁上げ11
6が上記桁上げに対応して上記オーバーフローの条件■
は第1のオーバーフロー信号119によって、また上記
オーバーフローの条件■は第2のオーバーフロー信号1
20によって検出される。
In the embodiment of FIG. 1, carry 11 from the 6th digit of the adder
6 corresponds to the above carry and the above overflow condition■
is caused by the first overflow signal 119, and the above overflow condition (2) is caused by the second overflow signal 119.
20.

第3図は第1図に示した指数部演算器の主要構成要素で
ある第1〜第3の論理反転回路iot、 102゜10
4、加算器103及び第1の検出器105の論理回路を
示すものである。なお、この回路では桁上げの生成、伝
搬を桁上げ先見回路によって行っているものである。第
3図において、301は桁上げ生成信号(G、)と桁上
げ伝搬信号(P、)の生成回路、302は桁上げ伝搬回
路、303は最終相決定回路、310、311は第6桁
目からの桁上げの論理反転信号であって、第0桁への初
期桁上げがない場合とある場合の信号である。通常の加
算器では、桁上げ生成信号P、と桁上げ伝搬信号Glは
次のように定義される。
FIG. 3 shows the first to third logic inversion circuits IOT, which are the main components of the exponent calculator shown in FIG. 1, 102°10
4 shows the logic circuits of the adder 103 and the first detector 105. In this circuit, carry generation and propagation are performed by a carry look-ahead circuit. In FIG. 3, 301 is a generation circuit for a carry generation signal (G,) and a carry propagation signal (P,), 302 is a carry propagation circuit, 303 is a final phase determination circuit, and 310 and 311 are the 6th digit. This is a logical inversion signal of a carry from 0 to 0, and is a signal when there is no initial carry to the 0th digit and when there is an initial carry. In a normal adder, a carry generation signal P and a carry propagation signal Gl are defined as follows.

G、=X、 −Y、  ・・・・・・(14)p、=x
、■Y、   ・・・・・・(15)この2つの信号に
よって桁上げを生成、伝搬させ、1桁下からの桁上げC
1−1を用いることにより、最終相S、として次式を得
る。
G, =X, -Y, ......(14)p, =x
,■Y, ......(15) Generate and propagate a carry using these two signals, and carry C from one digit below.
By using 1-1, the following formula is obtained as the final phase S.

5i=Pl■C1−□ ・・・・・・(16)一方、本
実施例では各桁の論理反転した数を加算し、加算結果の
論理反転を取って最終和としているため1桁上げ生成信
号011桁上げ伝搬信号P6、最終相S、は次のような
論理式で示される。
5i=Pl■C1-□ ・・・・・・(16) On the other hand, in this embodiment, the numbers obtained by inverting the logic of each digit are added, and the logic inversion of the addition result is taken as the final sum, so one digit is increased. Signal 011 carry propagation signal P6, final phase S, is expressed by the following logical formula.

G、=X、・y、=x、+y、  ・・・・・・(17
)P、 =X+$Y+=XteY+  −−−−−−(
i8)S、=p、■C,−8 ・・・・・・(19)(
17)、 (18)、 (19)式で明らかなように1
本実施例の指数部演算器は、通常の加算器の桁上げ生成
論理をAND(論理積)からN0R(論理和の論理反転
)に、また通常の最終相決定論理をX0R(排他的論理
和)からXN0R(排他的論理和の論理反転)に変更す
るだけで実現できる。従って、指数部分入力の論理反転
回路及び加算器出力の論理反転回路は、余分にインバー
タ回路などを追加することなく構成できる。なお、最終
和の2.、2.、2゜は、1桁下位からの桁上げの論理
反転信号を用いてその値を決定しているため、XNOR
回路ではなくXOR回路を用いている。また乗数の指数
部分の第7桁のみは論理反転しないため、第7桁の桁上
げ伝搬論理回路としてはXOR回路を用いずにXNOR
回路を使用している。さらに、本実施例では乗数の指数
部分の最上位桁を論理反転しない構成にしているが、被
乗数の指数部分の最上位桁を論理反転しない構成にして
も同様の機能が実現できる。
G, =X, ・y, =x, +y, ...... (17
)P, =X+$Y+=XteY+ −−−−−−(
i8) S, = p, ■C, -8 ...... (19) (
17), (18), and (19), 1
The exponent arithmetic unit of this embodiment changes the carry generation logic of the ordinary adder from AND (logical product) to N0R (logical inversion of logical sum), and changes the ordinary final phase determination logic to X0R (exclusive logical sum). ) to XN0R (logical inversion of exclusive OR). Therefore, the logic inverting circuit for the exponent part input and the logic inverting circuit for the adder output can be configured without adding any extra inverter circuit or the like. In addition, 2. of the final sum. , 2. , 2° determines its value using the logical inversion signal of the carry from the lower digit, so XNOR
It uses an XOR circuit instead of a circuit. In addition, since only the 7th digit of the exponent part of the multiplier is not logically inverted, the carry propagation logic circuit for the 7th digit is an XNOR circuit without using an XOR circuit.
using a circuit. Further, in this embodiment, the most significant digit of the exponent part of the multiplier is not logically inverted, but the same function can be achieved even if the most significant digit of the exponent part of the multiplicand is not logically inverted.

次に除算の場合について説明する。Next, the case of division will be explained.

第4図は本発明の第2の実施例における浮動小数点演算
装置の除算器の指数部演算器の構成を示すものである。
FIG. 4 shows the configuration of the exponent part arithmetic unit of the divider of the floating point arithmetic unit in the second embodiment of the present invention.

この場合もIEEE754規格の単精度浮動小数点数を
扱い、指数部分は8桁のデータ幅を持つものとする。第
4図において、401は被除数の指数部分410の論理
反転を生成する第1の論理反転回路、402は除数の指
数部分411の下位7桁(第6桁から第0桁)の論理反
転を生成する第2の論理反転回路、403は論理反転回
路401の出力から論理反転回路402の出力と除数の
指数部分の最上位桁の数414を減算する減算器、40
4は減算器403の出力を論理反転する第3の論理反転
回路であって、演算結果(Ex  Ey + 127 
; B = 2”−’1 =127)412を出力する
。405は被除数の指数部分の最上位桁(第7桁)41
3がat Orpで除数の指数部分の最上位桁(第7桁
)414が“′l″′でかつ減算回路403の第6桁か
らの桁借り416がない場合にアンダーフローを、また
被除数の指数部分の最上位桁413がu 1 uで除数
の指数部分の最上位桁414が“0″でかつ減算回路4
03の第6桁からの桁借り417がある場合にオーバー
フローを検出する第1の検出器、406は被除数の指数
部分の最上位桁413がパO”で除数の指数部分の最上
位桁414が“1”でかつ第3の論理反転回路404の
出力がすべてII OFjである場合にアンダーフロー
を検出する第2の検出器、418は第1のアンダーフロ
ー信号。
In this case as well, single-precision floating point numbers according to the IEEE754 standard are handled, and the exponent part has a data width of 8 digits. In FIG. 4, 401 is a first logic inversion circuit that generates a logic inversion of the exponent part 410 of the dividend, and 402 is a logic inversion circuit that generates the logic inversion of the lower seven digits (6th to 0th digits) of the exponent part 411 of the divisor. A subtracter 403 subtracts the output of the logic inversion circuit 402 and the number 414 of the most significant digit of the exponent part of the divisor from the output of the logic inversion circuit 401;
4 is a third logic inversion circuit that inverts the logic of the output of the subtracter 403, and the calculation result (Ex Ey + 127
; B = 2"-'1 = 127) Outputs 412. 405 is the most significant digit (7th digit) of the exponent part of the dividend 41
If 3 is at Orp and the most significant digit (7th digit) 414 of the exponent part of the divisor is "'l"' and there is no borrow 416 from the 6th digit of the subtraction circuit 403, an underflow occurs, and the dividend The most significant digit 413 of the exponent part is u 1 u, the most significant digit 414 of the exponent part of the divisor is "0", and the subtraction circuit 4
The first detector 406 detects an overflow when there is a borrow 417 from the 6th digit of 03. A second detector 418 is a first underflow signal that detects an underflow when the signal is "1" and all outputs of the third logic inversion circuit 404 are II OFj.

419はオーバーフロー信号、420は第2のアンダー
フロー信号である。
419 is an overflow signal, and 420 is a second underflow signal.

次に上記第2の実施例の動作について説明する。Next, the operation of the second embodiment will be explained.

(5)式で示したように、第4図の除算器の指数部演算
器では、 EZ=Ex−EY+B=Ex−EY+2”−’−1−・
・−・(20)を求める。ただし、第4図の場合n=8
である。
As shown in equation (5), in the exponent part calculator of the divider in Fig. 4, EZ=Ex-EY+B=Ex-EY+2"-'-1-・
... Find (20). However, in the case of Figure 4, n=8
It is.

この(20)式を2の補数の関係式(7)式を用いて以
下のように変形する。
This equation (20) is transformed as follows using the two's complement relational equation (7).

Ez=Ex  EY+2”−11 :Ex+1−(Ey+1)+2”−1 =−(肩−析−2”−”)−1 = Ex−E、−2”−’−1−・・・(21)(20
)式は、被除数の指数部分の論理反転から除数の指数部
分の論理反転と2n−1を減算し、減算結果を論理反転
することで浮動小数点除算の指数部演算が実行できるこ
とを示している 2 m−1の減算は、被除数または除
数の一方の数のみ最上位桁を論理反転しないことで実現
できる。次に第4図の実施例でのアンダーフローとオー
バーフローの検出について説明する。第5図は単精度浮
動小数点数の除算の場合の、Ex−EYの値に対するE
xたものである。第5図と(9)、 (10)式より、
一般にn桁幅の指数部分を持つ浮動小数点数の除算での
アンダーフローの条件として次項が導かれる。
Ez=Ex EY+2"-11: Ex+1-(Ey+1)+2"-1 =-(Shoulder analysis-2"-")-1 = Ex-E, -2"-'-1-...(21) (20
) formula shows that the exponent part operation of floating-point division can be performed by subtracting the logical inversion of the exponent part of the divisor and 2n-1 from the logical inversion of the exponent part of the dividend, and inverting the logic of the subtraction result.2 Subtraction of m-1 can be realized by not logically inverting the most significant digit of either the dividend or the divisor. Next, detection of underflow and overflow in the embodiment shown in FIG. 4 will be explained. Figure 5 shows E for the value of Ex-EY in the case of division of single-precision floating point numbers.
It's something like x. From Figure 5 and equations (9) and (10),
Generally, the following term is derived as an underflow condition in division of a floating point number having an exponent part with an n-digit width.

■ EXの第n−1桁が0”でEYの第n−1すべてl
(0”の場合。
■ The n-1st digit of EX is 0” and all the n-1st digits of EY are l.
(In case of 0”.

■ Exの第n −1桁が# OIIでEYの第n −
1桁が“1”でかつ第n−2桁から第m桁(n−2≧m
≧O:mは整数)までの各桁においてExの値が“OI
TまたはEVの値が“1 jjである場合。
■ The n-1st digit of Ex is # OII and the n-th digit of EY
The 1st digit is “1” and the n-2nd to mth digits (n-2≧m
The value of Ex in each digit up to ≧O: m is an integer is “OI
When the value of T or EV is "1 jj.

■は第4図においてEX  EY=  127がアンダ
ーフローとなることから導かれる。また■は、Ex−E
Y≦−128がアンダーフローとなることと。
(2) is derived from the fact that EX EY=127 becomes an underflow in FIG. Also, ■ is Ex-E
Underflow occurs when Y≦−128.

Ex  Ev≦−129(101111111: 2進
表示)となるためには、第7桁目を0”とする桁借りが
必要なことから導かれる。またn桁幅の指数部分を持つ
浮動小数点数の除算でのオーバーフローの条件として次
項が導かれる。
This is derived from the fact that in order to obtain Ex Ev≦-129 (101111111: binary representation), it is necessary to borrow a digit by setting the 7th digit to 0.Also, for a floating point number with an exponent part that is n digits wide, The following term is derived as a condition for overflow in division.

■ Exの第n−1桁が“l”でEYの第n −L桁が
it Ouでかつ百、−E、−2’−’の全桁(第n−
1桁から第0桁)がすべて0”の場合。
■ The n-1st digit of Ex is "l" and the n-L digit of EY is it Ou, and all digits of 100, -E, -2'-' (n-th digit
1st digit to 0th digit) are all 0".

■ E9の第n−1桁が“1″でEYの第n−1桁が0
”でかつ第n−2桁から第α+1桁(n−2≧危≧0:
Qは整数)までの連続した各桁においてExの値が11
1 TlまたはE7の値が110 IPでかっExの第
悲桁が“1”でかっE7の第党桁がO′″の場合。
■ The n-1st digit of E9 is “1” and the n-1st digit of EY is 0
” and from the n-2nd digit to the α+1st digit (n-2≧danger≧0:
If the value of Ex is 11 in each consecutive digit up to (Q is an integer)
1 If the value of Tl or E7 is 110 IP, the last digit of Ex is "1", and the third digit of E7 is O'''.

■は第5図のEx−EY=182がオーバーフローとな
ることから導かれる。■はEx−EY≧129(100
00001: 2進数表示)となるためには、Ex−E
7の第7桁が′1”であり第6桁から第0桁の少くとも
1つの桁が“1″となることが必要なことから導かられ
る。
(2) is derived from the fact that Ex-EY=182 in FIG. 5 is an overflow. ■ is Ex-EY≧129 (100
00001: (binary representation), Ex-E
This is derived from the fact that the 7th digit of 7 is '1' and at least one digit from the 6th digit to the 0th digit must be '1'.

ここで、 (11)式と(13)式と同様に、1;−百
;−2″−1の第1桁(i≦n−2)からの桁借りを求
める。
Here, similarly to equations (11) and (13), find the borrow from the first digit (i≦n-2) of 1;-hundred;-2''-1.

Bi=X+・行+([十行)B、−0 =X、・Y、+(X++Y’T)B+−0=X1Y++
(Xt”YI)Xt−0’Y+−x+(xt+D (x
+ −x”Yi −t)Xt −z ・Y、−,4+−
++++”(Xt”’−1)(XI−t”Yt−t) 
” ””” ’ (Xz”Yz)(X−”Yx)Xo・
Y。
Bi=X+・Row+([10 rows)B, -0 =X,・Y,+(X++Y'T)B+-0=X1Y++
(Xt”YI)Xt-0'Y+-x+(xt+D (x
+ −x”Yi −t)Xt −z ・Y, −, 4+−
+++++"(Xt"'-1)(XI-t"Yt-t)
” ””” ' (Xz”Yz) (X-”Yx)Xo・
Y.

+(Xl+Yi)(XI−1+Y=1) −−・・−−
−−(Xt”Ya)(Xt”Yz)(Xo”Yo)B−
t(22)式は、初期桁借りB−1がありかつ第1桁か
らの桁借りがある場合は、第1桁から第5桁(i≧、j
)までの連続した各桁でxkがl(0)lまたはYkが
1”(i≧に≧j)であることを示している。
+(Xl+Yi) (XI-1+Y=1) ---...--
--(Xt"Ya) (Xt"Yz) (Xo"Yo)B-
Formula t(22) has an initial digit borrow B-1 and a digit borrow from the 1st digit, then the 1st to 5th digits (i≧, j
) indicates that xk is l(0)l or Yk is 1'' (i≧ and ≧j).

なお、(21)式から、B−1の設定によりE、!の値
がEt=Ex  Ey  2″−11 =Ex−EY+2”−1−・−−−−(23)となるこ
とが導かれる。すなわち第5図ではIll。
Furthermore, from equation (21), E,! due to the setting of B-1. It is derived that the value of Et=Ex Ey 2″-11 =Ex-EY+2″-1−·−−−(23). That is, Ill in FIG.

を設定することにより、Ex−EY≧128の場合に桁
上げが発生する。従って、指数部の桁幅がnの場合に、
被除数の指数部分の第n −1桁が1(I I+でかつ
除数の指数部分の第n −1桁1107+でかつ初期桁
借りがありかつ第n−2桁からの桁借りがある場合には
上記オーバーフローの条件■、■に対応しており、これ
を求めることによってオーバーフローを検出することが
できる。第4図の実施例では、減算器の第6桁から桁借
り417が上記桁借りに対応しており、オーバーフロー
はオーバーフロー信号419によって検出される。一方
、第1桁の桁借りの論理反転1は、次の論理式で示され
る。
By setting , a carry occurs when Ex-EY≧128. Therefore, when the digit width of the exponent part is n,
If the n-1st digit of the exponent part of the dividend is 1 (I I+, and the n-1st digit of the exponent part of the divisor is 1107+, and there is an initial digit borrowing and a digit borrowing from the n-2nd digit) This corresponds to the above overflow conditions ■ and ■, and overflow can be detected by determining this. In the example of FIG. 4, the borrow 417 from the 6th digit of the subtractor corresponds to the borrow. The overflow is detected by the overflow signal 419. On the other hand, the logical inversion of 1 in the borrow of the first digit is expressed by the following logical formula.

2酊・Y、+(紅+Y、)口・Y、−□”(X++Y+
)(x+−x”YI−t)Xt 4  ” Yr−x”
””’+(x、+y+)(x+−z+yt−t) ・ 
・・・・・・・ (X2+Y2)(ヌ5yt )ヌ;Y
2 drunkenness, Y, + (red + Y,) mouth, Y, -□” (X++Y+
)(x+-x"YI-t)Xt4"Yr-x"
""'+(x, +y+)(x+-z+yt-t) ・
...... (X2+Y2) (nu5yt)nu;Y
.

+(x++yt)(ヌ]=二:+Yi−1) ・・・・
・・・・(ヌl;”yJ(ヌニ+y1)(xa中Y、)
百=:1(24)式は、初期桁借りE3t−zがなく 
(TT’T= 1 )かつ第1桁からの桁借りがない場
合は、第1桁から第5桁(i≧j)までの連続した各桁
でXkが“O11またはYkがItllI(i≧に≧j
)であることを示している。従って、指数部分の桁幅が
nの場合、被除数の指数部分の第n −1桁が110 
G1で除数の指数部分の第n −1桁が′l”でかつ初
期桁借りがなくかつ第n −2桁から桁借りがない場合
には上記アンダーフローの条件■に対応しており、これ
を求めることによってアンダーフローを検出することが
できる。第4図は実施例では、減算器の第6桁からの桁
借り416が上記桁借りに対応しており、アンダーフロ
ーの条件■は第1のアンダーフロー信号418によって
、またアンダーフローの条件■は第2のアンダーフロー
信号420によって検出される。
+(x++yt)(nu]=2:+Yi-1)...
...(nu l;"yJ (nuni + y1) (Y in xa,)
100=:1 Formula (24) has no initial borrowing E3t-z.
(TT'T= 1) and there is no digit borrowing from the first digit, then in each consecutive digit from the first digit to the fifth digit (i≧j), Xk is “O11” or Yk is ItllI(i≧ to≧j
). Therefore, if the digit width of the exponent part is n, the n-1st digit of the exponent part of the dividend is 110
In G1, if the n-1st digit of the exponent part of the divisor is 'l'', there is no initial digit borrowing, and there is no digit borrowing from the n-2nd digit, it corresponds to the underflow condition (■) above. Underflow can be detected by finding the digit 416 in the embodiment shown in FIG. The underflow condition (2) is detected by the second underflow signal 418 and the second underflow signal 420.

第6図は第4図の実施例における指数部演算器の主要構
成要素である第1〜第3の論理反転回路401、402
.404.減算器403及第1の検出器405の論理回
路である。この回路も第3図と同様に桁借りの生成、伝
搬を桁上げ先見回路によって行っている。第6図におい
て、601は桁借り生成信号(G1)と桁借り伝搬信号
(P、)の生成回路、602は桁借伝搬信号、603は
最終和決定回路、610.611は第6桁目からの桁借
りの論理反転信号であって、それぞれ第0桁への初期桁
借りがない場合とある場合の信号である。
FIG. 6 shows first to third logic inversion circuits 401 and 402, which are the main components of the exponent arithmetic unit in the embodiment shown in FIG.
.. 404. This is a logic circuit of a subtracter 403 and a first detector 405. This circuit also uses a carry look-ahead circuit to generate and propagate a borrow as in FIG. In FIG. 6, 601 is a generation circuit for a borrow generation signal (G1) and a borrow propagation signal (P, ), 602 is a borrow propagation signal, 603 is a final sum determination circuit, and 610.611 is from the 6th digit. These are the logical inversion signals of digit borrowing, and these are the signals when there is no initial digit borrowing to the 0th digit and when there is, respectively.

この場合の桁借り生成信号Giy桁借り伝搬信号P1.
最終和Slは、(17)、 (18)、 (19)式と
同様に求められ次のようになる。
In this case, the borrow generation signal Giy, the borrow propagation signal P1.
The final sum Sl is obtained in the same way as equations (17), (18), and (19), and is as follows.

G、=XひY I= X +子育 ・・・・・・(25
)p、=x、■Y、=X、■Y 、   ・・−・・(
26)s 、=p 、■B、−1・・・・・・(27)
従って、この場合も第3図の場合と同様1通常の減算器
の桁借り生成1桁借り伝搬、最終和決定の論理を若干変
更するだけで実現できる。
G, =XhiY I=X + childcare (25
)p, =x, ■Y, =X, ■Y, ・・・-・・・(
26) s, = p, ■B, -1... (27)
Therefore, as in the case of FIG. 3, this case can be realized by only slightly changing the logic of one ordinary subtracter's borrow generation, single-digit borrow propagation, and final sum determination.

なお、上記実施例では除数の指数部分の最上位桁を論理
反転しない構成にしているが、被除数の指数部分の最上
位桁を論理反転しない構成にしても同様の機能が実現で
きる。
In the above embodiment, the most significant digit of the exponent part of the divisor is not logically inverted, but the same function can be achieved even if the most significant digit of the exponent part of the dividend is not logically inverted.

(発明の効果) 本発明は上記実施例から明らかなように、浮動小数点の
乗算または除算において、被演算数の指数部分と演算数
の指数部分と所定の定数との演算を、2の補数の関係を
用いることによって2つの指数部分の加算または減算の
みで行うため次の効果を有する。
(Effects of the Invention) As is clear from the above embodiments, in floating-point multiplication or division, the present invention performs an operation between the exponent part of the operand, the exponent part of the operand, and a predetermined constant using two's complement. By using the relationship, the calculation is performed by only adding or subtracting two exponent parts, so it has the following effects.

(1)指数部分の演算の加算器または減算器1つで実行
できるためハードウェア量を削減できる。
(1) The amount of hardware can be reduced because the calculation of the exponent part can be executed with one adder or subtracter.

(2)内部計算に用いる桁上げまたは桁借りを用いるこ
とによりアンダーフロー、オーバーフローを高速に検出
できる。
(2) By using carry or borrow used in internal calculations, underflows and overflows can be detected at high speed.

(3)アンダーフローまたはオーバーフローの検出に要
するハードウェア量を削減できる。
(3) The amount of hardware required to detect underflow or overflow can be reduced.

(4)ハードウェア量の減少に伴って消費電力も減少し
、浮動小数点演算の高速化が図れる。
(4) As the amount of hardware decreases, power consumption also decreases, making it possible to speed up floating-point operations.

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

第1図は本発明の第1の実施例における浮動小数点演算
装置乗算器の指数部演算器の構成図、第2図は第1図の
浮動小数点乗算の指数部演算の説明図、第3図は第1の
実施例における乗算器の指数部演算器の回路図、第4図
は本発明の第2の実施例における浮動小数点演算装置除
算器の指数部演算器の構成図、第5図は第4図の浮動小
数点除算の指数部演算の説明図、第6図は第2の実施例
における除算器の指数演算器の回路図、第7図は従来の
浮動小数点演算装置の乗算器に用いられた指数部演算器
の構成図である。 101、401・・・第1の論理反転回路、  102
゜402・・・第2の論理反転回路、130・・・加算
器、104.404・・・第3の論理反転回路、105
、405・・・第Iの検出器、106.406・・・第
2の検出器、  110・・・被乗数の指数部分、11
1・・・乗数の指数部分、112゜412、713・・
・演算結果、113・・・被乗数の指数部分最上位桁、
114・・・乗数の指数部分の最上位桁、115・・・
初期桁上げ、116、117・・・加算器の第6桁から
の桁上げ、118.714・・・アンダーフロー信号、
119・・・第1のオーバーフロー信号、120゛°・
第2のオーバーフロー信号、301・・・桁上げ生成信
号と桁上げ伝搬信号の生成回路、302・・・桁上げ伝
搬回路、303゜603・・・最終相決定回路、310
.311・・・桁上げの論理反転信号、403・・・減
算器、410・・・被除数の指数部分、411・・・除
数の指数部分、413・・・被除数の指数部分の最上位
桁、414・・・除数の指数部分の最上位桁、415・
・・初期桁借り、416゜417・・・減算器の第6桁
からの桁借り。 418・・・第1のアンダーフロー信号、419゜71
5・・・オーバーフロー信号、420・・・第2のアン
ダーフロー信号、601・・・桁借り生成信号と桁借り
伝搬信号の生成回路、602・・・桁借り伝搬回路、6
10.611・・・桁借りの論理反転信号、701・・
・第1加算器、702・・・第2加算器、703・・・
検出器、710・・・被乗数のn桁指数部分、711・
・・乗数のn桁指数部分、712・・・偏位量Bの2の
補数。 第1図 116.117゛ 刀口簀1容の第6討ゴカ・ら(I嘴
テ上1ア゛第4図 416.417:  Jふ算ネ&の第64行D・らの桁
情り0蕾−峠卸鰺 第7図 714下〉りパ−フローイ6号
FIG. 1 is a block diagram of the exponent part calculation unit of the floating point arithmetic unit multiplier in the first embodiment of the present invention, FIG. 2 is an explanatory diagram of the exponent part calculation of the floating point multiplication shown in FIG. 1, and FIG. 3 is a circuit diagram of the exponent part calculator of the multiplier in the first embodiment, FIG. 4 is a block diagram of the exponent part calculator of the floating point arithmetic unit divider in the second embodiment of the present invention, and FIG. Fig. 4 is an explanatory diagram of the exponent part operation of floating-point division, Fig. 6 is a circuit diagram of the exponent unit of the divider in the second embodiment, and Fig. 7 is used in the multiplier of the conventional floating-point arithmetic device. FIG. 101, 401...first logic inversion circuit, 102
゜402...Second logic inversion circuit, 130...Adder, 104.404...Third logic inversion circuit, 105
, 405... I-th detector, 106.406... Second detector, 110... Exponent part of multiplicand, 11
1...Exponent part of multiplier, 112°412, 713...
・Arithmetic result, 113...most significant digit of exponent part of multiplicand,
114...The most significant digit of the exponent part of the multiplier, 115...
Initial carry, 116, 117... Carry from the 6th digit of the adder, 118.714... Underflow signal,
119...first overflow signal, 120°・
Second overflow signal, 301... Carry generation signal and carry propagation signal generation circuit, 302... Carry propagation circuit, 303° 603... Final phase determination circuit, 310
.. 311... Logical inversion signal for carry, 403... Subtractor, 410... Exponent part of dividend, 411... Exponent part of divisor, 413... Most significant digit of exponent part of dividend, 414 ...The most significant digit of the exponent part of the divisor, 415.
... Initial digit borrow, 416°417... Digit borrow from the 6th digit of the subtractor. 418...first underflow signal, 419°71
5... Overflow signal, 420... Second underflow signal, 601... Generation circuit for a borrow generation signal and borrow propagation signal, 602... Borrow propagation circuit, 6
10.611...Logic inversion signal of borrowed digit, 701...
- First adder, 702... Second adder, 703...
Detector, 710... n-digit exponent part of multiplicand, 711.
...N-digit exponent part of the multiplier, 712...2's complement of deviation amount B. Figure 1 116.117゛ 6th attack Goka et al. (I beak top 1 item) Bud - Touge wholesale mackerel Figure 7 714 Bottom> Riper flowy No. 6

Claims (4)

【特許請求の範囲】[Claims] (1)第n−1桁から第0桁(最上位桁が第n−1桁、
n≧2、nは整数)までのn桁長の指数部分を有する浮
動小数点数の乗算において、被乗数または乗数の一方の
数の指数部分を入力し各桁を論理反転して出力する第1
の手段と、他方の数の指数部分を入力し第n−2桁から
第0桁までの各桁を論理反転して出力する第2の手段と
、前記第1の手段の出力と前記第2の手段の出力とを加
算するn桁長の加算器と、前記加算器の出力を論理反転
する第3の手段とを備え、前記第3の手段の出力を乗算
結果の指数部分とすることを特徴とする浮動小数点演算
装置。
(1) From the n-1st digit to the 0th digit (the most significant digit is the n-1st digit,
In the multiplication of floating point numbers having an n-digit exponent part up to n ≥ 2, n is an integer), the first function inputs the exponent part of either the multiplicand or the multiplier, logically inverts each digit, and outputs it.
means for inputting the exponent part of the other number, logically inverting each digit from the n-2nd digit to the 0th digit and outputting the same; and a third means for logically inverting the output of the adder, and the output of the third means is used as an exponent part of the multiplication result. A floating point arithmetic unit with special features.
(2)被乗数の指数部分の第n−1桁と乗数の指数部分
の第n−1桁がともに“0”でかつ前記加算器に初期桁
上げを入力したときに第n−2桁からの桁上げがある場
合にアンダーフローとし、前記被乗数の指数部分の第n
−1桁と前記乗数の指数部分の第n−1桁がともに“1
”でかつ前記第3の手段の出力がすべて“1”の場合、
または前記被乗数の指数部分の第n−1桁と前記乗数の
指数部分の第n−1桁がともに“1”でかつ前記加算器
の第n−2桁からの桁上げがない場合にオーバーフロー
とすることを特徴とする請求項(1)記載の浮動小数点
演算装置。
(2) When the n-1st digit of the exponent part of the multiplicand and the n-1st digit of the exponent part of the multiplier are both "0" and the initial carry is input to the adder, the n-2nd digit If there is a carry, it is considered an underflow, and the nth of the exponent part of the multiplicand is
-1 digit and the n-1 th digit of the exponent part of the multiplier are both "1"
” and the outputs of the third means are all “1”,
Or, if the n-1st digit of the exponent part of the multiplicand and the n-1st digit of the exponent part of the multiplier are both "1" and there is no carry from the n-2nd digit of the adder, an overflow occurs. The floating point arithmetic device according to claim 1, characterized in that:
(3)第n−1桁から第0桁(最上位桁が第n−1桁、
n≧2、nは整数)までのn桁長の指数部分を有する浮
動小数点数の除算において、被乗数の指数部分または除
数の指数部分を入力し各桁を論理反転して出力する第1
の手段と、除数の指数部分または被除数の指数部分を入
力し第n−2桁から第0桁を論理反転して出力する第2
の手段と、前記第1の手段または前記第2の手段で論理
反転された前記被除数の指数部分から前記第2の手段ま
たは前記第1の手段で論理反転された前記除数の指数部
分を減算する減算器と、前記減算器の出力を論理反転す
る第3の手段とを備え、前記第3の手段の出力を除算結
果の指数部分とすることを特徴とする浮動小数点演算装
置。
(3) From the n-1st digit to the 0th digit (the most significant digit is the n-1st digit,
In the division of a floating point number that has an n-digit long exponent part (up to n ≥ 2, n is an integer), the first function inputs the exponent part of the multiplicand or the exponent part of the divisor, logically inverts each digit, and outputs it.
and a second means for inputting the exponent part of the divisor or the exponent part of the dividend and logically inverting the n-2nd to 0th digits and outputting the result.
and subtracting the exponent part of the divisor whose logic has been inverted by the second means or the first means from the exponent part of the dividend which has been logically inverted by the first means or the second means. A floating point arithmetic device comprising a subtracter and third means for logically inverting the output of the subtracter, the output of the third means being an exponent part of the division result.
(4)被乗数の指数部分の第n−1桁が“0”で除数の
指数部分の第n−1桁が“1”でかつ前記第3の手段の
出力がすべて“0”の場合、または前記被除数の指数部
分の第n−1桁が“0”で前記除数の指数部分の第n−
1桁が“1”でかつ前記減算器の第n−2桁からの桁借
りがない場合にアンダーフローとし、前記被除数の指数
部分の第n−1桁が“1”で前記除数の指数部分の第n
−1桁が“0”でかつ前記減算器に初期桁借りを入力し
たときに第n−2桁からの桁借りがある場合にオーバー
フローとすることを特徴とする請求項(3)記載の浮動
小数点演算装置。
(4) When the n-1st digit of the exponent part of the multiplicand is "0", the n-1st digit of the exponent part of the divisor is "1", and all outputs of the third means are "0", or The n-1st digit of the exponent part of the dividend is "0" and the n-th digit of the exponent part of the divisor is "0".
An underflow occurs when one digit is "1" and there is no borrowing from the n-2nd digit of the subtracter, and the exponent part of the divisor has an exponent part where the n-1st digit of the exponent part of the dividend is "1". nth of
Floating according to claim 3, characterized in that if the first digit is "0" and there is a digit borrow from the n-2nd digit when the initial digit borrow is input to the subtracter, an overflow occurs. Decimal point arithmetic unit.
JP1201396A 1989-08-04 1989-08-04 Floating-point arithmetic unit Pending JPH0365722A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1201396A JPH0365722A (en) 1989-08-04 1989-08-04 Floating-point arithmetic unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1201396A JPH0365722A (en) 1989-08-04 1989-08-04 Floating-point arithmetic unit

Publications (1)

Publication Number Publication Date
JPH0365722A true JPH0365722A (en) 1991-03-20

Family

ID=16440398

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1201396A Pending JPH0365722A (en) 1989-08-04 1989-08-04 Floating-point arithmetic unit

Country Status (1)

Country Link
JP (1) JPH0365722A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5776635A (en) * 1980-10-31 1982-05-13 Hitachi Ltd Floating multiplying circuit
JPS6319894A (en) * 1986-07-14 1988-01-27 山崎 忠義 Method of printing picture onto printed board

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5776635A (en) * 1980-10-31 1982-05-13 Hitachi Ltd Floating multiplying circuit
JPS6319894A (en) * 1986-07-14 1988-01-27 山崎 忠義 Method of printing picture onto printed board

Similar Documents

Publication Publication Date Title
JP2662196B2 (en) Calculation result normalization method and apparatus
US5027308A (en) Circuit for adding/subtracting two floating point operands
US5010508A (en) Prenormalization for a floating-point adder
JPH0635675A (en) Method and device for conducting division in data processor
US5184318A (en) Rectangular array signed digit multiplier
JP4388980B2 (en) Arithmetic apparatus and method for performing floating-point division or square root operation
US4878192A (en) Arithmetic processor and divider using redundant signed digit arithmetic
US5144576A (en) Signed digit multiplier
Takagi et al. A hardware algorithm for integer division
US5408426A (en) Arithmetic unit capable of performing concurrent operations for high speed operation
US7552165B2 (en) Method and system to implement an improved floating point adder with integrated adding and rounding
JP2511527B2 (en) Floating point arithmetic unit
US4866655A (en) Arithmetic processor and divider using redundant signed digit
Tsen et al. A combined decimal and binary floating-point multiplier
Ushasree et al. VLSI implementation of a high speed single precision floating point unit using verilog
Mathis et al. A novel single/double precision normalized IEEE 754 floating-point adder/subtracter
JPH0365722A (en) Floating-point arithmetic unit
Lang et al. Division unit for binary integer decimals
JPH0283728A (en) Floating point multiplier
Schulte et al. A software interface and hardware design for variable-precision interval arithmetic
Shapran et al. DIVISION USING THE BASE RADIX16 NUMBER SYSTEM TO FORM FRACTION DIGITS
Shekhawat et al. PHAc: P osit H ardware Ac celerator for Efficient Arithmetic Logic Operations
Min et al. Fused floating-point magnitude unit
Villalba-Moreno Digit recurence division under HUB format
JP3100868B2 (en) Arithmetic unit for floating point numbers