JPS6162932A - Floating point arithmetic unit - Google Patents

Floating point arithmetic unit

Info

Publication number
JPS6162932A
JPS6162932A JP59184623A JP18462384A JPS6162932A JP S6162932 A JPS6162932 A JP S6162932A JP 59184623 A JP59184623 A JP 59184623A JP 18462384 A JP18462384 A JP 18462384A JP S6162932 A JPS6162932 A JP S6162932A
Authority
JP
Japan
Prior art keywords
register
value
exponent
length
bit
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
JP59184623A
Other languages
Japanese (ja)
Inventor
Koichi Yokomizo
剛一 横溝
Hozumi Hamada
浜田 穂積
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP59184623A priority Critical patent/JPS6162932A/en
Publication of JPS6162932A publication Critical patent/JPS6162932A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To use input data without converting a large amount of data in exponential part fixed-length expression to variable length expression by using exponential part fixed length and exponential part variable length properly in floating point expression. CONSTITUTION:When the value (e) in an exponential part register 13 is within a range of -256<=e<=248, it is discriminated that the variable length expression is used in the arithmetic result and when not, it is decided that the fixed length expression is used. When the variable length expression is employed, the contents of the mantissa part register 12 are transferred to a floating point register 11. The sign bit 24 of a register 13 is inputted to the input 50 of a two-input logical circuit 16, the sign bit 22 of the register 12 is inputted to the input 51, and the output of the logical circuit 16 is inputted to a flip-flop 15. When the fixed-length expression is used, the sign bit 22 of the register 12 is used as a supply bit to shift the contents of the register 12 to right once and those of the register 14 to left once. Then, the value of the register 12 is transferred to a register 11.

Description

【発明の詳細な説明】 〔発明の利用分野〕 本発明は、浮動小数点数演算装置に関し、特に数値デー
タを指数部固定長表現形式と指数部可変長表現形式の画
形式で演算可能な浮動小数点数演算装置に関するもので
ある。
[Detailed Description of the Invention] [Field of Application of the Invention] The present invention relates to a floating-point number arithmetic device, and in particular to a floating-point number arithmetic device that can operate on numerical data in a fixed-length exponent representation format and a variable-length exponent representation format. This relates to arithmetic processing devices.

〔発明の背景〕[Background of the invention]

従来から連続的な数値データの離散的な表現として、指
数部固定長浮動小数点表現は多くの電子引算機に採用さ
れ、一般に広く使用されている。
Conventionally, as a discrete representation of continuous numerical data, a floating point representation with a fixed exponent part has been adopted in many electronic subtraction machines and is generally widely used.

この表現法は、指数部が固定長ゆえ、取扱いが容易であ
るが、極端に絶対値の大きな数や絶対値の小さな数が表
現できず、表現できろデータの範囲が、応用対象によっ
ては充分でないという欠点があった。指数部可変長fJ
、!PIJ小数点表現形式は、特開昭58−11482
8号公報に記載されているよう(二指敷部固定長表現よ
りも広い範囲のデータを表現でき、現実の応用上充分な
表現可能範囲が得られる。しかし、その指数部可変長浮
動小数点は、従来の指数部固定長表現と形式−Fの共通
性がほとんどないために、従来の指数部固定長表現で蓄
(Hされたデータは、指数部可変長に変換しなければ使
用できないという問題があった。
This representation method is easy to handle because the exponent part is a fixed length, but it cannot represent numbers with extremely large or small absolute values, and the range of data that can be represented may be insufficient depending on the application. There was a drawback that it was not. Exponent variable length fJ
,! The PIJ decimal point representation format is JP-A-58-11482.
As stated in Publication No. 8 (it can represent a wider range of data than the two-finger fixed-length representation, and has a sufficient expressible range for actual applications. However, the exponent part variable-length floating point , since there is almost no commonality between the conventional fixed-length exponent representation and format -F, there is a problem that data stored in the conventional fixed-length exponent representation cannot be used unless it is converted to a variable-length exponent. was there.

〔発明の目的〕[Purpose of the invention]

本発明の目的は、このよ′)な従来の欠点を改高し、従
来の指数部固定長浮動小数点表現方式の表現形式を保持
し、かつ、表現可能なデータの範囲を指数部可変長浮動
小数点表現方式と同等な範囲まで広げることが可能な浮
動小数点表現方式による浮動小数点数演算装置を提供す
ることにある。
The purpose of the present invention is to improve the conventional drawbacks such as '), maintain the expression format of the conventional fixed-length exponent floating-point representation system, and expand the range of data that can be expressed using variable-length floating-point exponent. An object of the present invention is to provide a floating point arithmetic device using a floating point representation method that can be extended to a range equivalent to that of a decimal point representation method.

〔発明の概要〕[Summary of the invention]

1−記1」的を達成させるために、本発明では、データ
の範囲によって、入力されたデータが指数部固定長表現
か指数部可変長表現かを判別する手段および、該判別手
段により判別された」二記人力データを演算し、演算結
果が指数部固定長衣131の範囲か指数部可変長表現の
範囲かを判別する手段とを設けたことに特徴がある。
In order to achieve the objective 1-Note 1, the present invention provides a means for determining whether input data is a fixed-length exponent part expression or a variable-length exponent part expression, depending on the data range, The present invention is characterized in that it is provided with a means for calculating the manual data and determining whether the calculation result is in the range of the fixed exponent part 131 or the range of the variable length expression of the exponent part.

〔発明の実施例〕[Embodiments of the invention]

以ト、本発明の実施例を図面により説明する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings.

まず、本発明の演算装置に用いる指数部固定長浮動小数
点表現方式(以下「固定長表現」、「固定長表現方式」
の如く称する。)と指数部可変長浮動小数点表現方式(
以下「可変長表現」、「可変長表現方式」の如く称する
。)について詳細に説明する。
First, the exponent part fixed-length floating point representation method (hereinafter referred to as "fixed-length representation", "fixed-length representation method") used in the arithmetic device of the present invention
It is called as. ) and exponent variable length floating point representation method (
Hereinafter, this will be referred to as "variable length representation" and "variable length representation method." ) will be explained in detail.

第2図は、本実施例で用いる固定長表現を示す図である
FIG. 2 is a diagram showing a fixed length representation used in this embodiment.

第2図において、]は数値データの符号情報の1ビット
、2は指数の値を表す7ビツ1−からなるに3) 指数部、3は仮数部、4は指数部2と仮数部3の境界で
ある。固定長表現では境界4は固定されている。
In Fig. 2, ] is 1 bit of code information of numerical data, 2 is the exponent value consisting of 7 bits 1-, 3 is the mantissa part, and 4 is the exponent part 2 and mantissa part 3. It is a boundary. In the fixed length representation, the boundary 4 is fixed.

数Xが指数eと仮数mとで次のように表現されるものと
する。
Assume that a number X is expressed by an exponent e and a mantissa m as follows.

x=m・168          ・・・(1)ここ
で、eは整数であり、1ml<1である。
x=m·168 (1) where e is an integer and 1ml<1.

このとき、符号情報の1ビツトは、m ) Oならば0
、m<Oならば1とする。指数部の7ビツ1−はe+6
4を2進数で表したものである。仮数部は1mlを16
進数で表したときの小数点以下を必要なだけの長さを取
り出したもので、最下位以降は切捨てまたは7捨8人す
る。
At this time, one bit of code information is 0 if m ) O.
, if m<O, it is set to 1. 7 bits 1- of the exponent part are e+6
This is the binary representation of 4. The mantissa is 16 for 1ml.
When expressed as a base number, the necessary length is extracted after the decimal point, and the number after the lowest value is rounded down or rounded down to the nearest 8.

本実施例で用いる可変長表現方式の要点は、指数部の先
行するIt OItの列あるいは1′″の列により指数
部の長さを決定する点にあり、以下の如く規定する。
The key point of the variable length representation system used in this embodiment is that the length of the exponent part is determined by the It_OIt sequence or the 1'' sequence preceding the exponent part, and is defined as follows.

(i)本可変長表現は数Oと無限大とを次の通り表現可
能である。
(i) This variable length representation can represent the number O and infinity as follows.

0は  “OOO・・0”     ・・(2)無限大
は” 100・・・0″      ・・(3)以下、
これ以外の数について述べる。
0 is "OOO...0"...(2) Infinity is "100...0"...(3) Below,
Let's talk about other numbers.

(i])数Xが指数eと仮数mとで次のように表現され
るものとする。
(i]) Assume that a number X is expressed by an exponent e and a mantissa m as follows.

x = rn−2+          ・・・(4)
ここで、eは整数であり、またmはXの符号に従って次
のように規定されるものである。mについても次のよう
に規定される。
x = rn-2+ (4)
Here, e is an integer, and m is defined as follows according to the sign of X. m is also defined as follows.

a)x>Oのとき、 1<、m<2.m=m−1・・(5) b)x<Oのとき −2<m<−,1,、m=m+2   ・・・(6)ま
た、豆は次のように規定される。
a) When x>O, 1<, m<2. m=m-1...(5) b) When x<O, -2<m<-, 1, m=m+2...(6) Furthermore, beans are defined as follows.

に)eン−のとき e = e + 1.             −(
7)d)e<Oのとき 雇−=−e            ・・(8)更に、
nは次のように規定される。
) When e-en-, e = e + 1. −(
7) d) When e<O, then -=-e... (8) Furthermore,
n is defined as follows.

r+= [Qo g2e]+1−     −(9)但
し、記号〔〕はガウス記号であり、〔X〕はXを越えな
い最大の整数を表すものとする。
r+=[Qo g2e]+1--(9) However, the symbol [] is a Gauss symbol, and [X] represents the largest integer not exceeding X.

(jii )本可変長表現のビット配置は、原則的には
第2図に示した配置と同じである。但し、指数部の長さ
は可変であり、2nピッ1−である。
(jii) The bit arrangement of this variable length representation is basically the same as the arrangement shown in FIG. However, the length of the exponent part is variable and is 2n pi 1-.

(〜)符号情報のビット1はx > OのときO,x<
0のとき1である(固定長表現と同じ)。
(~) Bit 1 of code information is O when x > O, x <
It is 1 when it is 0 (same as fixed length expression).

(v)指数部は次のように規定される。(v) The exponent part is defined as follows.

a)左nビットはtr 1 r+の列である。a) The left n bits are the column of tr1r+.

b)右nビットは7を2進展開した長さnのビット列の
左端を“0″に変えたものである。
b) The right n bits are a bit string of length n obtained by binary expansion of 7, with the left end changed to "0".

C)但し、X〈−1あるいはO< x < 1のときは
上記c)、d)で定まるものの1の補数である。
C) However, when X <-1 or O < x < 1, it is the one's complement of what is determined by c) and d) above.

(vi)仮数部は次のように規定される。(vi) The mantissa is defined as follows.

mの2進展開形を 0、b、 b2b3・=         −(10)
とするとき、ビット列”b、b2b3・・・′″の左か
ら必要なだけの長さのものである。
The binary expanded form of m is 0, b, b2b3・= −(10)
In this case, the length of the bit string "b, b2b3, . . . " is as long as necessary from the left.

以上の規定により任意のビット列の表現する数が一意に
定まる。
The above definition uniquely determines the number represented by any bit string.

次に、本実施例で用いるデータの浮動小数点表現におけ
る固定長表現と可変長表現の使い分けの範囲について以
下のように規定する。表現するデータをXとすると、 (i)無限大           :可変長表現(i
i )x <−−2”8:可変長表現(jii)−22
411<x<−2−”’     :固定長表現Nv)
 −2−”’< x < 2−”’     :可変長
表現(v )2−′!i’< x < 2248.固定
長表現(vi)224″<x           H
可変長表現この規定は、データを可変長表現したときに
、指数部の左7ビツトが全て“0”、あるいは全て11
1 ++とならないデータのみ固定長表現を用いるとも
解釈できる。以後、上記の使い分けに従った浮動小数点
表現方式を本表現方式と略記する。
Next, the range of use of fixed-length representation and variable-length representation in the floating-point representation of data used in this embodiment is defined as follows. Assuming that the data to be expressed is X, (i) Infinity: variable length expression (i
i) x <--2"8: Variable length expression (jii) -22
411<x<-2-”': Fixed length expression Nv)
-2-"'< x <2-"': variable length expression (v)2-'! i'<x<2248. Fixed length representation (vi) 224″<x H
Variable length representation This rule means that when data is represented in variable length, the left 7 bits of the exponent part are all “0” or all 11.
It can also be interpreted as using fixed-length representation only for data that does not become 1 ++. Hereinafter, the floating point representation method according to the above usage will be abbreviated as the present representation method.

第1図は、本発明の一実施例を示す浮動小数点数演算装
置の要部を示すブロック図である。
FIG. 1 is a block diagram showing the main parts of a floating point arithmetic device according to an embodiment of the present invention.

第1図において、11は浮動小数点数レジスタ、12は
仮数部レジスタ、13は指数部レジスタ、14はカウン
タ、15はフリップフロップ、16は2人力論理回路、
17は指数変換回路、25はインバータである。
In FIG. 1, 11 is a floating point register, 12 is a mantissa register, 13 is an exponent register, 14 is a counter, 15 is a flip-flop, 16 is two human logic circuits,
17 is an index conversion circuit, and 25 is an inverter.

浮動小数点数レジスタ]1の長さをK +1ビツトとす
る。符号ビット20を除いた右にピッ1へはシフト・レ
ジスタであり、以下の機能を有している。
Floating point number register] The length of 1 is K + 1 bits. The shift register to the right, except for the sign bit 20, is a shift register that has the following functions.

(1,−1)左シストのl−リガ31が与えられる度に
1ビツトだけ左シフトする。
(1, -1) Shifts to the left by 1 bit each time the left cyst l-rigger 31 is applied.

(1−2)右シフトのトリガ32が与えられる度に1ビ
ツトだけ右シフ1−する。
(1-2) Each time the right shift trigger 32 is applied, the right shift is performed by 1 bit.

(1−3)仮数部レジスタ12へ〜値の転送を行う。(1-3) Transfer the value to the mantissa register 12.

(]、 −4)値減少トリガ33により1だけ値を減少
する。
(], -4) The value is decreased by 1 by the value decrease trigger 33.

(1−5)補数トリガ34により、−斉に各ビットの値
のtI O11と111 ++を反転する。
(1-5) The complement trigger 34 inverts the values tIO11 and 111++ of each bit simultaneously.

仮数部レジスタ12は、長さにピッ1〜を有するシフト
・レジスタであり、以下の機能を有している。
The mantissa register 12 is a shift register having a length of 1 to 1, and has the following functions.

(1,−6)左シフ1−のトリガ35が与えられる度に
1ビツトだけ左ヘシフトする。
(1, -6) Each time the left shift 1- trigger 35 is applied, the bit is shifted to the left by one bit.

(1,−7’)右シフトのトリガ36が与えられる度に
1ビツトだけ右ヘシフトする。
(1, -7') Each time the right shift trigger 36 is applied, the bit is shifted to the right by one bit.

(1,−8)浮動小数点数レジスタ11へ値の転送を行
う。
(1, -8) Transfers the value to the floating point register 11.

(1−9)値減少トリガ37により1だけ値を減少する
(1-9) Decrease the value by 1 using the value decrease trigger 37.

(1,−10)補数トリガ38により、−斉に各ピッl
〜の値の“O”と“1”を反転する。
(1, -10) Complement trigger 38 causes each pill to be triggered simultaneously.
Invert the values of ``O'' and ``1''.

指数部レジスタ13は長さにビットを有するレジスタで
あり、以下の機能を有している。
The exponent register 13 is a register having bits in length, and has the following functions.

(1,−11)左シフトのトリガ39が与えられる度に
1ビツトだけ左シストする。
(1, -11) Each time the left shift trigger 39 is applied, one bit is shifted to the left.

(1−1,2)右シフトのトリガ40が与えられる度に
1ビツトだけ右シフトする。
(1-1,2) Each time the right shift trigger 40 is applied, the bit is shifted to the right by one bit.

(1−13)値増加トリガ41−により、1だけ値を増
加する。
(1-13) The value is increased by 1 by the value increase trigger 41-.

(1−14)値減少トリガ42により、1だけ値を減少
する。
(1-14) The value is decreased by 1 by the value decrease trigger 42.

(1−15)補数トリガ43により、−斉に各ピットの
種の“O”と“1′″に反転する (1−16)すべてのピッ1へがrr O++であるこ
とを検出する。
(1-15) The complement trigger 43 simultaneously inverts the seeds of each pit to "O" and "1'" (1-16) It is detected that all pits 1 are rr O++.

(1,−17)値減少トリガ44により、64だけ値を
減少する。
(1, -17) The value decrease trigger 44 decreases the value by 64.

(1−18)値(e)が−256< e < 248の
範囲内であるか否かを検出する。
(1-18) Detect whether the value (e) is within the range of -256<e<248.

前記各シフトトランジスタでシフ1〜するにあたっては
、特にことわらない限り、溢れたピッ1−Q)情報は失
われ、供給されるべきピッ1〜はll O++である。
When each of the shift transistors shifts 1~, unless otherwise specified, the overflowing P1-Q) information is lost, and the P1~ to be supplied is llO++.

2人力論理回路16は入力50と入力5】の値に従って
第3図に示すような出力な発生ずる。
The two-person logic circuit 16 generates an output as shown in FIG. 3 according to the values of inputs 50 and 5.

指数変換回路17は、以下の機能をイJしている。The exponent conversion circuit 17 has the following functions.

(1−19)指数部レジスタ1;3中のデータ値(e)
を用いて、 e’ = C(e+3)/’1〕−1−64  ・・(
11)n =  (e ’  −64)  X 4− 
e     ・・(12)を計算し、値e′を指数部レ
ジスタ 13へ出力し、n回浮動小数点数レジ スタ11に右シフトのトリガ32を与 える。但し、〔〕はガウス記号であ る。
(1-19) Data value (e) in exponent register 1;3
Using, e' = C(e+3)/'1]-1-64...(
11) n = (e' -64) X 4-
e...(12) is calculated, the value e' is output to the exponent register 13, and a right shift trigger 32 is given to the n-times floating point register 11. However, [ ] is a Gauss symbol.

上述の構成を有する本実施例装置の作用について以下に
説明する。
The operation of the apparatus of this embodiment having the above-mentioned configuration will be explained below.

本表現方式によるデータの演算は次の手順で行われる。Data calculations using this representation method are performed in the following steps.

(1)“0”あるいは111 IIの列の計数(2)指
数部と仮数部の分離 に()加減算の場合、指数部の値の調整(4)演算 (5)正規化 (6)指数部と仮数部の結合 (7)  ”O”あるいはII I IIの列の挿入法
に、上記の各手順について詳細に説明する。
(1) Counting the column of “0” or 111 II (2) Separating the exponent part and mantissa part () In the case of addition and subtraction, adjusting the value of the exponent part (4) Calculation (5) Normalization (6) Exponent part and the combination of the mantissa (7) How to insert the "O" or II II column, each of the above steps will be explained in detail.

m  ”O”あるいはLL 1− IIの列の計数(a
)カウンタ14の値を0にセットする。浮動小数点レジ
スタ]]の符号ビット2oを除いた第1ピツ1〜21の
値在フリップフロップ】5にセットする。
m “O” or LL 1-II row count (a
) Set the value of counter 14 to 0. The values of the first bits 1 to 21 excluding the sign bit 2o of the floating point register] are set to 5.

(b)浮動小数点数レジスタ11の前記第1ビツト21
を論理回路16の入力50に入れる。
(b) The first bit 21 of the floating point number register 11
into the input 50 of the logic circuit 16.

フリップ・フロップ15の値を論理回路16の入力5」
に入れる。このときの論理回路16の出力(“1”)を
カウンタ14で計算する。浮動小数点数レジスタ11の
前記第1ビツト21を供給ビットとして指数部レジスタ
13を前記機能(]−−−11,)により左シフトする
The value of the flip-flop 15 is input to the input 5 of the logic circuit 16.
Put it in. The counter 14 calculates the output (“1”) of the logic circuit 16 at this time. Using the first bit 21 of the floating point register 11 as the supply bit, the exponent register 13 is shifted to the left by the function (]---11,).

(c)次のステップ(d)を論理回路16の出力が“0
”になるまで繰返し、その回数をカウンタ14で計数す
る。
(c) The output of the logic circuit 16 is “0” in the next step (d).
”, and count the number of times with the counter 14.

(d)浮動小数点数レジスタ11を前記機能(1−1)
により左シフ1−する。新しく前記第1ビツト21に左
シフトされた値を論理回路16の入力50に入れる。さ
らに、この第1ビツト21を供給ビットとして指数部レ
ジスタ13を前記機能(1−11)により左シフトする
。フリップ・フロップ15の値を論理回路16の入力5
1に入れる。
(d) Floating point number register 11 is set to the above function (1-1)
Shift left by 1-. The value newly left-shifted to the first bit 21 is input to the input 50 of the logic circuit 16. Furthermore, using this first bit 21 as a supply bit, the exponent register 13 is shifted to the left by the function (1-11). The value of the flip-flop 15 is input to the input 5 of the logic circuit 16.
Put it in 1.

(2)指数部と仮数部の分離 (a)カウンタ】4の値が7以上のときは、浮動小数点
数1ノジスタ11の値は可変長表現と判別し、次の(b
)〜(、])の処理を行い、カウンタ14の値が7未満
のときは、固定長表現と判別して、次の(10〜(r)
の処理を行う。
(2) Separation of exponent and mantissa parts (a) Counter] When the value of 4 is 7 or more, the value of floating point number 1 no register 11 is determined to be a variable length expression, and the next (b)
) to (, ]), and if the value of the counter 14 is less than 7, it is determined that it is a fixed length expression, and the next (10 to (r)
Process.

(b) −1一記手順(1)の結果の浮動小数点数レジ
スタ11の前記第1ビツト21の値を反転する。
(b) -1 - Invert the value of the first bit 21 of the floating point register 11 resulting from step (1).

(〔、)指数部レジスタ13を“0″にする。([,) Set the exponent part register 13 to "0".

(d)浮動小数点数レジスタ11の前記第1ビツト21
の値を論理回i!816の入力50に入れる。フリップ
・フロップ15の値を論理回路16の入力51に入れる
。カウンタ14の値を1減すると共に、このときの論理
回路16の出力を供給ビットとして、前記機能(1−1
1)により、指数部レジスタ13を左シフトする。
(d) The first bit 21 of the floating point number register 11
The value of logical times i! 816 input 50. The value of flip-flop 15 is applied to input 51 of logic circuit 16. The value of the counter 14 is decremented by 1, and the output of the logic circuit 16 at this time is used as the supply bit, and the function (1-1
1), the exponent register 13 is shifted to the left.

(c)次のステップ(f)、(g)をカウンタ14の値
を1ず一〕減じながら、0になるまで繰返す。
(c) Next steps (f) and (g) are repeated while decrementing the value of the counter 14 by 1 until it becomes 0.

(f)浮動小数点数レジスタ】1を前記機能(1=1)
により左シフトする。新しく前記第]ビット21に左シ
フ1〜された値を論理回路16の入力50に入れる。フ
リップ・フロップ15の値を論理回路16の入力51に
入れる。
(f) Floating point register] 1 to the above function (1=1)
Shift to the left. The value newly shifted to the left by 1 to the []th bit 21 is input to the input 50 of the logic circuit 16. The value of flip-flop 15 is applied to input 51 of logic circuit 16.

(g)論理回路16の出方を供給ビットとじて、前記機
能(1−1,1)により指数部レジスタ13を左シフト
する。
(g) Using the output of the logic circuit 16 as the supply bit, shift the exponent register 13 to the left using the function (1-1, 1).

(h)カウンタ14の値が0になったときにおける指数
部レジスタ13がら、前記機能(1−14)により値1
を減する。
(h) When the value of the counter 14 becomes 0, the value of the exponent part register 13 is set to 1 by the function (1-14).
Reduce.

(i)符号ビット2oとフリップ・フロップ15の値を
論理回路16に入力し、出力の値tL i IIが出る
場合は、前記機能(1−15)による補数をとる。
(i) Input the sign bit 2o and the value of the flip-flop 15 to the logic circuit 16, and if the output value tL i II is obtained, take the complement according to the function (1-15).

(j)前記機能(1,−3)により、浮動小数点数1ノ
ジスタ11の値を仮数部レジスタ12に転送する。また
、符号ビット2oの値も仮数部レジスタ12の符号ビッ
ト22へ転送され、符号ビット20の値をインバータ2
5により反転させた値が仮数部レジスタ12の小数点位
置23の左のビットに転送される。
(j) Transfer the value of the floating point number 1 register 11 to the mantissa register 12 by the function (1, -3). Additionally, the value of sign bit 2o is also transferred to sign bit 22 of mantissa register 12, and the value of sign bit 20 is transferred to inverter 2.
The value inverted by 5 is transferred to the bit to the left of the decimal point position 23 of the mantissa register 12.

(k)カウンタ14の値が7になるまで、カウンタの値
を1ずつ増し、次の(Q)の処理を行い、カウンタ14
の値を調べるという操作を繰返す。
(k) Increase the value of the counter by 1 until the value of the counter 14 reaches 7, perform the next process (Q), and
Repeat the operation of checking the value of .

(Q)浮動小数点数レジスタ11を前記機能(1−1)
により左シフトする。新しく前記第1ビツト21に左シ
フトされた値を供給ビットとして、指数部レジスタ13
を前記機能(1−11)による左シフトする。
(Q) Floating point number register 11 is set to the above function (1-1)
Shift to the left. The value newly left-shifted to the first bit 21 is used as the supply bit, and the exponent register 13
is shifted to the left by the function (1-11).

(m)前記機能(1,−17)による指数部レジスタ1
3内の値から64を減じた値を指数部レジスタ13にセ
ットする。
(m) Exponent register 1 according to the function (1, -17)
The value obtained by subtracting 64 from the value in 3 is set in the exponent register 13.

(n)指数部レジスタ]3を前記機能(1−11)によ
る2回左シフトすることにより値を4倍する。
(n) Exponent register] The value is multiplied by 4 by shifting 3 to the left twice using the function (1-11).

(0)前記機能(1,−3)による仮数部レジスタ12
へ浮動小数点数レジスタ11の値を転送する。
(0) Mantissa register 12 according to the function (1, -3)
The value of floating point register 11 is transferred to.

(p)前記機能(1,−9)による仮数部レジスタ12
の値を1だけ減する。
(p) Mantissa register 12 according to the function (1, -9)
Decrease the value of by 1.

(q)前記機能(1−10)による補数をとる。(q) Take the complement according to the function (1-10).

(r)符号ビット20の値を仮数部レジスタ12の符号
ビット22と小数点位置23の左のピッ トに転送する
(r) Transfer the value of sign bit 20 to sign bit 22 of mantissa register 12 and the pit to the left of decimal point position 23.

この状態において、データをm・2′の形式で表現した
ときの前記eの値が、(負数は2の補数である整数とし
て)指数部レジスタ13に格納されており、前記mの値
が(負数は2の補数である小数として)、仮数部レジス
タ12に格納されている。
In this state, the value of e when the data is expressed in the m·2' format is stored in the exponent register 13 (negative numbers are integers that are two's complements), and the value of m is ( Negative numbers are stored in the mantissa register 12 (as decimal numbers that are two's complements).

手順(3)、(4)、(5)については、従来の指数部
固定長浮動小数点表現について行われる手順であるので
、省略して手順(6)の説明に移る。
Steps (3), (4), and (5) are the steps performed for the conventional exponent fixed-length floating point representation, so the explanation will be omitted and the explanation will proceed to step (6).

(6)指数部と仮数部の結合 (a)前記機能(1−18)により指数部レジスタ13
内の値(e)が−256< e < 248の範囲外の
ときは、演算結果は可変長表現を用いると判別し、次の
(b)〜(g)の処理を行い、−256< e < 2
48の範囲内のときは演算結果は固定長表現を用いると
判別して、次の(h)〜(k)の処理を行う。
(6) Combining the exponent part and the mantissa part (a) The exponent part register 13 by the function (1-18)
When the value (e) in is outside the range of -256<e<248, it is determined that the calculation result uses variable length representation, and the following processes (b) to (g) are performed to ensure that -256<e < 2
If it is within the range of 48, it is determined that the fixed length representation is used for the calculation result, and the following processes (h) to (k) are performed.

(b)前記機能(1−8)により仮数部レジスタ12か
ら浮動小数点数レジスタ11へその内容を転送する。
(b) Transfer the contents from the mantissa register 12 to the floating point register 11 using the function (1-8).

(c)論理回路16の入力50に指数部レジスタ13の
符号ビット24を、入力51に仮数部レジスタ12の符
号ビット22を入れ、出力をフリップ・フロップ15に
入れる。
(c) The sign bit 24 of the exponent register 13 is input to the input 50 of the logic circuit 16, the sign bit 22 of the mantissa register 12 is input to the input 51, and the output is input to the flip-flop 15.

(d)符号ビット24の値が“1”のとき、前記機能(
]、 −15)により指数部レジスタ13の補数をとる
(d) When the value of the sign bit 24 is “1”, the function (
], −15) to obtain the complement of the exponent register 13.

(e)前記機能(1−13)による指数部レジスタ13
の値を1だけ増す。カウンタ14の値をOにする。
(e) Exponent register 13 according to the function (1-13)
Increase the value of by 1. Set the value of the counter 14 to O.

(f)次の(g)の処理をカウンタ14の値を増しなが
ら、前記機能(1,−14)により、指数部レジスタ1
3の値がOになるまで繰返す。
(f) While incrementing the value of the counter 14, the exponent register 1 is
Repeat until the value of 3 becomes O.

(g)指数部レジスタ13を前記機能(1,−1,2)
により右に1−ビットだけシフトする溢れたビットを論
理回路16の入力50に、フリップ°フロップ15の値
を論理回路16の入力51に入れ、その出力を、浮動小
数点数レジスタ′11を前記機能(1−2)により右に
1ビツトだけシフトする場合に左端から供給するビット
として用いる。
(g) Set the exponent register 13 to the above function (1, -1, 2)
Shift the overflow bit by 1 bit to the right by inputting the overflow bit to the input 50 of the logic circuit 16, inputting the value of the flip-flop 15 to the input 51 of the logic circuit 16, and transmitting the output to the floating point register '11 to the function described above. When shifting one bit to the right by (1-2), it is used as a bit supplied from the left end.

(h)仮数部レジスタ12の符号ピッ1〜22を供給ビ
ットとして、前記機能(1−7)により仮数部レジスタ
12を1回右シフトする。また、前記機能(]−−11
,)による指数部レジスタ13を1回左シフトする。
(h) Using code bits 1 to 22 of the mantissa register 12 as supply bits, the mantissa register 12 is shifted to the right once by the function (1-7). In addition, the above function (]--11
, ), the exponent part register 13 is shifted to the left once.

(i)前記機能(1−8)による仮数部レジスタ12の
値を浮動小数点数レジスタ1]へ転送する。また、符号
ビット22の値もそのまま浮動小数点数レジスタ11の
符号ビット2゜へ転送する。
(i) Transfer the value of the mantissa register 12 by the function (1-8) to the floating point register 1]. Further, the value of the sign bit 22 is also transferred as is to the sign bit 2° of the floating point number register 11.

(j)前記機能(1−1,9)の指数変換回路】7の駆
動により、指数部レジスタ13の値を変換し、指数部変
換回路17の発生する1〜リガ32により浮動小数点数
レジスタ11を右シフトさせる。
(j) Exponent conversion circuit of the function (1-1, 9)] By driving 7, the value of the exponent part register 13 is converted, and the value of the floating point register 11 is converted by 1 to RIGA 32 generated by the exponent part conversion circuit 17. shift to the right.

(k)前記機能(1,−1,2)により指数部レジスタ
13を右シフトさせ、溢れたビットを、浮動小数点数レ
ジスタ11を前記機能(1’−2)によって右にシフト
する場合に左端から供給するビットとして用いる。この
操作を7回行う。
(k) When the exponent register 13 is shifted to the right using the function (1, -1, 2), the overflowing bit is shifted to the left end when the floating point register 11 is shifted to the right using the function (1'-2). Used as bits supplied from Repeat this operation 7 times.

(7)“0″あるいは“1”の列の挿入(a)手順(6
)のステップ(a)で演算結果を可変長表現すると判別
したときのみ、次の(b)〜(d)の処理を行う。
(7) Inserting a column of “0” or “1” (a) Procedure (6
) Only when it is determined in step (a) that the calculation result is expressed in variable length, the following processes (b) to (d) are performed.

(b)浮動小数点数レジスタ11の第1ビツト21の値
を反転する。
(b) Invert the value of the first bit 21 of the floating point number register 11.

(c)前記カウンタ14の値(手順(6)のステップ(
f))だけ次のステップ(d)を実行する。
(c) Value of the counter 14 (step (6)
Perform the next step (d) by f)).

(d)フリップ・フロップ15の値を供給ビットとして
、前記機能(1−8)により指数部レジスタ13の内容
を右に1ビツトだけシフトする。
(d) Using the value of the flip-flop 15 as the supplied bit, the contents of the exponent register 13 are shifted to the right by one bit by the function (1-8).

以上述べた如き作用により、本発明の浮動小数点数演算
装置は、データの範囲により指数部固定長表現と指数部
可変長表現を使い分ける表現形式で表されたデータの演
算を従来の演算装置を利用して実用化することが可能と
なる。
Due to the effects described above, the floating point arithmetic device of the present invention uses a conventional arithmetic device to perform calculations on data expressed in an expression format that uses fixed-length exponent part expression and variable-length exponent part expression depending on the data range. This makes it possible to put it into practical use.

なお、上記実施例の各構成要素は、実質的に同等の機能
を有する他の具体的手段に置換可能であることは言うま
でもない。
It goes without saying that each component of the above embodiment can be replaced with other specific means having substantially equivalent functions.

〔発明の効果〕 以上説明したように、本発明によれば、本演算装置は、
データの範囲によって、指数部固定長浮動小数点表現と
指数部可変長浮動小数点表現を使い分けることができる
ので、従来の指数部固定長浮動小数点表現されている大
量の蓄積データを指数部可変長浮動小数点表現に変換す
ることなく入力データとして使用でき、さらに極端に大
きな数、他端に小さな数についても表現可能な指数部可
変長表現方式を利用して表現できるようになる。
[Effects of the Invention] As explained above, according to the present invention, the present arithmetic device has the following effects:
Depending on the data range, it is possible to use either fixed-length floating-point exponent representation or variable-length exponent floating-point representation, so large amounts of accumulated data that is conventionally expressed as fixed-length floating-point exponent parts can be converted into variable-length floating-point exponent representations. It can be used as input data without converting it into a representation, and can also be represented using the exponent variable length representation method, which can represent extremely large numbers and small numbers at the other end.

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

第1図は本発明の一実施例を示す浮動小数点数演算装置
の要部を示すブロック図、第2図は指数部固定長浮動小
数点表現な示す図、第3図は第1図の論理回路の出力関
係図である。
FIG. 1 is a block diagram showing the main parts of a floating-point arithmetic device according to an embodiment of the present invention, FIG. 2 is a diagram showing the fixed-length floating-point representation of the exponent part, and FIG. 3 is the logic circuit of FIG. 1. FIG.

Claims (1)

【特許請求の範囲】[Claims] 浮動小数点数演算装置において、データの範囲によって
、入力されたデータが指数部固定長表現か指数部可変長
表現かを判別する手段、および該判別手段により判別さ
れた上記入力データを演算し、演算結果が指数部固定長
表現の範囲か指数部可変長表現の範囲かを判別する手段
を設けたことを特徴とする浮動小数点数演算装置。
In a floating point arithmetic device, a means for determining whether input data is a fixed-length exponent part representation or a variable-length exponent part representation according to a data range, and calculating the input data determined by the determining means, 1. A floating-point arithmetic device comprising means for determining whether a result is in a range of fixed exponent length representation or a range of variable exponent length representation.
JP59184623A 1984-09-05 1984-09-05 Floating point arithmetic unit Pending JPS6162932A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP59184623A JPS6162932A (en) 1984-09-05 1984-09-05 Floating point arithmetic unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP59184623A JPS6162932A (en) 1984-09-05 1984-09-05 Floating point arithmetic unit

Publications (1)

Publication Number Publication Date
JPS6162932A true JPS6162932A (en) 1986-03-31

Family

ID=16156470

Family Applications (1)

Application Number Title Priority Date Filing Date
JP59184623A Pending JPS6162932A (en) 1984-09-05 1984-09-05 Floating point arithmetic unit

Country Status (1)

Country Link
JP (1) JPS6162932A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5693932A (en) * 1979-12-25 1981-07-29 Matsushita Electric Ind Co Ltd Furniture with water tank
JPS57211311A (en) * 1981-06-22 1982-12-25 Takara Standard Kk Top plate of kitchen furniture
JPS58535A (en) * 1981-06-19 1983-01-05 松下電器産業株式会社 Top plate with water tank

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5693932A (en) * 1979-12-25 1981-07-29 Matsushita Electric Ind Co Ltd Furniture with water tank
JPS58535A (en) * 1981-06-19 1983-01-05 松下電器産業株式会社 Top plate with water tank
JPS57211311A (en) * 1981-06-22 1982-12-25 Takara Standard Kk Top plate of kitchen furniture

Similar Documents

Publication Publication Date Title
EP0080836A2 (en) Monolithic discrete-time digital convolution circuit
JPS61177538A (en) Position detection for highest-order numeral
EP0529101B1 (en) Floating-point dividing circuit
JPS6162932A (en) Floating point arithmetic unit
JPS61141033A (en) Arithmetic processor
US7024439B2 (en) Leading Zero Anticipatory (LZA) algorithm and logic for high speed arithmetic units
US5155699A (en) Divider using neural network
JPS5911444A (en) Arithmetric device of number represented in floating decimal point
EP0472030A2 (en) Method and apparatus for modifying two&#39;s complement multiplier to perform unsigned magnitude multiplication
JPH09114641A (en) Apparatus and method for decision of most significant digit
JP2018097864A (en) Leading zero anticipation
US5153847A (en) Arithmetic processor using signed digit representation of internal operands
US3746849A (en) Cordic digital calculating apparatus
Gosling Design of large high-speed floating-point-arithmetic units
JP2705162B2 (en) Arithmetic processing unit
JPH0241050B2 (en)
KR20060078258A (en) Division arithmetic unit of variable radix
JPS6027025A (en) Division circuit
Taher et al. High-speed, area-efficient FPGA-based floating-point arithmetic modules
RU2081508C1 (en) Recursive digital filter
JPS60235239A (en) Floating point adding circuit
RU2633142C1 (en) Device for calculating function of √x2+y2
SU697994A1 (en) Device for computing elementary functions
RU2010311C1 (en) Device for parallel division of real numbers
Maloberti et al. The Chinese Abacus method: can we use it for digital arithmetic?