JPS6116331A - Logarithmic conversion system - Google Patents

Logarithmic conversion system

Info

Publication number
JPS6116331A
JPS6116331A JP59135175A JP13517584A JPS6116331A JP S6116331 A JPS6116331 A JP S6116331A JP 59135175 A JP59135175 A JP 59135175A JP 13517584 A JP13517584 A JP 13517584A JP S6116331 A JPS6116331 A JP S6116331A
Authority
JP
Japan
Prior art keywords
value
exp
floating point
logarithmic
conversion
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
JP59135175A
Other languages
Japanese (ja)
Inventor
Osamu Noguchi
修 野口
Atsushi Shinpo
敦 新保
Kenichiro Hosoda
細田 賢一郎
Shinji Kawaguchi
川口 伸二
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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP59135175A priority Critical patent/JPS6116331A/en
Publication of JPS6116331A publication Critical patent/JPS6116331A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To execute conversion at a high speed with simple constitution by reading out corresponding exponential part and mantissa part and executing prescribed operations of them to convert a real number value to a floating point value and a logarithmic value. CONSTITUTION:In case of conversion from the real number value to the logarithmic value, an exponential part EXP value corresponding to data 1 to be converted is outputted as an output 4 of a ROM3 to one input of an adder 7 in accordance with data 1 to be converted and EXP indication of an EXP/mantissa part (MANT) designating signal 2. A constant 9 for EXP is supplied to the other input of the adder 7 through a selector 5. Consequently, the value obtained by subtracting one from the floating point value is outputted from the adder 7. This value is supplied to a shifting circuit 13 and is shifted in accordance with EXP indication of the EXP/MANT designating signal 2 and logarithmic value LOG indication of a floating point value FL/LOG designating signal 11. The shifted value is stored in an EXP register 17 through an EXP gate 15.

Description

【発明の詳細な説明】 (産業上の利用分野) この発明は、信号処理装置等で行なわれる実数値から浮
動小数点値及び対数値へ変換する対数変換方式に関する
DETAILED DESCRIPTION OF THE INVENTION (Field of Industrial Application) The present invention relates to a logarithmic conversion method for converting real values into floating point values and logarithmic values, which is performed in a signal processing device or the like.

(従来の技術) 従来このような分野において正の実数値から浮動小数点
値及び対数値を求めるときはそれぞれに必要な有効桁に
合せた浮動小数点値を演算により求めることが必要であ
った。
(Prior Art) Conventionally, when calculating floating point values and logarithmic values from positive real values in such fields, it has been necessary to calculate floating point values according to the required significant digits for each.

(発明が解決しようとする問題点) しかしながら一般には浮動小数値の算出及び対数値の算
出を個別に演算処理する必要があり、処理時間が長くな
るか又はハード量が多くなるという欠点があった。
(Problem to be solved by the invention) However, in general, calculation of floating point values and calculation of logarithm values need to be processed separately, which has the drawback of lengthening the processing time or increasing the amount of hardware. .

従って、この発明の目的は高速でしかも簡単な回路によ
り実数値から浮動小数点値及び対数値を変換する対数変
換方式に関する。
Accordingly, an object of the present invention is to relate to a logarithmic conversion method for converting real values to floating point values and logarithmic values using a fast and simple circuit.

(問題点を解決するだめの手段) この発明は、実数値から浮動小数点値及び対数値へ変換
する対数変換方式において、予め決められた桁数を有す
る浮動小数点値の指数部と仮数部を前記実数値ごとに予
め決めて不揮発性の記憶手段に格納しておき、実数値か
ら浮動小数点値への変換は当該実数値に対応する指数部
と仮数部を前記記憶手段から読出すことにより行なわれ
、当該実数値から対数値への変換は前記読出された指数
部と仮数部の各々に対し所定の演算を実行することによ
り行なわれることを特徴とする対数変換方式である。
(Means for Solving the Problems) The present invention provides a logarithmic conversion method for converting a real value into a floating point value and a logarithmic value. Each real value is determined in advance and stored in a non-volatile storage means, and conversion from a real number to a floating point value is performed by reading out the exponent part and mantissa part corresponding to the real value from the storage means. , is a logarithmic conversion method characterized in that the conversion from the real value to the logarithm value is performed by performing a predetermined operation on each of the read exponent part and mantissa part.

(作用) 上記技術的手段の作用は次のとおりである。不揮発性の
記憶手段には予め決められた桁数を有する浮動小数点値
の指数部と仮数部とが各実数値ごとに予め格納されてい
るので、実数値から浮動小数点値への変換は当該実数値
に対応する指数部と仮数部を前記記憶手段から読出すこ
とにより行なわれる。また当該実数値から対数値への変
換は、前記読出された指数部と仮数部に所定の演算を実
行することのみで行なわれる。従って、高速かつ簡単な
構成で上記変換が実行可能である。
(Operation) The operation of the above technical means is as follows. Since the exponent part and mantissa part of a floating point value having a predetermined number of digits are stored in advance for each real value in the nonvolatile storage means, conversion from a real value to a floating point value is performed in advance. This is done by reading out the exponent part and mantissa part corresponding to the numerical value from the storage means. Further, the conversion from the real value to the logarithm value is performed only by performing a predetermined operation on the read exponent part and mantissa part. Therefore, the above conversion can be performed at high speed and with a simple configuration.

(実施例) 以下、この発明を一実施例に基づき図面を参照して詳細
に説明する。
(Example) Hereinafter, the present invention will be described in detail based on an example with reference to the drawings.

はじめに、実数値から浮動小数点値及び対数値への変換
について式を用いて説明する。
First, conversion from real values to floating point values and logarithmic values will be explained using formulas.

一般に、実数の絶対値DNに対し、2進法における浮動
小数点表示は次式(1)で表わされる。
Generally, the floating point representation in binary system for the absolute value DN of a real number is expressed by the following equation (1).

Dn = 2ENX My         −(1)
ここで、ENは指数部、AiNは仮数部であり、一般に
1≦MN≦2とすることが行々われている。
Dn = 2ENX My - (1)
Here, EN is an exponent part and AiN is a mantissa part, and it is generally done that 1≦MN≦2.

これに対し対数値は次式(2)で表わされる。On the other hand, the logarithmic value is expressed by the following equation (2).

10g2DN = 1O(12(2ENx MN )=
EN +lOg2MN       ・・・(2)ここ
で、MN=MN’+1  とすれば、近似的に10g、
、DH埃EN十M′N′         ・・・(3
)が成り立つ。
10g2DN = 1O(12(2ENx MN) =
EN +lOg2MN...(2) Here, if MN=MN'+1, approximately 10g,
, DH dust EN ten M'N'...(3
) holds true.

い塘、信号処理の例として、絶対値入力を01浮動小数
点値の指数部をE(]0進0進)、及び仮数部をM(1
0進表示)とすれば、これらを2進表示で表わした場合
の2進表示と位取りとの関係は、次のとおりである。す
なわち、指数部Eの2進表示はgn、 e、、 、・・
・、eo(これらは1又は0の値)であり、その位取り
はそれぞれ2n12n−’ H・・・、2°である。丑
だ、仮数部Mの2進表示は??+、に、 m、 、 、
・・・。
As an example of signal processing, the absolute value input is 01, the exponent part of a floating point value is E (] 0 base 0 base), and the mantissa part is M (1
(0 base), the relationship between the binary display and scale when these are expressed in binary is as follows. That is, the binary representation of the exponent part E is gn, e, , .
. , eo (these are values of 1 or 0), and their scales are 2n12n-' H . . . , 2°, respectively. Hello, what is the binary representation of the mantissa part M? ? +, to, m, , ,
....

mo(とれらは1又はOの値)であり、その位取りはそ
れぞれ2−1.2−2.・・、2〜(&+1)である。
mo (these are the values of 1 or O), and the scale is 2-1.2-2. ..., 2 to (&+1).

尚、mkミ1 であシ、また上記の場合、仮数部Mは1
0進表示では0.5≦M≦1の値をとる。
Furthermore, in the above case, the mantissa part M is 1.
In decimal notation, it takes a value of 0.5≦M≦1.

このとき、対数変換のため、仮数部Mを近似計算が可能
なようにM→1+M′と表現する必要がある。このだめ
、指数部から」を減じ、仮数部を2゜〜2−にの桁表現
として取扱う。これを用いると、D−2EXM−2E−
1×M×2     ・・・(4)となり、両辺の2の
対数をとり log20= log22E−’ −1−log2(A
/ X 2 )−(E−1)×lOq2(MX2)  
・・(5)(5)式は上記の近似条件式(3)を満足す
るので、log21J)埃(E−1)+(MX 2−I
t、 )  ・・(6)となる。すなわち、対数値の整
数部は(E−])、小数部は(M×2−1)で表示でき
る。2進数の場合には、上記(E−])と(MX2−1
)を2進表示で配列することにより、対数値を求めるこ
とができる。
At this time, due to logarithmic conversion, it is necessary to express the mantissa part M as M→1+M' so that approximate calculation can be performed. In this case, subtract "" from the exponent and treat the mantissa as a digit representation from 2° to 2-. Using this, D-2EXM-2E-
1×M×2 ...(4), taking the logarithm of 2 on both sides, log20=log22E-' -1-log2(A
/X2)-(E-1)×lOq2(MX2)
...(5) Equation (5) satisfies the above approximate conditional expression (3), so log21J) dust (E-1) + (MX 2-I
t, )...(6). That is, the integer part of the logarithm value can be expressed as (E-]), and the decimal part can be expressed as (Mx2-1). In the case of binary numbers, the above (E-]) and (MX2-1
) by arranging them in binary notation, the logarithm value can be determined.

従って、この発明では、上記変換手順に着目し、予め決
められた桁数を有する浮ll1lI小数点値の指数部と
仮数部を各実数値ごとにROM等の記憶手段に格納して
おき、対数値への変換は変換されるべき実数値に対応す
る指数部と仮数部を読出し、式(6)の如き条件に従っ
て44fることを特徴としている。
Therefore, in the present invention, focusing on the above conversion procedure, the exponent part and mantissa part of a floating decimal point value having a predetermined number of digits are stored in a storage means such as a ROM for each real value, and the logarithm value is The conversion is characterized by reading out the exponent part and mantissa part corresponding to the real value to be converted, and converting them into 44f according to the conditions as in equation (6).

添付図面はこの発明の一実施例のブ07り図である。図
中、1は被変換データ、2ばExp  (指数部)/M
ANT(仮数部)指定信号、3は被変換データ1及びE
XP/MANT指定信号をアドレスとし、予め決められ
た桁数を有する浮動小数点値の指数部と仮数部を被変換
データ1ごとに格納するRoM、4はROM3の出力、
5はFL(浮動小数点値)用オールパ0″′データ8と
対数値変換のだめのEXP用定数9とMANT用定数1
0とを入力とし、EXP/MANT 指定信号2とFL
/LOG (対数値)指定信号Hに従って前記3つの入
力信号の1つを選択するセレクタ、7はROM3の出力
とセレクタ5の出力信号6を加算する加算器、13は位
取り合わせのために加算器出力12をEXP/MANT
指定信号2及びFL/LOG指定信号11  に従った
シフトを行なうシフト回路、15はシフト回路13から
の指数部(EXP)のみを通過させるEXPゲート、1
6はシフト回路13からの仮数部(MA、NT )のみ
を通過させるMANTゲート、17は指数部を格納する
EXPレジスタ、18は仮数部を格納するMANTレジ
スタ、及び19 は変換出力である。
The accompanying drawing is a block diagram of one embodiment of the present invention. In the figure, 1 is the data to be converted, 2 is Exp (exponential part)/M
ANT (mantissa) designation signal, 3 is converted data 1 and E
RoM uses the XP/MANT designation signal as an address and stores the exponent part and mantissa part of a floating point value having a predetermined number of digits for each data to be converted, 4 is the output of ROM3,
5 is all par 0″ data for FL (floating point value) 8, EXP constant 9 for logarithmic value conversion, and MANT constant 1
0 as input, EXP/MANT specified signal 2 and FL
/LOG (logarithmic value) A selector that selects one of the three input signals according to the specified signal H, 7 an adder that adds the output of the ROM 3 and the output signal 6 of the selector 5, and 13 an adder for position adjustment. EXP/MANT output 12
A shift circuit that performs a shift according to the designation signal 2 and the FL/LOG designation signal 11; 15 is an EXP gate that passes only the exponent part (EXP) from the shift circuit 13;
6 is a MANT gate that passes only the mantissa part (MA, NT) from the shift circuit 13, 17 is an EXP register that stores the exponent part, 18 is a MANT register that stores the mantissa part, and 19 is a conversion output.

次に動作について説明する。Next, the operation will be explained.

はじめに、実数値から浮動小数点値への変換の場合につ
いて説明する。添付図面において、被変換データ1及び
EXP/MANT指定信号2のEXP指定により、RO
M3からは被変換データ]に対応する指数部の値である
EXP値が、ROM 3のROM出力4として加算器7
の一方の入力に出力される。
First, the case of converting a real value to a floating point value will be explained. In the attached drawing, RO is
From M3, the EXP value which is the value of the exponent part corresponding to the data to be converted] is sent to the adder 7 as the ROM output 4 of the ROM 3.
is output to one of the inputs.

一方、加算器7の他方の入力には、現在行なわれている
変換が浮動小数点値への変換なので、セレクタ5を介し
てFL用オール” o ”データ8が入力される。加算
器7は上記EXP値をそのま1シフト回路13へ与える
。シフト回路13は、EXP/MANT指定信号2のE
XP指定及びFL/LOG指定信号11のFL指定に従
ったシフトを行なう。/フト回路]3の/フト回路出力
はEXPゲート15を介してEXP l/レジスタ7に
格納され、EXP値の位の位置に合致した値が設定され
る。
On the other hand, the FL all "o" data 8 is input to the other input of the adder 7 via the selector 5 since the conversion currently being performed is a conversion to a floating point value. The adder 7 directly supplies the EXP value to the 1 shift circuit 13. The shift circuit 13 receives the E of the EXP/MANT designation signal 2.
Shifting is performed according to the XP designation and the FL designation of the FL/LOG designation signal 11. The output of the /ft circuit] 3 is stored in the EXP l/register 7 via the EXP gate 15, and a value matching the digit position of the EXP value is set.

次に、EXP/MANT指定信号2はWANT指定をR
OM3に与える。これにより、ROM3からは被変換デ
ータ1に対応する仮数部の値であるMANT値が出力さ
れる。加算器7はこのMAN T値とFL用オール” 
o ”データ8とを加算する。すなわち、シフト回路1
3では、MAN’T値がMART指定とFL指定に従っ
てシフトされる。この/フト回路出力14はMANTゲ
ート16を介してMANTレジスタ18に格納される。
Next, the EXP/MANT designation signal 2 sets the WANT designation to R.
Give to OM3. As a result, the ROM 3 outputs the MANT value, which is the value of the mantissa corresponding to the data to be converted 1. Adder 7 uses this MAN T value and all for FL.
o ”Add data 8. In other words, shift circuit 1
3, the MAN'T value is shifted according to the MART and FL specifications. This /ft circuit output 14 is stored in a MANT register 18 via a MANT gate 16.

以上のようにして、浮動小数点値は変換出力19として
得られる。
As described above, a floating point value is obtained as the conversion output 19.

次に、対数値への変換の場合について説明する。Next, the case of conversion to a logarithm value will be explained.

はじめに、被変換データ1及びEXP/MART  指
定信号2のEXP指示により、前述した浮動小数点値の
場合と同様に、被変換データ1に対応するEXP値がR
OM 3のROM出力4として加算器7の一方の入力に
出力される。一方、加算器7の他方の入力には、現在行
なわれている変換が対数値の指数部(EXP)の変換な
ので、セレクタ5を介してEXP用定数9(@述の例で
は−1)が供給される。従って、加算器7の出力からは
、浮動小数点時の値から1だけ減算した値が出力される
First, by the EXP instruction of the converted data 1 and the EXP/MART designation signal 2, the EXP value corresponding to the converted data 1 is R as in the case of the floating point value described above.
It is output as ROM output 4 of OM 3 to one input of adder 7. On the other hand, since the conversion currently being performed is the conversion of the exponent part (EXP) of the logarithm value, the EXP constant 9 (-1 in the above example) is input to the other input of the adder 7 via the selector 5. Supplied. Therefore, the output of the adder 7 is a value obtained by subtracting 1 from the floating point value.

この値はシフト回路13に供給され、EXP/MAN、
T指定信号2のEXP指定及びFL/LOG 指定信号
HのLOG指定に従ったシフトを行なう。シフトされた
値はEXPゲート15を介してEXP レジスタ17に
格納される。
This value is supplied to the shift circuit 13, and EXP/MAN,
Shifting is performed according to the EXP designation of the T designation signal 2 and the LOG designation of the FL/LOG designation signal H. The shifted value is stored in EXP register 17 via EXP gate 15.

仮数部についても同様に行なわれる。ただし、この場合
は、加算器17の他方の一方にはMANT用定数1. 
Q (前述の例では−1)が供給される。
The same process is performed for the mantissa. However, in this case, the other side of the adder 17 has the MANT constant 1.
Q (-1 in the previous example) is provided.

以上のようにして、対数値は変換出力19  として得
られる。
In the above manner, the logarithm value is obtained as the conversion output 19.

以上、この発明を一実施例として説明した。他の実施例
として、ROM3の出力の処理をマイクロプログラムで
行なうものが挙げられる。
This invention has been described above as one embodiment. Another example is one in which the output of the ROM 3 is processed by a microprogram.

(発明の効果) 以上説明したように、この発明によれば、高速でしかも
蘭単な回路により実数値から浮動小数点値及び対数値に
変換できる。
(Effects of the Invention) As described above, according to the present invention, a real value can be converted into a floating point value and a logarithm value using a high-speed and simple circuit.

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

添付図面は、この4.5明の一実施例を示す図である。 1・・被変換データ、2・・・EXP/MANT指定テ
ータ、3・・デーM 、     4・・ROM出力、
9・・・EXP用定数、 10  ・MANT用定数、
11・・・FL/LOG指定データ、12・・・加算器
出力、13・・・/フト回路、 14・・・シフト回路
出力、】5 ・・EXPゲート、16・・・AIANT
ゲート。 17・・・EXPレジスタ、18・・・MANTレジス
タ、19・・変換出力=
The attached drawings are diagrams showing one embodiment of this 4.5 light. 1... Data to be converted, 2... EXP/MANT specified data, 3... Data M, 4... ROM output,
9... Constant for EXP, 10 - Constant for MANT,
11... FL/LOG specified data, 12... Adder output, 13.../ft circuit, 14... Shift circuit output, ]5... EXP gate, 16... AIANT
Gate. 17...EXP register, 18...MANT register, 19...Conversion output =

Claims (3)

【特許請求の範囲】[Claims] (1)実数値から浮動小数点値及び対数値へ変換する対
数変換方式において、予め決められた桁数を有する浮動
小数点値の指数部と仮数部を前記実数値ごとに予め決め
て不揮発性の記憶手段に格納しておき、実数値から浮動
小数点値への変換は当該実数値に対応する指数部と仮数
部を前記記憶手段から読出すことにより行なわれ、当該
実数値から対数値への変換は前記読出された指数部と仮
数部の各々に対し所定の演算を実行することにより行な
われることを特徴とする対数変換方式。
(1) In a logarithmic conversion method that converts a real value to a floating point value and a logarithmic value, the exponent part and mantissa part of a floating point value having a predetermined number of digits are determined in advance for each real value and stored in nonvolatile memory. The conversion from a real value to a floating point value is performed by reading the exponent part and mantissa part corresponding to the real value from the storage means, and the conversion from the real value to a logarithm value is performed by reading the exponent part and mantissa part corresponding to the real value. A logarithmic conversion method characterized in that the logarithmic conversion method is performed by performing a predetermined operation on each of the read exponent part and mantissa part.
(2)前記指数部及び仮数部を10進法表示でそれぞれ
E及びMとしたとき、前記所定の演算により得られる対
数値の指数部と仮数部は各々(E−1)及び(M×2−
1)で表わされることを特徴とする特許請求の範囲第1
項に記載の対数変換方式。
(2) When the exponent part and the mantissa part are expressed in decimal notation as E and M, respectively, the exponent part and the mantissa part of the logarithm value obtained by the predetermined operation are (E-1) and (M×2), respectively. −
1) Claim 1 characterized in that
Logarithmic transformation method described in Section.
(3)前記予め決められた桁数は、実数値から浮動小数
点値へ変換するときに必要な桁数と実数値から対数値へ
変換するときに必要な桁数とのうちの多い方の桁数であ
ることを特徴とする特許請求の範囲第1項に記載の対数
変換方式。
(3) The predetermined number of digits is the greater of the number of digits required when converting from a real value to a floating point value and the number of digits required when converting from a real value to a logarithm value. The logarithmic conversion method according to claim 1, wherein the logarithmic conversion method is a number.
JP59135175A 1984-07-02 1984-07-02 Logarithmic conversion system Pending JPS6116331A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP59135175A JPS6116331A (en) 1984-07-02 1984-07-02 Logarithmic conversion system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP59135175A JPS6116331A (en) 1984-07-02 1984-07-02 Logarithmic conversion system

Publications (1)

Publication Number Publication Date
JPS6116331A true JPS6116331A (en) 1986-01-24

Family

ID=15145584

Family Applications (1)

Application Number Title Priority Date Filing Date
JP59135175A Pending JPS6116331A (en) 1984-07-02 1984-07-02 Logarithmic conversion system

Country Status (1)

Country Link
JP (1) JPS6116331A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0385414A (en) * 1989-08-29 1991-04-10 Rion Co Ltd Detecting apparatus of information
JPH0934693A (en) * 1995-07-21 1997-02-07 Nec Corp Exponent logarithm conversion circuit

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0385414A (en) * 1989-08-29 1991-04-10 Rion Co Ltd Detecting apparatus of information
JPH0934693A (en) * 1995-07-21 1997-02-07 Nec Corp Exponent logarithm conversion circuit
US5831878A (en) * 1995-07-21 1998-11-03 Nec Corporation Exponential and logarithmic conversion circuit

Similar Documents

Publication Publication Date Title
US5469377A (en) Floating point computing device for simplifying procedures accompanying addition or subtraction by detecting whether all of the bits of the digits of the mantissa are 0 or 1
US5666301A (en) Multiplier carrying out numeric calculation at high speed
US10095475B2 (en) Decimal and binary floating point rounding
US4617641A (en) Operation unit for floating point data having a variable length exponent part
JPH04290122A (en) Numerical expression conversion device
JPS62191926A (en) Arithmetic unit
US4758975A (en) Data processor capable of processing floating point data with exponent part of fixed or variable length
JPS6116331A (en) Logarithmic conversion system
US10310809B2 (en) Apparatus and method for supporting a conversion instruction
US3508037A (en) Decimal add/subtract circuitry
US6298364B1 (en) Digital signal processing operation apparatus that allows combined operation
US5144572A (en) Digital filter for filtering image data
JPH1063500A (en) Signal processor
JP2555577B2 (en) Arithmetic unit
JPH0435777B2 (en)
JPS62259140A (en) Address generating circuit
JPS60108932A (en) Decimal operation processor
JPS60245046A (en) Logical shift arithmetic circuit
JPH03150629A (en) Floating point data expression format converting system
JPH02267625A (en) Integer part take-out system using floating point arithmetic
JPH0638228B2 (en) Multiplier with add / subtract function
JPH02183828A (en) Floating point multiplier
JPS6168637A (en) Arithmetic unit
JPH01263812A (en) Table reading circuit
JPH0313011A (en) Binary to decimal converter