JPH07200259A - Arithmetic processing method and arithmetic processor - Google Patents

Arithmetic processing method and arithmetic processor

Info

Publication number
JPH07200259A
JPH07200259A JP5338679A JP33867993A JPH07200259A JP H07200259 A JPH07200259 A JP H07200259A JP 5338679 A JP5338679 A JP 5338679A JP 33867993 A JP33867993 A JP 33867993A JP H07200259 A JPH07200259 A JP H07200259A
Authority
JP
Japan
Prior art keywords
numerical data
bit information
multiplication
subtraction
addition
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.)
Withdrawn
Application number
JP5338679A
Other languages
Japanese (ja)
Inventor
Takeshi Yano
健 矢野
Atsushi Kiuchi
淳 木内
Yasuhiro Ogata
康洋 緒方
Tetsuya Nakagawa
哲也 中川
Yoshiaki Asakawa
吉章 淺川
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 ULSI Engineering Corp
Hitachi Ltd
Original Assignee
Hitachi ULSI Engineering Corp
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 ULSI Engineering Corp, Hitachi Ltd filed Critical Hitachi ULSI Engineering Corp
Priority to JP5338679A priority Critical patent/JPH07200259A/en
Publication of JPH07200259A publication Critical patent/JPH07200259A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Complex Calculations (AREA)

Abstract

PURPOSE:To obtain a wide dynamic range, to make an arithmetic processing highly precise and to speed up the processing by expressing and operating numerical data by means of the product of a mantissa part consisting of valid numerals of a fixed point representation and an exponental part consisting of the n-th power of '2' so as to execute an operation. CONSTITUTION:The value of the exponental part 12 (n-th power of '2') of numerical data is previously made to correspond to bit information consisting of a binary numeric. Then, numerical data is binary-displayed by bit information and the binary numeric of the mantissa part 11 of numerical data, and the addition/subtraction and multiplication of the binary numeric of the mantissa part 11 are executed by fixed point operation. The shift quantity of the binary numeric of the mantissa part, which is required at the time of addition/ subtraction and multiplication, and bit information corresponding to the exponental part 12 of numerical data, which is the result of addition/subtraction and multiplication, are calculated based on respective pieces of bit information of first and second numerical data being the objects of addition/subtraction and multiplication. Thus, an addition/subtraction processing and a multiplication processing can efficiently be executed with a wide and dynamic range.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、コンピュータによる数
値データの演算処理技術に係わり、特に、音声や画像等
のデータを実時間で処理するディジタル信号処理プロセ
ッサに有用な演算処理方法および演算処理装置に関する
ものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an arithmetic processing technique for numerical data by a computer, and particularly to an arithmetic processing method and an arithmetic processing device useful for a digital signal processor for processing data such as voice and image in real time. It is about.

【0002】[0002]

【従来の技術】コンピュータでの処理対象の数値データ
を表す形式の一つとしては、浮動小数点が広く用いられ
ている。従来の浮動小数点表示形式の数値データは、仮
数部と指数部から構成されており、仮数部で有効数字を
示し、指数部は、底が2のべき乗数の情報を保持してい
る。この浮動小数点表示形式では、正規化処理により、
有効桁数は常に仮数部のビット数になり、ダイナミック
レンジは指数部のビット数に依存する。数値データを表
す他の形式としてさらに固定小数点がある。これは、ビ
ット並びの任意の位置に小数点を設定し、そのまま数値
を表すものである。この固定小数点表示形式では、有効
桁数は、数値により変化するが、最大でデータのビット
数であり、ダイナミックレンジはビット数に依存する。
2. Description of the Related Art Floating point is widely used as one of the formats for representing numerical data to be processed by a computer. Numerical data in the conventional floating-point display format is composed of a mantissa part and an exponent part, and the mantissa part indicates a significant digit, and the exponent part holds information of a power of 2 with a base. In this floating point display format, by normalization processing,
The number of significant digits is always the number of bits of the mantissa part, and the dynamic range depends on the number of bits of the exponent part. Another format for representing numerical data is fixed point. In this, a decimal point is set at an arbitrary position in the bit sequence and the numerical value is represented as it is. In this fixed-point display format, the number of significant digits varies depending on the numerical value, but is the maximum number of bits of data, and the dynamic range depends on the number of bits.

【0003】高速演算を必要とするディジタル信号処理
では、使用するデータは高速性を得るためビット数の少
ないものが望ましいが、ビット数を制限するとダイナミ
ックレンジが小さくなるため、オーバーフローが頻繁に
起こり、その処理のため逆に高速性が失われたり、精度
が確保できないことがある。そのため、データ形式とビ
ット数の割当てを、目的やデータの種類によって選択す
ることが課題となっている。効率良く広いダイナミック
レンジを得るデータ形式の従来例として、ANSI/I
EEE std 754−1985に提示されている形
式がある。これは、浮動小数点表示形式において、指数
部の示す値に予め設定した整数値を加えたものをデータ
の指数とするデータ形式である。また、装置の従来技術
としては、例えば、特開平3−53650号公報に開示
されているものがある。これは、内部演算データの数値
が大きい場合には浮動小数点演算形式、また、小さい場
合には固定小数点演算形式に自動的に切替えることがで
きるというものである。
In digital signal processing that requires high-speed calculation, it is desirable that the data used has a small number of bits in order to obtain high-speed operation. However, if the number of bits is limited, the dynamic range becomes smaller, and overflow frequently occurs. On the contrary, due to the processing, high speed may be lost or accuracy may not be secured. Therefore, it is an issue to select the data format and the allocation of the number of bits according to the purpose and the type of data. As a conventional example of a data format for efficiently obtaining a wide dynamic range, ANSI / I
There is a format presented in EEE std 754-1985. This is a data format in which the exponent of the data is obtained by adding a preset integer value to the value indicated by the exponent in the floating point display format. Further, as a conventional technique of the apparatus, for example, there is one disclosed in Japanese Patent Application Laid-Open No. 3-53650. This means that when the numerical value of the internal calculation data is large, it can be automatically switched to the floating point calculation format, and when it is small, it can be automatically switched to the fixed point calculation format.

【0004】一般に、音声や画像等のデータを実時間で
処理するディジタル信号処理プロセッサでは、高速な処
理と高い演算精度が要求される。また、携帯電話等への
応用については、さらにハードウェアの小規模化が課題
となる。従来の浮動小数点表示形式の数値データの演算
を行なう装置は、ダイナミックレンジを広く取ることが
でき、有効桁数も十分確保されるため、演算精度は高
い。しかし、指数部の演算と桁合わせ等のために回路規
模が大きく、かつ、データパスが長いため処理速度も比
較的遅い。一方、固定小数点表示形式の数値データの演
算を行なう装置は、高速処理が可能で回路規模も小さい
が、ダイナミックレンジを大きく取ることが難しく比較
的演算精度が低い。
Generally, in a digital signal processor for processing data such as voice and image in real time, high speed processing and high calculation accuracy are required. For application to mobile phones and the like, further downsizing of hardware becomes an issue. A conventional device for calculating numerical data in floating-point display format has a wide dynamic range and a sufficient number of significant digits, so that the calculation accuracy is high. However, since the circuit scale is large due to the calculation of the exponent part and digit alignment, and the data path is long, the processing speed is relatively slow. On the other hand, an apparatus for calculating numerical data in fixed-point display format is capable of high-speed processing and has a small circuit scale, but it is difficult to obtain a large dynamic range and the calculation accuracy is relatively low.

【0005】上述の上記従来技術によれば、効率良く広
いダイナミックレンジを得ることができるが、浮動小数
点演算形式と固定小数点演算形式のそれぞれの数値デー
タの演算用に、それぞれ演算処理回路を設ける必要であ
り、ハードウェアが大規模化してしまい、小型化が必要
な携帯電話等に用いるディジタル信号処理プロセッサな
どへの応用には適さない。
According to the above-mentioned conventional technique, a wide dynamic range can be efficiently obtained, but it is necessary to provide an arithmetic processing circuit for arithmetic operation of each numerical data of the floating point arithmetic format and fixed point arithmetic format. Therefore, the hardware becomes large in scale, and it is not suitable for application to a digital signal processor used in a mobile phone or the like that requires miniaturization.

【0006】[0006]

【発明が解決しようとする課題】解決しようとする問題
点は、従来の技術では、効率良く広いダイナミックレン
ジを得ることができるが、ハードウェアの構成規模の点
についての配慮がなされていない点である。本発明の目
的は、これら従来技術の課題を解決し、同じビット数の
固定小数点表示形式の数値データの演算処理回路とほぼ
同じ演算速度およびハードウェアの構成規模で、より広
いダイナミックレンジを得ることができ、加減算や乗算
等の演算処理の高精度化および高速化が可能な演算処理
方法および演算処理装置を提供することである。
The problem to be solved is that the conventional technique can efficiently obtain a wide dynamic range, but the consideration of the scale of hardware is not taken into consideration. is there. An object of the present invention is to solve these problems of the prior art and to obtain a wider dynamic range at an operation speed and a hardware configuration scale that are almost the same as those of an arithmetic processing circuit for numerical data in the fixed-point display format with the same number of bits. It is an object of the present invention to provide an arithmetic processing method and an arithmetic processing device capable of increasing the precision and speed of arithmetic processing such as addition and subtraction and multiplication.

【0007】[0007]

【課題を解決するための手段】上記目的を達成するた
め、本発明の演算処理方法および演算処理装置は、
(1)数値データを、固定小数点表示の有効数字からな
る仮数部と、2のn乗(nは整数値)からなる指数部と
の積により表現し、この数値データの加減算および乗算
を行なうことを特徴とする。また、(2)上記(1)に
記載の演算処理方法において、図1に示すように、数値
データの指数部12(「2のn乗」)の値を2進数値か
らなるビット情報に予め対応付け、このビット情報と数
値データの仮数部11の2進数値とにより、数値データ
を2進法表示し、仮数部の2進数値の加減算および乗算
を固定小数点演算で行なうと共に、この加減算および乗
算時に必要な仮数部の2進数値のシフト量と、加減算お
よび乗算結果の数値データの指数部に対応するビット情
報を、加減算および乗算対象の第1、第2の数値データ
の各ビット情報に基づき算出することを特徴とする。ま
た、(3)上記(2)に記載の演算処理方法において、
数値データの指数部「2のn乗」の指数nを、「予め設
定した整数値m」×「整数値k」とし、この「整数値
k」をビット情報に対応付け、「予め設定した整数値
m」×「整数値k」でシフト量を算出することを特徴と
する。また、(4)上記(3)に記載の演算処理方法に
おいて、同図1に示すように、「整数値k」が「0」も
しくは「1」の場合、ビット情報を「0」もしくは
「1」のいずれかの1ビット値として数値データの指数
部12「2のn乗」に対応付け、加減算および乗算対象
の第1、第2の数値データの各ビット情報の論理和演算
により、加減算および乗算結果の数値データの指数部に
対応するビット情報を算出することを特徴とする。ま
た、(5)上記(2)から(4)のいずれかに記載の演
算処理方法において、仮数部の加減算処理および乗算処
理と、ビット情報の論理演算処理を並列処理で行なうこ
とを特徴とする。また、(6)上記(2)から(5)の
いずれかに記載の演算処理方法において、図4に示すよ
うに、数値データの加減算処理は、ビット情報が一致す
るように、加減算処理対象の第1、第2の数値データの
いずれかの仮数部41a、41bの2進数値をシフトし
た後に、それぞれの仮数部の加減算処理を行ない、この
加減算処理結果の仮数部44と、一致させたビット情報
45とにより、加減算処理結果の数値データを2進法表
示することを特徴とする。また、(7)上記(6)に記
載の演算処理方法において、同図4に示すように、第
1、第2の数値データの各ビット情報が「0」もしくは
「1」からなる1ビット値であれば、第1、第2の数値
データのいずれかの仮数部の2進数値をnビット分だけ
シフトしてビット情報を一致させ、それぞれの仮数部の
加減算処理を行なうことを特徴とする。また、(8)上
記(2)から(7)のいずれかに記載の演算処理方法に
おいて、数値データの乗算処理は、図7に示すように、
乗算処理対象の第1、第2の数値データの各仮数部71
a、71bの2進数値の固定小数点形式での乗算処理を
行ない、この乗算処理結果の2進数値の各ビットのシフ
ト量を、第1、第2の数値データの各ビット情報72
a、72bの第1の論理演算に基づき算出し、この算出
したシフト量だけ各ビットをシフトした乗算処理結果の
2進数値(仮数部75)と、ビット情報72a、72b
の第2の論理演算結果(ビット情報76)とにより、乗
算処理結果の数値データを2進法表示することを特徴と
する。また、(9)上記(8)に記載の演算処理方法に
おいて、図6に示すように、第1、第2の数値データの
各ビット情報が「0」もしくは「1」からなる1ビット
値であれば、各ビット情報の第1の論理演算を論理積演
算で、各ビット情報の第2の論理演算を論理和演算で行
なうことを特徴とする。また、(10)上記(2)から
(4)のいずれかに記載の数値データの加減算処理を行
なう演算処理装置において、図2に示すように、nビッ
トをシフト量として、加減算処理対象の第1、第2の数
値データの各仮数部21a、21bの2進数値をシフト
する第1、第2のシフター23と、この第1、第2のシ
フター23から出力された第1、第2の数値データの各
仮数部を固定小数点演算で加減算する加減算器25と、
第1、第2の数値データの各ビット情報が一致するよう
に第1、第2のシフターのシフト動作を制御すると共
に、第1、第2の数値データの各ビット情報の論理演算
に基づき、加減算器25の加減算結果の数値データのビ
ット情報27を算出する加減算論理演算回路24とを設
け、加減算器25による加減算結果の2進数値を仮数部
26とし、加減算論理演算回路24による論理演算結果
のビット情報を指数部27として、加減算結果の数値デ
ータを2進法表示することを特徴とする。また、(1
1)上記(2)から(4)のいずれかに記載の数値デー
タの乗算処理を行なう演算処理装置において、図5に示
すように、乗算処理対象の第1、第2の数値データの各
仮数部51a、51bを固定小数点演算で乗算する乗算
器55と、この乗算器55による乗算結果の2進数値
を、nビットをシフト量としてシフトする乗算用シフタ
ー53と、第1、第2の数値データの各ビット情報52
a、52bの第1の論理演算に基づき、乗算用シフター
のシフト動作を制御すると共に、ビット情報52a、5
2bの第2の論理演算に基づき、乗算器55の乗算結果
の数値データのビット情報を算出する乗算論理演算回路
54とを設け、乗算器55による乗算結果の2進数値を
仮数部56とし、乗算論理演算回路54による第2の論
理演算で算出したビット情報を指数部57として、乗算
結果の数値データを2進法表示することを特徴とする。
また、(12)上記(10)に記載の演算処理装置にお
いて、加減算対象の第1、第2の数値データに対応付け
た各ビット情報が「0」もしくは「1」からなる1ビッ
ト値であれば、加減算論理演算回路24は、加減算対象
の第1、第2の数値データの各ビット情報22a、22
bの論理和演算結果(e0)を、加減算器25の加減算
結果の数値データのビット情報27として算出すること
を特徴とする。また、(13)上記(11)に記載の演
算処理装置において、乗算対象の第1、第2の数値デー
タに対応付けた各ビット情報が「0」もしくは「1」か
らなる1ビット値であれば、乗算論理演算回路54は、
第2の論理演算を、乗算対象の第1、第2の数値データ
の各ビット情報の論理和演算で行ない、この論理和演算
の結果(e0)を、乗算器55の乗算結果の数値データ
のビット情報57として算出することを特徴とする。
In order to achieve the above object, an arithmetic processing method and an arithmetic processing device according to the present invention include:
(1) Numerical data is expressed by the product of a mantissa part consisting of fixed-point significant figures and an exponent part consisting of 2 n (n is an integer value), and addition / subtraction and multiplication of this numerical data are performed. Is characterized by. (2) In the arithmetic processing method described in (1) above, as shown in FIG. 1, the value of the exponent part 12 (“2 to the nth power”) of the numerical data is converted into bit information consisting of binary values in advance. Correspondingly, by using this bit information and the binary value of the mantissa part 11 of the numerical value data, the numerical value data is displayed in a binary system, and the addition and subtraction and multiplication of the binary value of the mantissa part are performed by fixed point arithmetic operation, The shift amount of the binary value of the mantissa necessary for multiplication and the bit information corresponding to the exponent part of the numerical data of the addition / subtraction and multiplication results are added to the bit information of the first and second numerical data to be added / subtracted and multiplied. It is characterized in that it is calculated based on. Further, (3) in the arithmetic processing method according to (2) above,
The exponent n of the exponent part “2 to the nth power” of the numerical data is set to “preset integer value m” × “integer value k”, and this “integer value k” is associated with bit information, and “preset integer It is characterized in that the shift amount is calculated by "numerical value m" × "integer value k". (4) In the arithmetic processing method described in (3) above, as shown in FIG. 1, when the "integer value k" is "0" or "1", the bit information is "0" or "1". Is associated with the exponent part 12 “2 to the n-th power” of the numerical data as any one bit value of “,” and the addition and subtraction are performed by the logical sum operation of the bit information of the first and second numerical data to be added and subtracted and multiplied. It is characterized in that bit information corresponding to the exponent part of the numerical data of the multiplication result is calculated. (5) In the operation processing method according to any one of (2) to (4), the addition / subtraction process and multiplication process of the mantissa part and the logical operation process of bit information are performed in parallel. . Further, (6) in the arithmetic processing method according to any one of (2) to (5), as shown in FIG. 4, the addition / subtraction processing of the numerical data is performed on the addition / subtraction processing target so that the bit information matches. After shifting the binary value of the mantissa part 41a or 41b of either the first or second numerical value data, the mantissa part of each mantissa part is added / subtracted, and the mantissa part 44 of the result of the addition / subtraction process is matched with the matched bit. The information 45 is used to display the numerical data of the addition / subtraction processing result in a binary system. (7) In the arithmetic processing method according to (6), as shown in FIG. 4, each bit information of the first and second numerical data is a 1-bit value consisting of "0" or "1". In this case, the binary value of the mantissa part of the first or second numerical value data is shifted by n bits to match the bit information, and the addition / subtraction process of each mantissa part is performed. . Further, (8) in the arithmetic processing method according to any one of (2) to (7), the multiplication process of the numerical data is performed as shown in FIG.
Mantissa parts 71 of the first and second numerical data to be multiplied
a and 71b are subjected to a multiplication process of the binary value in the fixed point format, and the shift amount of each bit of the binary value of the multiplication process result is calculated as the bit information 72 of the first and second numerical data.
a and 72b, the binary value (mantissa part 75) of the multiplication result obtained by shifting each bit by the calculated shift amount, and the bit information 72a, 72b.
The second numerical operation result (bit information 76) and the numerical value data of the multiplication processing result are displayed in a binary system. (9) In the arithmetic processing method according to (8), as shown in FIG. 6, each bit information of the first and second numerical data is a 1-bit value consisting of "0" or "1". If so, it is characterized in that the first logical operation of each bit information is an AND operation and the second logical operation of each bit information is an OR operation. (10) In the arithmetic processing unit for performing addition / subtraction processing of numerical data according to any one of (2) to (4) above, as shown in FIG. The first and second shifters 23 that shift the binary values of the mantissa parts 21a and 21b of the first and second numerical data, and the first and second shifters 23 output from the first and second shifters 23, respectively. An adder / subtractor 25 for adding / subtracting each mantissa part of numerical data by fixed-point arithmetic;
The shift operation of the first and second shifters is controlled so that each bit information of the first and second numerical data matches, and based on the logical operation of each bit information of the first and second numerical data, An addition / subtraction logic operation circuit 24 for calculating bit information 27 of the numerical data of the addition / subtraction result of the addition / subtraction device 25 is provided, and the binary value of the addition / subtraction result by the addition / subtraction device 25 is used as the mantissa part 26, and the logical operation result by the addition / subtraction logic operation circuit 24 is provided. Is used as the exponent 27 to display the numerical data of the addition / subtraction result in binary notation. In addition, (1
1) In the arithmetic processing unit for carrying out the multiplication processing of the numerical data described in any one of the above (2) to (4), as shown in FIG. 5, each mantissa of the first and second numerical data to be multiplied. A multiplier 55 that multiplies the units 51a and 51b by fixed-point arithmetic, a multiplication shifter 53 that shifts the binary value of the multiplication result of this multiplier 55 with n bits as the shift amount, and first and second numerical values. Each bit information 52 of data
Based on the first logical operation of a and 52b, the shift operation of the multiplication shifter is controlled, and bit information 52a, 5
And a multiplication logical operation circuit 54 for calculating bit information of the numerical data of the multiplication result of the multiplier 55 based on the second logical operation of 2b, and the binary value of the multiplication result of the multiplier 55 is the mantissa part 56, The bit information calculated by the second logical operation by the multiplication logical operation circuit 54 is used as an exponent part 57 to display the numerical data of the multiplication result in binary notation.
(12) In the arithmetic processing device according to (10), each bit information associated with the first and second numerical data to be added / subtracted may be a 1-bit value consisting of "0" or "1". For example, the addition / subtraction logical operation circuit 24 is configured to set the bit information 22a, 22 of the first and second numerical data to be added / subtracted
The logical sum operation result (e0) of b is calculated as bit information 27 of the numerical data of the addition / subtraction result of the adder / subtractor 25. (13) In the arithmetic processing unit according to (11), each bit information associated with the first and second numerical data to be multiplied may be a 1-bit value consisting of "0" or "1". For example, the multiplication logical operation circuit 54
The second logical operation is performed by the logical sum operation of the bit information of the first and second numerical data to be multiplied, and the result (e0) of this logical sum operation is calculated as the numerical data of the multiplication result of the multiplier 55. It is characterized in that it is calculated as bit information 57.

【0008】[0008]

【作用】本発明においては、数値データを、ビットで構
成されるビット情報からなる指数部と、任意のビット数
で構成される仮数部の二つのデータにより表す。この仮
数部は固定小数点形式で表示する。そして、例えば、ビ
ット情報が1ビット情報で「0」の場合には、仮数部の
示す値がそのままデータ全体の数値となり、ビット情報
が「1」の場合は、予め設定した整数値を2のべき乗数
とした数値と、仮数部の示す値の積がデータ全体の数値
となる。このような表示形式の数値データを用いた加減
算装置は、演算対象の各数値データの仮数部を固定小数
点形式で加減算処理するが、各数値データの指数部(ビ
ット情報)が一致するように、加減算処理の前にシフト
する。この時のシフト量は、ビット情報の指数を構成す
る予め設定した整数値であり、演算処理が容易となる。
また、ビット情報の2入力の論理演算により、加減算結
果の出力データのビット情報(指数部)を得ることがで
きる。例えば、加減算対象の第1、第2の数値データの
各指数部の指数がn1、n2であれば、仮数部のシフト量
は、|n1−n2|となり、さらに、n1が「0」またn2
が任意の整数値nで、第1、第2の数値データのビット
情報を「0」と「1」の1ビットで対応付けられる場合
には、nビットのシフト量となる。また、乗算装置は、
演算対象の各数値データの仮数部を固定小数点形式で乗
算処理した後に、この演算結果のデータを、指数を構成
する予め設定した整数値を固定のシフト量としてシフト
する。このようにして、広いダイナミックレンジで効率
良く加減算処理および乗算処理を行なうことができる。
In the present invention, numerical data is represented by two data: an exponent part consisting of bit information composed of bits and a mantissa part consisting of an arbitrary number of bits. This mantissa is displayed in fixed point format. Then, for example, when the bit information is 1-bit information and is “0”, the value indicated by the mantissa part becomes the numerical value of the entire data as it is, and when the bit information is “1”, the preset integer value is set to 2. The product of the power value and the value indicated by the mantissa is the total value of the data. An addition / subtraction device using numerical data in such a display format performs addition / subtraction processing on the mantissa part of each numerical data to be calculated in a fixed-point format, so that the exponent parts (bit information) of each numerical data match, Shift before addition / subtraction processing. The shift amount at this time is a preset integer value that constitutes the exponent of the bit information, and the arithmetic processing becomes easy.
Further, the bit information (exponent part) of the output data of the addition / subtraction result can be obtained by the logical operation of the two inputs of the bit information. For example, if the exponents of the exponents of the first and second numerical data to be added / subtracted are n 1 and n 2 , the shift amount of the mantissa is | n 1 −n 2 |, and n 1 is "0" and n 2
Is an arbitrary integer value n and the bit information of the first and second numerical data is associated with 1 bit of “0” and “1”, the shift amount is n bits. In addition, the multiplication device
After the mantissa part of each numerical data to be calculated is multiplied by the fixed point format, the data of this calculation result is shifted using a preset integer value forming the exponent as a fixed shift amount. In this way, the addition / subtraction process and the multiplication process can be efficiently performed in a wide dynamic range.

【0009】[0009]

【実施例】以下、本発明の実施例を、図面により詳細に
説明する。図1は、本発明の演算処理で用いる数値デー
タの表示形式の一実施例を示す説明図である。本図にお
いて、11はビット並びで示された本発明に係わる仮数
部、12は本発明に係わる指数部を表すビット情報、1
3は仮数部11における小数点の位置を示したものであ
る。仮数部11は固定小数点で表示するのでユーザの任
意の位置に小数点13を設定することができる。この実
施例では、予め整数値5を設定し、ビット情報12の
「1」に、データ全体として2の5乗の重みを持たせる
とする。これはビット情報12の「1」が、仮数部にお
ける5ビットシフトに相当することを意味する。
Embodiments of the present invention will now be described in detail with reference to the drawings. FIG. 1 is an explanatory diagram showing an example of a display format of numerical data used in the arithmetic processing of the present invention. In the figure, 11 is a mantissa part according to the present invention represented by a bit sequence, 12 is bit information representing an exponent part according to the present invention, 1
3 indicates the position of the decimal point in the mantissa part 11. Since the mantissa part 11 is displayed with a fixed decimal point, the decimal point 13 can be set at any position of the user. In this embodiment, the integer value 5 is set in advance, and "1" of the bit information 12 is given a weight of 2 to the 5th power as the entire data. This means that "1" of the bit information 12 corresponds to a 5-bit shift in the mantissa part.

【0010】図1(a)に示す数値データは、10進数
で仮数部が5.625、指数部が2の0乗を表すので、この
データ対の表す値は5.625(5.625×20=5.625)とな
る。また、図1(b)に示す数値データは、10進数で
仮数部が5.625、指数部が2の5乗を表すので、このデ
ータ対の表す値は180(5.625×25=180)となる。
この例では、2の補数表現で、符号ビットを除き、2の
7乗〜2の−3乗の桁を表すことができる。これは仮数
部11とビット情報12(指数部)合わせて8ビットの
データで、固定小数点では12ビットに相当するダイナ
ミックレンジを実現していることを示している。
Since the numerical data shown in FIG. 1 (a) is a decimal number, the mantissa part is 5.625 and the exponent part is 2 0, the value represented by this data pair is 5.625 (5.625 × 2 0 = 5.625). Become. The numerical data shown in FIG. 1 (b) is a decimal number, the mantissa part is 5.625, and the exponent part is 2 to the fifth power, so the value represented by this data pair is 180 (5.625 × 2 5 = 180). .
In this example, the 2's complement representation can represent the digits of 2 7 to 2 -3, excluding the sign bit. This indicates that the mantissa part 11 and the bit information 12 (exponent part) are combined into 8-bit data, and that a fixed range has a dynamic range equivalent to 12 bits.

【0011】図2は、本発明の演算処理装置の本発明に
係わる構成の第1の実施例を示すブロック図である。本
例は、図1における表示形式の数値データの加算処理を
行なう装置構成を示すものであり、本図において、21
aと21bは入力データの仮数部、22aと22bは入
力データのビット情報、23はシフト量固定のシフタ
ー、24はシフターの制御と出力データのビット情報を
算出する加減算論理演算回路、25は固定小数点演算を
行なう加減算器(図中、ALUと記載)、26は出力デ
ータの仮数部、27は出力データのビット情報、28は
AND回路、29はOR回路である。シフター23は、
ビット情報に重みを持たせる係数として予め設定する整
数値をシフト量とし、右へビットシフトするものであ
り、これを作動させるか否かは加減算論理演算回路24
から出力される信号sh1、sh2(シフター制御用のフラ
グ)により判定する。
FIG. 2 is a block diagram showing a first embodiment of the configuration of the arithmetic processing unit of the present invention according to the present invention. This example shows a device configuration for performing addition processing of numerical data in the display format shown in FIG.
a and 21b are mantissas of the input data, 22a and 22b are bit information of the input data, 23 is a shifter with a fixed shift amount, 24 is an adder / subtractive logical operation circuit for controlling the shifter and calculating bit information of the output data, and 25 is fixed. An adder / subtractor (denoted as ALU in the figure) for performing a decimal point operation, 26 is a mantissa part of output data, 27 is bit information of output data, 28 is an AND circuit, and 29 is an OR circuit. The shifter 23 is
An integer value set in advance as a coefficient for giving weight to bit information is used as a shift amount, and bit shift is performed to the right. Whether to operate this is an addition / subtraction logic operation circuit 24.
Determined by the signals sh 1 and sh 2 (shifter control flags) output from the.

【0012】図3は、図2における加減算論理演算回路
の動作を示す説明図である。本例は、図2の加減算論理
演算回路24での論理を表した真理値表であり、本図3
において、e1、e2は入力データのビット情報、e0
出力データのビット情報を示す。また、sh1、sh2はシフ
ター制御用のフラグであり、非作動を0、作動を1で表
している。ここで、記号のサフィックスは、第1の入力
データと第2の入力データの別を示すことにする。以
下、図2を用いて、本発明に係わる加減算の処理動作を
説明する。
FIG. 3 is an explanatory diagram showing the operation of the addition / subtraction logic operation circuit in FIG. This example is a truth table showing the logic in the addition / subtraction logic operation circuit 24 of FIG.
, E 1 and e 2 represent bit information of input data, and e 0 represents bit information of output data. Further, sh 1 and sh 2 are shifter control flags, and non-operation is represented by 0 and operation is represented by 1. Here, the suffix of the symbol indicates whether the input data is the first input data or the second input data. Hereinafter, the processing operation of addition / subtraction according to the present invention will be described with reference to FIG.

【0013】まず最初にビット情報の処理を行う。入力
データのビット情報22a、22b(e1、e2)を入力
とする加減算論理演算回路24による論理演算より、シ
フター23を制御するフラグ(sh1、sh2)と、出力デー
タ用のビット情報(e0)を求める。入力のビット情報
が同一の場合は桁合わせの必要はなく、シフター23は
作動させない。このときの出力のビット情報は、入力の
ものと同じになる。入力のビット情報22a、22b
(e1、e2)が異なる場合は、仮数部21a、21bの
示す桁の小さい方のデータ、つまりビット情報が「0」
のデータ側のシフター23を作動させ、他方のデータの
桁に合わせる。このときの出力のビット情報は、図3に
おける真理値表が示すように「1」となる。入力データ
の仮数部21a、21bは、ビットシフトにより桁合わ
せを行った後、加減算器25に入力され、出力データの
仮数部26が算出される。この演算装置でのシフターの
制御は2ゲートの論理回路となるため、これによる遅延
時間の増加はわずかである。
First, bit information is processed. Flags (sh 1 , sh 2 ) for controlling the shifter 23, and bit information for output data, based on the logical operation by the addition / subtraction logical operation circuit 24 that inputs the bit information 22a, 22b (e 1 , e 2 ) of the input data. Find (e 0 ). If the input bit information is the same, it is not necessary to perform digit alignment, and the shifter 23 does not operate. The bit information of the output at this time becomes the same as that of the input. Input bit information 22a, 22b
If (e 1 , e 2 ) are different, the data with the smaller digit number represented by the mantissa parts 21 a and 21 b, that is, the bit information is “0”.
The shifter 23 on the data side of is operated to match the digit of the other data. The bit information of the output at this time becomes "1" as shown in the truth table in FIG. The mantissa parts 21a and 21b of the input data are digit-aligned by bit shift and then input to the adder / subtractor 25, and the mantissa part 26 of the output data is calculated. Since the shifter control in this arithmetic unit is a 2-gate logic circuit, the increase in delay time due to this is slight.

【0014】図4は、図2における演算処理装置による
演算処理例を示す説明図である。本例は、加算処理の具
体例をビット並びで表したものであり、本図4におい
て、41a、41bは入力データの仮数部、42a、4
2bは入力データのビット情報(説明上、2つの入力デ
ータのうち、左側を第1のデータ、右側を第2のデータ
とする)、43は第1の入力データの仮数部41aをビ
ットシフトしたもの、44は出力データの仮数部、45
は出力データのビット情報、46は小数点の位置を示
す。この実施例では、予め整数値3を設定し、ビット情
報の1にデータ全体として2の3乗の重みを持たせるも
のとする。これはビット情報の1が仮数部の3ビットシ
フトに相当することを意味するため、シフターはシフト
量3(右へ3ビットシフト)の固定値を持つように設定
する。
FIG. 4 is an explanatory diagram showing an example of arithmetic processing by the arithmetic processing device in FIG. In this example, a specific example of the addition process is represented by a bit arrangement. In FIG. 4, 41a and 41b are mantissa parts of input data, 42a and 4b.
2b is bit information of the input data (for explanation, the left side of the two input data is the first data and the right side is the second data), and 43 is the bit-shifted mantissa part 41a of the first input data. , 44 is the mantissa part of the output data, 45
Indicates the bit information of the output data, and 46 indicates the position of the decimal point. In this embodiment, the integer value 3 is set in advance, and 1 of the bit information is given a weight of 2 3 as a whole of the data. This means that 1 of the bit information corresponds to a 3-bit shift of the mantissa part, and therefore the shifter is set to have a fixed value of the shift amount 3 (shift by 3 bits to the right).

【0015】図2に示す演算処理装置により加算処理を
進める場合を説明する。本図4に示す例では、10進数
で2.5+4=6.5の計算を示し、第1の入力デー
タ、第2の入力データのそれぞれビット情報(図2にお
けるe1、e2)はそれぞれ0、1であることから、図3
の真理値表におけるシフター制御用のフラグsh1、s
2はそれぞれ1、0となり、第1のシフターのみ作動
させ、第1の入力データの仮数部41aを右に3ビット
シフトする。その後、加減算器25により、第2の入力
データの仮数部41bと足し合わせることによって、出
力データの仮数部44を得る。また、出力データのビッ
ト情報45は、図3の真理値表から1となる。
A case where the addition processing is advanced by the arithmetic processing unit shown in FIG. 2 will be described. In the example shown in FIG. 4, 2.5 + 4 = 6.5 in decimal is calculated, and the bit information (e 1 , e 2 in FIG. 2 ) of the first input data and the second input data respectively Since 0 and 1,
Flags sh 1 , s for shifter control in the truth table of
h 2 becomes 1 and 0 respectively, and only the first shifter is operated, and the mantissa part 41a of the first input data is shifted to the right by 3 bits. Then, the adder / subtractor 25 adds the mantissa part 41b of the second input data to obtain the mantissa part 44 of the output data. Further, the bit information 45 of the output data becomes 1 from the truth table of FIG.

【0016】図5は、本発明の演算処理装置の本発明に
係わる構成の第2の実施例を示すブロック図である。本
例は、図1における表示形式の数値データの乗算処理を
行なう装置構成を示すものであり、本図において、51
a、51bは入力データの仮数部、52a、52bは入
力データのビット情報、53はシフト量固定のシフタ
ー、54はシフターの制御と出力データのビット情報を
算出する乗算論理演算回路、55は固定小数点演算によ
る乗算器(図中、MULTと記載)、56は出力データ
の仮数部、57は出力データのビット情報である。シフ
ター53は、ビット情報に重みを持たせる係数として予
め設定する整数値をシフト量とし、左へビットシフトす
るものであり、これを作動させるか否かは乗算論理演算
回路54から出力される信号のフラグにより判定する。
FIG. 5 is a block diagram showing a second embodiment of the configuration according to the present invention of the arithmetic processing unit of the present invention. This example shows a device configuration for performing multiplication processing of numerical data in the display format shown in FIG.
a and 51b are mantissa parts of input data, 52a and 52b are bit information of input data, 53 is a shifter with a fixed shift amount, 54 is a multiplication logic operation circuit for controlling shifter and bit information of output data, and 55 is fixed. A multiplier by decimal point calculation (described as MULT in the figure), 56 is a mantissa part of output data, and 57 is bit information of the output data. The shifter 53 shifts bits to the left by using an integer value preset as a coefficient for giving weight to bit information, and shifts the bits to the left. Whether to operate the shifter 53 is a signal output from the multiplication logical operation circuit 54. It judges by the flag of.

【0016】図6は、図5における乗算論理演算回路の
動作を示す説明図である。本例は、図5の乗算算論理演
算回路54での論理を表した真理値表であり、本図3に
おいて、e1、e2は入力データのビット情報、e0は出
力データのビット情報を示す。また、shはシフター制御
用のフラグとし、非作動を0、作動を1とする。ここ
で、記号のサフィックスは第1の入力データと第2の入
力データの別を示すことにする。以下、図5を用いて本
発明に係わる乗算の処理動作を説明する。
FIG. 6 is an explanatory diagram showing the operation of the multiplication logical operation circuit in FIG. This example is a truth table representing the logic in the multiplication and logic operation circuit 54 of FIG. 5. In FIG. 3, e 1 and e 2 are bit information of input data, and e 0 is bit information of output data. Indicates. Further, sh is a flag for shifter control, and 0 is non-operation and 1 is operation. Here, the suffix of the symbol indicates the distinction between the first input data and the second input data. The processing operation of multiplication according to the present invention will be described below with reference to FIG.

【0017】乗算器55による仮数部51a、51bの
乗算処理と、乗算論理演算回路54によるビット情報5
2a、52bの処理は並行して行う。仮数部の乗算は固
定小数点形式によるものとする。ビット情報の処理とし
て2入力(e1、e2)から、乗算論理演算回路54によ
る論理演算より、シフターを制御するフラグ(sh)と、
出力のビット情報(e0)を求める。乗算装置における
ビット情報の処理は基本的には加算である。ただし、2
入力が共に1の場合は出力を1とし、調整としてシフタ
ー53を作動させ、出力データの仮数部をビットシフト
する。シフター53の制御は仮数部の乗算と並列処理で
きるため、演算器全体の処理からするとほとんど遅延が
ない。
The multiplication processing of the mantissa parts 51a and 51b by the multiplier 55 and the bit information 5 by the multiplication logical operation circuit 54
The processes 2a and 52b are performed in parallel. Mantissa multiplication shall be in fixed-point format. As bit information processing, a flag (sh) for controlling a shifter from two inputs (e 1 , e 2 ) and a logical operation by the multiplication logical operation circuit 54,
Output bit information (e 0 ) is obtained. The processing of bit information in the multiplication device is basically addition. However, 2
When both inputs are 1, the output is set to 1, the shifter 53 is operated for adjustment, and the mantissa part of the output data is bit-shifted. Since the control of the shifter 53 can be performed in parallel with the multiplication of the mantissa part, there is almost no delay from the processing of the entire arithmetic unit.

【0018】図7は、図5における演算処理装置による
演算処理例を示す説明図である。本例は、乗算処理の具
体例をビット並びで表したものであり、本図7におい
て、71a、71bは入力データの仮数部、72a、7
2bは入力データのビット情報(説明上2つの入力デー
タのうち、左側を第1のデータ、右側を第2のデータと
する)、73は入力データの仮数部を乗算器55で乗算
した結果、74は乗算の結果をビットシフトしたもの、
75は出力データの仮数部、76は出力データのビット
情報、77は小数点の位置を示す。データの仮数部71
a、71bは8ビットで構成されるため、乗算結果7
3、74は16ビットとなるが、ハードウェアの構成
上、下位の8ビットを切り捨て結果を8ビットにすると
仮定する。この例では、予め整数値3を設定し、ビット
情報の1にデータ全体として2の3乗の重みを持たせる
ものとする。これはビット情報の1が仮数部の3ビット
シフトに相当することを意味するため、シフターはシフ
ト量3(左へ3ビットシフト)の固定値を持つように設
定する。
FIG. 7 is an explanatory diagram showing an example of arithmetic processing by the arithmetic processing device in FIG. In this example, a specific example of the multiplication process is represented by a bit arrangement. In FIG. 7, 71a and 71b are mantissa parts of the input data, and 72a and 7b.
2b is bit information of the input data (of the two input data, the left side is the first data and the right side is the second data for explanation), 73 is the result of multiplication of the mantissa part of the input data by the multiplier 55, 74 is a bit-shifted result of the multiplication,
Reference numeral 75 is a mantissa part of the output data, 76 is bit information of the output data, and 77 is a decimal point position. Mantissa part 71 of data
Since a and 71b are composed of 8 bits, the multiplication result 7
Although 3 and 74 have 16 bits, it is assumed that the lower 8 bits are truncated due to the hardware configuration and the result is 8 bits. In this example, the integer value 3 is set in advance, and 1 of the bit information is given a weight of 2 to the power of 3 as a whole of the data. This means that 1 of the bit information corresponds to a 3-bit shift of the mantissa part, and therefore the shifter is set to have a fixed value of the shift amount 3 (shift by 3 bits to the left).

【0019】図5に示す演算処理装置により乗算処理を
進める場合の説明を行なう。本図7の例では、10進数
で2.5×4=10の計算を示し、まず、入力データの
仮数部71a、71bを乗算する。第1の入力データ、
第2の入力データのビット情報72a、72b(図5に
おけるe1、e2)は、それぞれ0、1であることから、
図6の真理値表においてシフターを制御するフラグ(s
h)は1となり、シフターを作動させ、乗算結果の仮数
部73を左に3ビットシフトする(仮数部74)。その
後、この仮数部74の下位の8ビットを切り捨て、出力
データの仮数部75を得る。出力のビット情報76は、
図6の真理値表から1となる。
Description will be given of the case where the multiplication processing is carried out by the arithmetic processing unit shown in FIG. In the example of FIG. 7, the calculation of 2.5 × 4 = 10 in decimal is shown. First, the mantissa parts 71a and 71b of the input data are multiplied. The first input data,
Since the bit information 72a and 72b (e 1 and e 2 in FIG. 5) of the second input data are 0 and 1, respectively,
Flags (s) for controlling the shifter in the truth table of FIG.
h) becomes 1, and the shifter is activated to shift the mantissa part 73 of the multiplication result to the left by 3 bits (mantissa part 74). Then, the lower 8 bits of the mantissa part 74 are cut off to obtain the mantissa part 75 of the output data. The output bit information 76 is
It becomes 1 from the truth table of FIG.

【0020】以上、図1〜図7を用いて説明したよう
に、本実施例の演算処理方法および演算処理装置では、
数値データを、ビットで構成されるビット情報からなる
指数部と、任意のビット数で構成される仮数部の二つの
データにより表し、この仮数部は固定小数点形式で表示
する。そして、ビット情報が1ビット情報で「0」の場
合には、仮数部の示す値がそのままデータ全体の数値と
なり、ビット情報が「1」の場合は、予め設定した整数
値を2のべき乗数とした数値と、仮数部の示す値の積が
データ全体の数値となる。
As described above with reference to FIGS. 1 to 7, in the arithmetic processing method and the arithmetic processing device of this embodiment,
Numerical data is represented by two data, an exponent part composed of bit information composed of bits, and a mantissa part composed of an arbitrary number of bits, and the mantissa part is displayed in a fixed-point format. When the bit information is 1-bit information and is “0”, the value indicated by the mantissa is the numerical value of the entire data as it is, and when the bit information is “1”, a preset integer value is a power of 2 The product of the numerical value and the value indicated by the mantissa is the numerical value of the entire data.

【0021】このような表示形式の数値データを用いた
加減算装置は、演算対象の各数値データの仮数部を固定
小数点形式で加減算処理し、かつ、各数値データの指数
部(ビット情報)が一致するように、加減算処理の前に
シフトする。この時のシフト量は、ビット情報の指数を
構成する予め設定した整数値であり、演算処理が容易と
なる。また、ビット情報の2入力の論理演算により、加
減算結果の出力データのビット情報(指数部)を容易に
得ることができる。また、乗算装置は、演算対象の各数
値データの仮数部を固定小数点形式で乗算処理した後
に、この演算結果のデータを、指数を構成する予め設定
した整数値を固定のシフト量としてシフトする。このよ
うにして、広いダイナミックレンジで効率良く加減算処
理および乗算処理を行なうことができる。
The addition / subtraction device using numerical data in such a display format performs addition / subtraction processing on the mantissa part of each numerical data to be operated in a fixed-point format, and the exponent part (bit information) of each numerical data matches. Shift as before. The shift amount at this time is a preset integer value that constitutes the exponent of the bit information, and the arithmetic processing becomes easy. In addition, the bit information (exponent part) of the output data of the addition / subtraction result can be easily obtained by the 2-input logical operation of the bit information. In addition, the multiplication device multiplies the mantissa part of each numerical data to be calculated in a fixed-point format, and then shifts the data of this calculation result using a preset integer value forming the exponent as a fixed shift amount. In this way, the addition / subtraction process and the multiplication process can be efficiently performed in a wide dynamic range.

【0022】このように、効率良く広いダイナミックレ
ンジを得るために、浮動小数点演算形式と固定小数点演
算形式のそれぞれの数値データの演算用に、それぞれの
演算処理回路を設ける必要がなくなり、ハードウェアの
大規模化を回避でき、小型化が必要な携帯電話等に用い
るディジタル信号処理プロセッサなどへの応用に好適と
なる。すなわち、同じビット数を持つ固定小数点形式の
演算と比較し、ほぼ同じ処理速度とハードウエアの構成
規模で、より広いダイナミックレンジを得ることができ
るので、より高精度な演算を実現できる。逆の見地から
すると、同じダイナミックレンジを持つ従来のデータ形
式を用いたときと比較し、精度を確保したまま、より高
速な処理が可能となり、同時により小規模なハードウエ
アの構成を実現できる。
As described above, in order to efficiently obtain a wide dynamic range, it is not necessary to provide respective arithmetic processing circuits for arithmetic operations of the respective numerical data of the floating point arithmetic format and the fixed point arithmetic format, and the hardware of It is suitable for application to a digital signal processor used in a mobile phone or the like that needs to be miniaturized and can be prevented from increasing in size. That is, as compared with fixed-point arithmetic having the same number of bits, a wider dynamic range can be obtained with substantially the same processing speed and hardware configuration scale, and thus higher-precision arithmetic can be realized. From the opposite point of view, as compared with the case of using the conventional data format having the same dynamic range, it is possible to perform higher-speed processing while ensuring accuracy, and at the same time realize a smaller-scale hardware configuration.

【0023】尚、本発明は、図1〜図7を用いて説明し
た実施例に限定されるものではなく、その要旨を逸脱し
ない範囲において種々変更可能である。すなわち、実施
例は、ビット情報を1ビットとしたものであるが、複数
のビットを持つ場合でも適用可能である。例えば、ビッ
ト情報を2ビットに拡張した場合、仮数部のビット並び
は4通りの桁が表せ、より広いダイナミックレンジを得
ることができるようになる。このデータ形式を適用した
加減算装置および乗算装置はシフターの制御とビット情
報に相当するデータの算出用の回路と、桁合わせのため
の4通りのビットシフトができるシフト量可変のシフタ
ーが必要となる。
The present invention is not limited to the embodiments described with reference to FIGS. 1 to 7, but various modifications can be made without departing from the scope of the invention. That is, in the embodiment, the bit information is one bit, but it can be applied to the case of having a plurality of bits. For example, when the bit information is expanded to 2 bits, the digit arrangement of the mantissa part can be represented by 4 digits, and a wider dynamic range can be obtained. An addition / subtraction device and a multiplication device to which this data format is applied require a circuit for shifter control and data calculation corresponding to bit information, and a shift amount variable shifter capable of performing four kinds of bit shifts for digit alignment. .

【0024】[0024]

【発明の効果】本発明によれば、同じビット数の固定小
数点表示形式の数値データの演算処理回路とほぼ同じ演
算速度およびハードウェアの構成規模で、より広いダイ
ナミックレンジを得ることができ、加減算や乗算等の演
算処理の高精度化および高速化が可能となる。
According to the present invention, a wider dynamic range can be obtained and an addition / subtraction can be performed at an operation speed and a hardware configuration scale that are substantially the same as those of an arithmetic processing circuit for numerical data of fixed-point display format having the same number of bits. It is possible to improve the accuracy and speed of arithmetic processing such as multiplication and multiplication.

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

【図1】本発明の演算処理で用いる数値データの表示形
式の一実施例を示す説明図である。
FIG. 1 is an explanatory diagram showing an example of a display format of numerical data used in arithmetic processing of the present invention.

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

【図3】図2における加減算論理演算回路の動作を示す
説明図である。
FIG. 3 is an explanatory diagram showing an operation of the addition / subtraction logic operation circuit in FIG.

【図4】図2における演算処理装置による演算処理例を
示す説明図である。
FIG. 4 is an explanatory diagram showing an example of arithmetic processing by the arithmetic processing device in FIG.

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

【図6】図5における乗算論理演算回路の動作を示す説
明図である。
6 is an explanatory diagram showing an operation of the multiplication logical operation circuit in FIG.

【図7】図5における演算処理装置による演算処理例を
示す説明図である。
7 is an explanatory diagram showing an example of arithmetic processing by the arithmetic processing device in FIG.

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

11、21a、21b、26、41a、41b、43、
44、51a、51b、56、71a、71b、75
仮数部 12、22a、22b、27、42a、42b、45、
52a、52b、57、72a、72b、76 ビット
情報 13、46、77 小数点の位置 23、53 シフター 24 加減算論理演算回路 25 加減算器 28、58 AND回路 29、59 OR回路 54 乗算論理演算回路 55 乗算器 73 乗算した結果の仮数部 74 ビットシフトした乗算の結果の仮数部
11, 21a, 21b, 26, 41a, 41b, 43,
44, 51a, 51b, 56, 71a, 71b, 75
Mantissa 12, 22a, 22b, 27, 42a, 42b, 45,
52a, 52b, 57, 72a, 72b, 76 bit information 13, 46, 77 decimal point position 23, 53 shifter 24 add / subtract logical operation circuit 25 add / subtractor 28, 58 AND circuit 29, 59 OR circuit 54 multiply logical operation circuit 55 multiplication Unit 73 Mantissa part of the result of multiplication 74 Mantissa part of the result of multiplication shifted by 74 bits

───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.6 識別記号 庁内整理番号 FI 技術表示箇所 // G06F 7/52 310 C (72)発明者 木内 淳 東京都国分寺市東恋ケ窪1丁目280番地 株式会社日立製作所中央研究所内 (72)発明者 緒方 康洋 東京都小平市上水本町5丁目20番1号 日 立超エル・エス・アイ・エンジニアリング 株式会社内 (72)発明者 中川 哲也 東京都国分寺市東恋ケ窪1丁目280番地 株式会社日立製作所中央研究所内 (72)発明者 淺川 吉章 東京都国分寺市東恋ケ窪1丁目280番地 株式会社日立製作所中央研究所内─────────────────────────────────────────────────── ─── Continuation of the front page (51) Int.Cl. 6 Identification number Internal reference number FI Technical display location // G06F 7/52 310 C (72) Inventor Jun Kiuchi 1-280 Higashi Koikeku, Kokubunji, Tokyo Stock Inside the Central Research Laboratory, Hitachi, Ltd. (72) Inventor Yasuhiro Ogata 5-20-1 Kamimizuhoncho, Kodaira-shi, Tokyo Inside Hitsuritsu LLS Engineering Co., Ltd. (72) Inventor Tetsuya Nakagawa Kokubunji, Tokyo 1-280 Higashi Koigakubo Central Research Laboratory, Hitachi Ltd. (72) Inventor Yoshiaki Asakawa 1-280 Higashi Koikeku Kubo, Kokubunji, Tokyo Inside Hitachi Central Research Laboratory

Claims (13)

【特許請求の範囲】[Claims] 【請求項1】 コンピュータによる数値データの演算処
理方法において、上記数値データを、固定小数点表示の
有効数字からなる仮数部と、2のn乗(nは整数値)か
らなる指数部との積により表現し、該数値データの加減
算および乗算を行なうことを特徴とする演算処理方法。
1. A method for arithmetically processing numerical data by a computer, wherein the numerical data is obtained by multiplying a mantissa part consisting of significant figures in fixed-point notation and an exponent part consisting of 2 n (n is an integer value). An arithmetic processing method which is characterized by expressing and performing addition and subtraction and multiplication of the numerical data.
【請求項2】 請求項1に記載の演算処理方法におい
て、上記数値データの指数部「2のn乗」の値を2進数
値からなるビット情報に予め対応付け、該ビット情報と
上記数値データの仮数部の2進数値とにより、上記数値
データを2進法表示し、上記仮数部の2進数値の加減算
および乗算を固定小数点演算で行なうと共に、該加減算
および乗算時に必要な上記仮数部の2進数値のシフト量
と、上記加減算および乗算結果の数値データの指数部に
対応するビット情報を、上記加減算および乗算対象の第
1、第2の数値データの各ビット情報に基づき算出する
ことを特徴とする演算処理方法。
2. The arithmetic processing method according to claim 1, wherein the value of the exponent part “2 to the n-th power” of the numerical data is previously associated with bit information consisting of a binary numerical value, and the bit information and the numerical data are combined. And the binary value of the mantissa of the mantissa, the binary data of the mantissa are displayed in binary notation, and addition and subtraction and multiplication of the binary value of the mantissa are performed by fixed point arithmetic. A bit amount corresponding to the shift amount of the binary value and the exponent part of the numerical data of the addition / subtraction and multiplication results is calculated based on each bit information of the first and second numerical data to be added / subtracted and multiplied. Characteristic arithmetic processing method.
【請求項3】 請求項2に記載の演算処理方法におい
て、上記数値データの指数部「2のn乗」の指数nを、
「予め設定した整数値m」×「整数値k」とし、該「整
数値k」を上記ビット情報に対応付け、「予め設定した
整数値m」×「整数値k」で上記シフト量を算出するこ
とを特徴とする演算処理方法。
3. The arithmetic processing method according to claim 2, wherein the exponent n of the exponent part “2 to the nth power” of the numerical data is
“Preset integer value m” × “integer value k”, the “integer value k” is associated with the bit information, and the shift amount is calculated by “preset integer value m” × “integer value k” An arithmetic processing method characterized by:
【請求項4】 請求項3に記載の演算処理方法におい
て、上記「整数値k」が「0」もしくは「1」の場合、
上記ビット情報を「0」もしくは「1」のいずれかの1
ビット値として上記数値データの指数部「2のn乗」に
対応付け、上記加減算および乗算対象の第1、第2の数
値データの各ビット情報の論理和演算により、上記加減
算および乗算結果の数値データの指数部に対応するビッ
ト情報を算出することを特徴とする演算処理方法。
4. The arithmetic processing method according to claim 3, wherein when the “integer value k” is “0” or “1”,
Set the above bit information to 1 of either "0" or "1"
Numerical values of the addition and subtraction and multiplication results are obtained by associating with the exponent part “2 to the nth power” of the numerical data as a bit value and performing a logical sum operation of the bit information of the first and second numerical data to be added and subtracted and multiplied. An arithmetic processing method characterized by calculating bit information corresponding to an exponent part of data.
【請求項5】 請求項2から請求項4のいずれかに記載
の演算処理方法において、上記仮数部の加減算処理およ
び乗算処理と、上記ビット情報の論理演算処理を並列処
理で行なうことを特徴とする演算処理方法。
5. The arithmetic processing method according to any one of claims 2 to 4, wherein addition / subtraction processing and multiplication processing of the mantissa part and logical operation processing of the bit information are performed in parallel processing. Calculation processing method.
【請求項6】 請求項2から請求項5のいずれかに記載
の演算処理方法において、上記数値データの加減算処理
は、上記ビット情報が一致するように、加減算処理対象
の第1、第2の数値データのいずれかの仮数部の2進数
値をシフトした後に、それぞれの仮数部の加減算処理を
行ない、該加減算処理結果の仮数部と、上記一致させた
ビット情報とにより、上記加減算処理結果の数値データ
を2進法表示することを特徴とする演算処理方法。
6. The arithmetic processing method according to claim 2, wherein in the addition / subtraction processing of the numerical data, the first and second subject of addition / subtraction processing are performed so that the bit information matches. After shifting the binary value of any mantissa part of the numerical data, the mantissa part of each mantissa part is added and subtracted, and the mantissa part of the addition and subtraction process result and the matched bit information are used to determine the addition and subtraction process result. An arithmetic processing method characterized by displaying numerical data in a binary system.
【請求項7】 請求項6に記載の演算処理方法におい
て、上記第1、第2の数値データの各ビット情報が
「0」もしくは「1」からなる1ビット値であれば、上
記第1、第2の数値データのいずれかの仮数部の2進数
値をnビット分だけシフトして上記ビット情報を一致さ
せ、それぞれの仮数部の加減算処理を行なうことを特徴
とする演算処理方法。
7. The arithmetic processing method according to claim 6, wherein each bit information of the first and second numerical data is a 1-bit value consisting of “0” or “1”, the first, An arithmetic processing method characterized in that the binary value of any mantissa part of the second numerical data is shifted by n bits to match the bit information, and addition / subtraction processing of each mantissa part is performed.
【請求項8】 請求項2から請求項7のいずれかに記載
の演算処理方法において、上記数値データの乗算処理
は、乗算処理対象の第1、第2の数値データの各仮数部
の2進数値の固定小数点形式での乗算処理を行ない、該
乗算処理結果の2進数値のビットのシフト量を上記第
1、第2の数値データの各ビット情報の第1の論理演算
に基づき算出し、該算出したシフト量だけビットをシフ
トした上記乗算処理結果の2進数値と、上記ビット情報
の第2の論理演算結果とにより、上記乗算処理結果の数
値データを2進法表示することを特徴とする演算処理方
法。
8. The arithmetic processing method according to any one of claims 2 to 7, wherein the multiplication processing of the numerical data is binary of mantissa parts of the first and second numerical data to be multiplied. A multiplication process in a fixed-point format of a numerical value is performed, and a bit shift amount of the binary value of the multiplication process result is calculated based on the first logical operation of each bit information of the first and second numerical data, The binary data of the multiplication processing result obtained by shifting the bits by the calculated shift amount and the second logical operation result of the bit information are used to display the numerical data of the multiplication processing result in the binary system. Calculation processing method.
【請求項9】 請求項8に記載の演算処理方法におい
て、上記第1、第2の数値データの各ビット情報が
「0」もしくは「1」からなる1ビット値であれば、上
記各ビット情報の第1の論理演算を論理積演算で、上記
各ビット情報の第2の論理演算を論理和演算で行なうこ
とを特徴とする演算処理方法。
9. The arithmetic processing method according to claim 8, wherein each bit information of the first and second numerical data is a one-bit value consisting of “0” or “1”, each bit information. The first logical operation is a logical product operation, and the second logical operation of each bit information is a logical sum operation.
【請求項10】 請求項2から請求項4のいずれかに記
載の数値データの加減算処理を行なう演算処理装置にお
いて、上記nビットをシフト量として、加減算処理対象
の第1、第2の数値データの各仮数部の2進数値をシフ
トする第1、第2のシフターと、該第1、第2のシフタ
ーから出力された上記第1、第2の数値データの各仮数
部を固定小数点演算で加減算する加減算手段と、上記第
1、第2の数値データの各ビット情報が一致するように
上記第1、第2のシフターのシフト動作を制御すると共
に、上記第1、第2の数値データの各ビット情報の論理
演算に基づき、上記加減算手段の加減算結果の数値デー
タのビット情報を算出する加減算論理演算手段とを設
け、上記加減算手段による加減算結果の2進数値を仮数
部とし、上記加減算論理演算手段による論理演算結果の
ビット情報を指数部として、上記加減算結果の数値デー
タを2進法表示することを特徴とする演算処理装置。
10. An arithmetic processing unit for performing addition / subtraction processing of numerical data according to claim 2, wherein the n-bit is a shift amount, and the first and second numerical data to be subjected to the addition / subtraction processing. Of the first and second shifters for shifting the binary value of each mantissa part of the above, and each mantissa part of the first and second numerical data output from the first and second shifters by fixed point arithmetic. The shift operation of the first and second shifters is controlled so that the bit information of the first and second numerical data coincides with the addition and subtraction means for adding and subtracting, and the addition and subtraction of the first and second numerical data is performed. Addition / subtraction logic operation means for calculating bit information of the numerical data of the addition / subtraction result of the addition / subtraction means based on the logical operation of each bit information is provided, and the binary value of the addition / subtraction result by the addition / subtraction means is used as a mantissa part, and the addition / subtraction theory is added. An arithmetic processing unit, wherein the numerical information of the addition / subtraction result is displayed in binary notation using the bit information of the logical operation result by the arithmetic operation means as an exponent.
【請求項11】 請求項2から請求項4のいずれかに記
載の数値データの乗算処理を行なう演算処理装置におい
て、乗算処理対象の第1、第2の数値データの上記各仮
数部を固定小数点演算で乗算する乗算手段と、該乗算手
段による乗算結果の2進数値を、上記nビットをシフト
量としてシフトする乗算用シフターと、上記第1、第2
の数値データの各ビット情報の第1の論理演算に基づ
き、上記乗算用シフターのシフト動作を制御すると共
に、上記ビット情報の第2の論理演算に基づき、上記乗
算手段の乗算結果の数値データのビット情報を算出する
乗算論理演算手段とを設け、上記乗算手段による乗算結
果の2進数値を仮数部とし、上記乗算論理演算手段によ
る第2の論理演算で算出したビット情報を指数部とし
て、上記乗算結果の数値データを2進法表示することを
特徴とする演算処理装置。
11. An arithmetic processing unit for performing multiplication processing of numerical data according to claim 2, wherein each mantissa part of the first and second numerical data to be multiplied is fixed point. Multiplication means for multiplying by calculation; a multiplication shifter for shifting the binary value of the multiplication result by the multiplication means with the above n bits as the shift amount; and the above first and second
The shift operation of the multiplication shifter is controlled based on the first logical operation of each bit information of the numerical data, and the numerical data of the multiplication result of the multiplication means is controlled based on the second logical operation of the bit information. Multiply logic operation means for calculating bit information is provided, the binary value of the multiplication result by the multiplication means is used as a mantissa part, and the bit information calculated by the second logic operation by the multiplication logic operation means is used as an exponent part. An arithmetic processing device characterized by displaying numerical data of a multiplication result in a binary system.
【請求項12】 請求項10に記載の演算処理装置にお
いて、上記加減算対象の第1、第2の数値データに対応
付けた各ビット情報が「0」もしくは「1」からなる1
ビット値であれば、上記加減算論理演算手段は、上記加
減算対象の第1、第2の数値データの各ビット情報の論
理和演算結果を、上記加減算手段の加減算結果の数値デ
ータのビット情報として算出することを特徴とする演算
処理装置。
12. The arithmetic processing unit according to claim 10, wherein each bit information associated with the first and second numerical data to be added / subtracted is 1 consisting of “0” or “1”.
If it is a bit value, the addition / subtraction logical operation means calculates the logical sum operation result of each bit information of the first and second numerical data to be added / subtracted as bit information of the numerical data of the addition / subtraction result of the addition / subtraction means. An arithmetic processing unit characterized by:
【請求項13】 請求項11に記載の演算処理装置にお
いて、上記乗算対象の第1、第2の数値データに対応付
けた各ビット情報が「0」もしくは「1」からなる1ビ
ット値であれば、上記乗算論理演算手段は、上記第2の
論理演算を、上記乗算対象の第1、第2の数値データの
各ビット情報の論理和演算で行ない、該論理和演算の結
果を、上記乗算手段の乗算結果の数値データのビット情
報として算出することを特徴とする演算処理装置。
13. The arithmetic processing device according to claim 11, wherein each bit information associated with the first and second numerical data to be multiplied is a 1-bit value consisting of “0” or “1”. For example, the multiplication logical operation means performs the second logical operation by a logical sum operation of bit information of the first and second numerical data to be multiplied, and a result of the logical sum operation is multiplied by the multiplication result. An arithmetic processing unit, wherein the arithmetic processing device calculates as bit information of numerical data of a multiplication result of the means.
JP5338679A 1993-12-28 1993-12-28 Arithmetic processing method and arithmetic processor Withdrawn JPH07200259A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5338679A JPH07200259A (en) 1993-12-28 1993-12-28 Arithmetic processing method and arithmetic processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5338679A JPH07200259A (en) 1993-12-28 1993-12-28 Arithmetic processing method and arithmetic processor

Publications (1)

Publication Number Publication Date
JPH07200259A true JPH07200259A (en) 1995-08-04

Family

ID=18320441

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5338679A Withdrawn JPH07200259A (en) 1993-12-28 1993-12-28 Arithmetic processing method and arithmetic processor

Country Status (1)

Country Link
JP (1) JPH07200259A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007032251A1 (en) * 2005-09-13 2007-03-22 Sony Corporation Decoder and decoding method
JP2022058660A (en) * 2016-05-03 2022-04-12 イマジネイション テクノロジーズ リミテッド Convolutional neural network hardware configuration

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007032251A1 (en) * 2005-09-13 2007-03-22 Sony Corporation Decoder and decoding method
JP2022058660A (en) * 2016-05-03 2022-04-12 イマジネイション テクノロジーズ リミテッド Convolutional neural network hardware configuration

Similar Documents

Publication Publication Date Title
KR920005226B1 (en) Floating point arithmetic units
EP0472139B1 (en) A floating-point processor
KR20080055985A (en) Floating-point processor with selectable subprecision
JPH02196328A (en) Floating point computing apparatus
US7188133B2 (en) Floating point number storage method and floating point arithmetic device
US5111421A (en) System for performing addition and subtraction of signed magnitude floating point binary numbers
Ercegovac et al. On-the-fly rounding (computing arithmetic)
JPH05134851A (en) Multiplying circuit output system
US5862068A (en) Arithmetic circuit for calculating a square-root of a sum of squares
KR100290906B1 (en) method and appratus for performing simultaneously addition and rounding in a floating point multiplier
EP0332215B1 (en) Operation circuit based on floating-point representation
Schwarz Binary Floating-Point Unit Design: the fused multiply-add dataflow
JPH07200259A (en) Arithmetic processing method and arithmetic processor
JPH0540605A (en) Floating point multiplier
JPH04172526A (en) Floating point divider
JP2645422B2 (en) Floating point processor
JP4163967B2 (en) Floating point arithmetic unit
US4716538A (en) Multiply/divide circuit for encoder PCM samples
JPH0251732A (en) Floating point computing element
JPH0383126A (en) Floating-point multiplier
JP3077880B2 (en) Sticky bit detection circuit
CN116974512A (en) Floating point arithmetic device, vector processing device, processor, and electronic apparatus
JPS5960637A (en) Arithmetic device for floating decimal point
JPH03282926A (en) Floating-point numerical arithmetic unit
KR0170729B1 (en) Calculator of absolute value of difference using carry select adder

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20010306