JPH02137022A - Data type converting circuit - Google Patents

Data type converting circuit

Info

Publication number
JPH02137022A
JPH02137022A JP63291248A JP29124888A JPH02137022A JP H02137022 A JPH02137022 A JP H02137022A JP 63291248 A JP63291248 A JP 63291248A JP 29124888 A JP29124888 A JP 29124888A JP H02137022 A JPH02137022 A JP H02137022A
Authority
JP
Japan
Prior art keywords
digit
data
complement
point number
circuit
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
JP63291248A
Other languages
Japanese (ja)
Inventor
Shigeto Tanaka
田中 茂人
Hisayoshi Kuraya
久義 蔵屋
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP63291248A priority Critical patent/JPH02137022A/en
Publication of JPH02137022A publication Critical patent/JPH02137022A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To reduce the scale of a data type conversion circuit by sharing a production means for complement of '2' and a digit carrying means and performing the mutual conversion between the floating point number and the fixed point number. CONSTITUTION:A production means 111 for complement of '2' performs a conversion process into a complement of '2' based on the code of the input data. Based on the output of the means 111, a 2nd digit shift number production means 122 produces a 2nd digit shift number for the conversion of the fixed decimal point number into the floating point number. While a 1st digit carrying number production means 121 produces a 1st digit carrying number for conversion of the floating point number into the fixed point number. A selection means 132 selects the 1st or 2nd digit carrying number. Based on this selection output, the digit carrying process is carried out for the output of the means 111 via a digit carrying means 131. At the same time, an exponent part production means 141 produces an exponent part for the floating point number based on the 2nd digit carrying number. Thus the means 111 and 131 are shared, and the mutual conversion is attained between both decimal point numbers.

Description

【発明の詳細な説明】 〔概 要〕 例えばデジタル信号処理におけるデータ型変換回路に関
し、 回路規模を小さくすることを目的とし、入力データの符
号に応じて、人力データに対する2の補数への変換処理
を行なう2の補数生成手段と、入力データに基づいて浮
動小数点数を固定小数点数に変換する際の第1桁移動数
を生成する第1桁移動数生成手段と、2の補数生成手段
の出力に基づいて固定小数点数を浮動小数点数に変換す
る際の第2桁移動数を生成する第2桁移動数生成手段と
、第1桁移動数と第2桁移動数との何れか一方を選択す
る選択手段と、選択手段の出力に基づいて2の補数生成
手段の出力に対する桁移動処理を行なう桁移動手段と、
第2桁移動数に基づいて浮動少数点数の指数部を生成す
る指数部生成手段とを備えるように構成する。
[Detailed Description of the Invention] [Summary] For example, regarding a data type conversion circuit in digital signal processing, the purpose of reducing the circuit scale is to convert human data into two's complement according to the sign of input data. a two's complement generation means for generating a first digit shift number when converting a floating point number into a fixed point number based on input data; and an output of the two's complement generation means. Select either a second digit shift number generation means for generating a second digit shift number when converting a fixed-point number to a floating point number based on , and a first digit shift number or a second digit shift number. digit shifting means for performing digit shifting processing on the output of the two's complement generating means based on the output of the selecting means;
and exponent part generation means for generating an exponent part of a floating point number based on the second digit shift number.

〔産業上の利用分野] 本発明は、例えばデジタル信号処理におけるデータ型変
換回路に関するものである。
[Industrial Field of Application] The present invention relates to a data type conversion circuit in, for example, digital signal processing.

本明細書において、仮数部と指数部とからなる浮動小数
点型の数値を浮動小数点数と称する。また、固定小数点
型の数値を固定小数点数と称する。
In this specification, a floating-point number consisting of a mantissa and an exponent is referred to as a floating-point number. Furthermore, a fixed-point type numerical value is called a fixed-point number.

〔従来の技術〕[Conventional technology]

デジタル信号処理を行なう装置においては、数値データ
の表現方法(データ型)として、固定小数点型とともに
浮動小数点型が用いられている。
In devices that perform digital signal processing, both fixed-point and floating-point types are used as representation methods (data types) for numerical data.

以後、固定小数点型の数値データをFIXデータ。From now on, fixed-point numerical data will be converted to FIX data.

浮動小数点型の数値データをFLPデータと称する。Floating point type numerical data is called FLP data.

このようなFIXデータとFLPデータとを用いる装置
においては、FIXデータからFLPデータへの変換と
FLPデータからFIXデータへの変換を行なうデータ
型変換回路が必要となる。
An apparatus using such FIX data and FLP data requires a data type conversion circuit that converts FIX data to FLP data and FLP data to FIX data.

第4図(a)は従来のFIXデータからFLPデータへ
の変換回路である。
FIG. 4(a) shows a conventional conversion circuit from FIX data to FLP data.

第4図(a)において、導入されたFIXデータは、2
の補数生成回路411により2の補数型から絶対値型に
変換される。この2の補数生成回路411の出力データ
に基づいて、プライオリティエンコーダ(PE)413
によりFIXデータをFLPデータに変換する際の桁移
動数が生成される。
In Figure 4(a), the introduced FIX data is 2
The complement generation circuit 411 converts the two's complement type into the absolute value type. Based on the output data of this two's complement generation circuit 411, a priority encoder (PE) 413
The number of digit shifts when converting FIX data to FLP data is generated.

シフト回路412により、2の補数生成回路411の出
力データがこの桁移動数分だけ桁移動(シフト)されて
、FLPデータの仮数部が生成され、また、PE413
の出力に基づいて、加算回路414によりF L Pデ
ータの指数部が生成される。
The shift circuit 412 shifts (shifts) the output data of the two's complement generation circuit 411 by the number of digit shifts to generate the mantissa part of the FLP data.
Based on the output of , the adder circuit 414 generates the exponent part of the F LP data.

第4図(ロ)は従来のFLPデータからF■Xデータデ
ータへの変換回路である。
FIG. 4(b) shows a conventional conversion circuit from FLP data to FIX data.

第4図[有]ンにおいて、FLPデータの指数部は加算
回路422に導入され、仮数部はシフト回路421に導
入されている。FLPデータの指数部に基づいて、加算
回路422によりFLPデータをFIXデータに変換す
る際の桁移動数が生成され、この桁移動数に基づいて、
シフト回路421によりFLPデータの仮数部がシフト
されて、絶対値型のFIXデータが得られる。導入され
たF L Pデータが負の数であった場合は、この絶対
値型のFIXデータを2の補数生成面Flf!I423
により、2の補数型に変換することによりFIXデータ
が得られる。
In FIG. 4, the exponent part of the FLP data is introduced into an adder circuit 422, and the mantissa part is introduced into a shift circuit 421. Based on the exponent part of the FLP data, the adder circuit 422 generates the number of digit shifts when converting FLP data to FIX data, and based on this number of digit shifts,
The mantissa part of the FLP data is shifted by the shift circuit 421 to obtain absolute value type FIX data. If the introduced FLP data is a negative number, this absolute value type FIX data is converted into a two's complement generation surface Flf! I423
FIX data can be obtained by converting to two's complement type.

〔発明が解決しようとする課題) ところで、上述した従来方式にあっては、F■Xデータ
からFLPデータへの変換とFLPデータからFIXデ
ータへの変換とが、個別の回路によって行なわれている
[Problems to be Solved by the Invention] By the way, in the conventional method described above, the conversion from FIX data to FLP data and the conversion from FLP data to FIX data are performed by separate circuits. .

このため、2の補数生成回路およびシフト回路がそれぞ
れの変換回路に備えられているので、回路規模が大きい
という問題点があった。
Therefore, since each conversion circuit is provided with a two's complement generation circuit and a shift circuit, there is a problem that the circuit scale is large.

本発明は、このような点にかんがみて創作されたもので
あり、回路規模を小さくするようにしたデータ型変換回
路を提供することを目的としている。
The present invention was created in view of these points, and an object of the present invention is to provide a data type conversion circuit whose circuit scale is reduced.

〔課題を解決するための手段] 第1図は、本発明のデータ型変換回路の原理ブロック図
である。
[Means for Solving the Problems] FIG. 1 is a block diagram of the principle of a data type conversion circuit of the present invention.

図において、2の補数生成手段111は、入力データの
符号に応じて、入力データに対する2の補数への変換処
理を行なう。
In the figure, two's complement generation means 111 converts input data into two's complement according to the sign of the input data.

第1桁移動数生成手段121は、入力データに基づいて
、浮動小数点数を固定小数点数に変換する際の第1桁移
動数を生成する。
The first digit shift number generating means 121 generates a first digit shift number when converting a floating point number into a fixed point number based on input data.

第2桁移動数生成手段122は、2の補数生成手段11
1の出力に基づいて、固定小数点数を浮動小数点数に変
換する際の第2桁移動数を生成する。
The second digit movement number generation means 122 is the two's complement generation means 11
Based on the output of 1, a second digit shift number is generated when converting a fixed point number to a floating point number.

選択手段132は、第1桁移動数と第2桁移動数との何
れか−・方を選択する。
The selection means 132 selects either the first digit movement number or the second digit movement number.

桁移動手段131は、選択手段132の出力に基づいて
2の補数生成手段111の出力に対する桁移動処理を行
なう。
The digit shifting means 131 performs digit shifting processing on the output of the two's complement generation means 111 based on the output of the selection means 132.

指数部生成手段141は、第2桁移動数に基づいて浮動
少数点数の指数部を生成する。
The exponent part generating means 141 generates the exponent part of the floating point number based on the second digit shift number.

〔作 用〕[For production]

入力データの符号に基づいて、2の補数生成手段111
により入力データに対して2の補数への変換処理が行な
われる。この2の補数生成手段111の出力に基づいて
、第2桁移動数生成手段122により固定小数点数を浮
動小数点数に変換する際の第2桁移動数が生成される。
Two's complement generation means 111 based on the sign of input data
The input data is converted into a two's complement number. Based on the output of the two's complement generation means 111, the second digit shift number generation means 122 generates the second digit shift number when converting a fixed point number into a floating point number.

また、入力データに基づいて、第1桁移動数生成手段1
21により浮動小数点数を固定小数点数に変換する際の
第1桁移動数が生成され、選択手段132によりこの第
1桁移動数と第2桁移動数との何れか一方が選択される
Also, based on the input data, the first digit movement number generating means 1
21 generates the first digit shift number when converting a floating point number into a fixed point number, and the selection means 132 selects either the first digit shift number or the second digit shift number.

例えば、浮動少数点数から固定少数点数への変換の場合
は選択手段132により第1桁移動数が選択される。一
方、固定小数点数から浮動小数点数への変換の場合は選
択手段132により第2桁移動数が選択される。
For example, in the case of conversion from a floating point number to a fixed point number, the selection means 132 selects the first digit shift number. On the other hand, in the case of conversion from a fixed point number to a floating point number, the selection means 132 selects the second digit shift number.

この選択手段132の出力に基づいて、桁移動手段13
1により2の補数生成手段111の出力の桁移動処理が
行なわれる。
Based on the output of this selection means 132, the digit moving means 13
1 performs digit shift processing on the output of the two's complement generation means 111.

また、第2桁移動数に基づいて、指数部生成手段141
により浮動小数点数の指数部が生成される。
Also, based on the number of second digit movements, the exponent part generation means 141
generates the exponent part of a floating point number.

本発明にあっては、入力データとして導入された浮動少
数点数は、桁移動手段131により第1桁移動数分だけ
桁移動されて固定小数点数に変換される。一方、固定少
数点数は、桁移動手段131により第2桁移動数分だけ
桁移動されて浮動少数点数の仮数部に変換され、指数部
生成手段141により第2桁移動数に基づいて指数部が
生成される。
In the present invention, a floating point number introduced as input data is converted into a fixed point number by being shifted by the first digit shift number by the digit shift means 131. On the other hand, the fixed decimal point number is converted into a mantissa part of a floating point number by shifting the digits by the second digit shift number by the digit shift means 131, and the exponent part is converted by the exponent part generation means 141 based on the second digit shift number. generated.

このように、2の補数生成手段111と桁移動手段13
1とを共用して、浮動小数点数と固定小数点数とを相互
に変換することが可能である。
In this way, the two's complement generating means 111 and the digit moving means 13
1 can be used to mutually convert floating point numbers and fixed point numbers.

〔実施例] 以下、図面に基づいて本発明の実施例について詳細に説
明する。
[Example] Hereinafter, an example of the present invention will be described in detail based on the drawings.

第2図は、本発明の一実施例におけるデータ型変換回路
の構成を示す。
FIG. 2 shows the configuration of a data type conversion circuit in one embodiment of the present invention.

の ここで、本発明の実施例と第1図との対応関係を示して
おく。
Here, the correspondence relationship between the embodiment of the present invention and FIG. 1 will be shown.

2の補数生成手段111は、2の補数生成回路211に
相当する。
The two's complement generation means 111 corresponds to the two's complement generation circuit 211.

第1桁移動数生成手段121は、加算回路221に相当
する。
The first digit movement number generation means 121 corresponds to the addition circuit 221.

第2桁移動数生成手段122は、プライオリティエンコ
ーダ(PE)222に相当する。
The second digit movement number generation means 122 corresponds to a priority encoder (PE) 222.

桁移動手段131は、シフト回路231に相当する。The digit moving means 131 corresponds to the shift circuit 231.

選択手段132は、セレクタ232に相当する。The selection means 132 corresponds to the selector 232.

指数部生成手段141は、加算回路241に相当する。The exponent part generation means 141 corresponds to the addition circuit 241.

以上のような対応関係があるものとして、以下本発明の
実施例について説明する。
Examples of the present invention will be described below assuming that the correspondence relationship as described above exists.

■−]引研匪戊 第2図において、実施例によるデータ型変換回路は、導
入された数値データを2の補数に変換する2の補数生成
回路211と、導入された数値データに基づいて第1桁
移動数を生成する加算回路221と、2の補数生成回路
211の出力に基づいて第2桁移動数を生成するプライ
オリティエンコーダ(PE)222と、第1桁移動数と
第2桁移動数との何れか一方を選択するセレクタ232
と、セレクタ232の出力に応じて2の補数生成回路2
11の出力の桁移動処理(シフト)を行なうシフト回路
231と、第2桁移動数に基づいて浮動少数点数の指数
部を生成する加算回路241とで構成されている。
■-] Hikiken Noboru In FIG. 2, the data type conversion circuit according to the embodiment includes a two's complement generation circuit 211 that converts the introduced numerical data into a two's complement, and a two's complement generation circuit 211 that converts the introduced numerical data into a two's complement. An addition circuit 221 that generates a 1-digit shift number, a priority encoder (PE) 222 that generates a 2-digit shift number based on the output of the 2's complement generation circuit 211, and a 1st-digit shift number and a 2nd-digit shift number. a selector 232 for selecting one of the
and the two's complement generation circuit 2 according to the output of the selector 232.
11, and an adder circuit 241 that generates an exponent part of a floating point number based on the second digit shift number.

第3図に数値データ(32ビツト)の例を示す。FIG. 3 shows an example of numerical data (32 bits).

第3図(a)に示すように、固定小数点数の数値データ
(FIXデータ)は、符号ビット(第31ビット)と2
の補数型の数値データ(第Oビット〜第30ビット)と
で構成されている。
As shown in Figure 3(a), fixed-point numerical data (FIX data) consists of a sign bit (31st bit) and a 2nd bit.
It is composed of complement type numerical data (0th bit to 30th bit).

一方、第3図(b)に示すように、浮動小数点型の数値
データ(FLPデータ)は、符号ビット(第31ビツト
)と、指数部(第23ビツト〜第30ビツト)と、絶対
値型の仮数部(第0ビツト〜第22ビツト)とで構成さ
れている。
On the other hand, as shown in Figure 3(b), floating point type numerical data (FLP data) consists of a sign bit (31st bit), an exponent part (23rd bit to 30th bit), and an absolute value type. The mantissa part (0th bit to 22nd bit) of

第2図の加算回路221には、32ビツトの入力データ
のFLPデータの指数部に対応する部分(第23ビツト
〜第30ビツト)が導入されており、2の補数生成回路
211には入力データの第0ビツト〜第31ピントが導
入されている。
The adder circuit 221 in FIG. 2 has a part (23rd bit to 30th bit) corresponding to the exponent part of the FLP data of the 32-bit input data, and the 2's complement generator 211 has a part corresponding to the exponent part of the FLP data. The 0th bit to the 31st focus are introduced.

また、セレクタ232と2の補数生成回路211とには
、制御部(図示せず)により切換信号Sが供給されてい
る。この切換信号Sは、入力データのデータ型に対応し
ており、例えば、切換信号Sが1″のときは入力データ
がFLPデータである場合に対応し、一方、“0′°の
ときは入力データがFIXデータである場合に対応する
Further, a switching signal S is supplied to the selector 232 and the two's complement generation circuit 211 by a control section (not shown). This switching signal S corresponds to the data type of the input data. For example, when the switching signal S is 1", it corresponds to the case where the input data is FLP data, and on the other hand, when it is "0'°, it corresponds to the case where the input data is FLP data. This corresponds to the case where the data is FIX data.

セレクタ232は、この切換信号Sが1”のときは第1
桁移動数を選択し、′°0°°のときは第2桁移動数を
選択するように構成されている。
When the switching signal S is 1'', the selector 232 selects the first
The number of digit shifts is selected, and when it is '°0°°, the second digit shift number is selected.

また、2の補数生成回路211は、この切換信号Sが°
“1°゛のときは第0ビツト〜第22ビツトに対して2
の補数への変換処理を行ない、“0″′のときは第Oビ
ット〜第30ビットに対して変換処理を行なうように構
成されている。
Further, the two's complement generation circuit 211 is configured so that the switching signal S is
“1°” means 2 for the 0th bit to the 22nd bit.
When the value is "0'', the conversion process is performed on the Oth bit to the 30th bit.

、JLl格劃4側■作 以下、第2図に示した実施例によるデータ型変換回路の
動作をFLPデータからF■Xデータへの変換動作とF
IXデータからFLPデータへの変換動作とに分けて説
明する。
, JLl Case 4 side ■ Work Below, the operation of the data type conversion circuit according to the embodiment shown in FIG. 2 is explained as the conversion operation from FLP data to F
The operation of converting IX data to FLP data will be explained separately.

i  FLPデータからFIXデー への飲作 FLPデータからFIXデータへの変換を行なう場合、
上述した切換信号Sは′″l”°である。
i From FLP data to FIX data When converting FLP data to FIX data,
The above-mentioned switching signal S is ``''l''°.

このとき、2の補数生成回路211は、入力データの符
号ビットを参照し、負の数であった場合は入力データの
仮数部(第0ビツト〜第22ビツト)を2の補数に変換
する。
At this time, the two's complement generation circuit 211 refers to the sign bit of the input data, and if it is a negative number, converts the mantissa part (0th bit to 22nd bit) of the input data into a two's complement number.

一方、加算回路221は、入力データの指数部(第23
ビツト〜第30ビツト)に所定の数値を加算することに
より第1桁移動数を生成する。
On the other hand, the adder circuit 221 adds the exponent part (the 23rd
The first digit shift number is generated by adding a predetermined numerical value to the bits (bit to 30th bit).

切換信号Sは“1”であるので、セレクタ232により
この第1桁移動数が選択され、シフト回路231に供給
される。
Since the switching signal S is "1", the selector 232 selects this first digit shift number and supplies it to the shift circuit 231.

シフト回路231は、この第1桁移動数の分だけ2の補
数生成回路211の出力をシフトして、FIXデータの
第Oビット〜第30ビットとして出力する。
The shift circuit 231 shifts the output of the two's complement generation circuit 211 by the number of first digit shifts and outputs it as the Oth bit to the 30th bit of the FIX data.

このように、2の補数生成回路211により入力データ
の仮数部に対して2の補数への変換処理を行なった後に
、シフト回路231により第1桁移動数の分だけシフト
することにより、従来の回路と同じようにFLPデータ
はFIXデータに変換することができる。
In this way, after the 2's complement generation circuit 211 converts the mantissa part of the input data into a 2's complement, the shift circuit 231 shifts it by the number of first digit shifts. Just like circuits, FLP data can be converted to FIX data.

1iFIX”−”−からFLPデータへの動作 FIXデータからFLPデータへの変換を行なう場合は
切換信号Sはパ0°′である。
1i Operation from FIX"-"- to FLP data When converting FIX data to FLP data, the switching signal S is 0°'.

このとき、2の補数生成回路211においては、入力デ
ータの符号ビットに基づいて、負の数であった場合は、
その第0ビツト〜第30ビツトに対して2の補数への変
換処理を行ない、絶対値型に変換する。
At this time, in the two's complement generation circuit 211, based on the sign bit of the input data, if the number is negative,
The 0th to 30th bits are converted into two's complement numbers and converted into absolute value type.

PE222は、まず、この2の補数生成回路211の出
力のビット列から°′0゛′でない最上位ビットを検出
する。次に、PE222は、この′0″゛でない最上位
ビットがFLPデータの仮数部の最上位ビット(例えば
第22ビツト)になるように第2桁移動数を生成する。
The PE 222 first detects the most significant bit that is not 0'0' from the bit string output from the 2's complement generation circuit 211. Next, the PE 222 generates a second digit shift number such that the most significant bit that is not '0'' becomes the most significant bit (for example, the 22nd bit) of the mantissa part of the FLP data.

切換信号Sは“O++であるので、セレクタ232によ
りこの第2桁移動数が選択され、シフト回路231に供
給される。
Since the switching signal S is “O++,” this second digit shift number is selected by the selector 232 and supplied to the shift circuit 231.

シフト回路231は、この第2桁移動数の分だけ2の補
数生成回路211の出力をシフトして、このシフトの結
果の第0ビット〜第22ビットがFLPデータの仮数部
として出力される。
The shift circuit 231 shifts the output of the two's complement generation circuit 211 by the number of second digit shifts, and the 0th to 22nd bits as a result of this shift are output as the mantissa part of the FLP data.

一方、加算回路241は、PE222の出力に所定の数
を加算して、FLPデータの指数部を生成する。
On the other hand, the adder circuit 241 adds a predetermined number to the output of the PE 222 to generate an exponent part of the FLP data.

■ −の とめ 上述したように、切換信号Sに応じて、セレクタ232
は第1桁移動数と第2桁移動数との何れか一方を選択す
る。また、シフト回路231は、このセレクタ232の
出力に応じて、2の補数生成回路211による2の補数
への変換処理の結果をシフトする。
■ Stop of - As mentioned above, the selector 232
selects either the first digit movement number or the second digit movement number. Further, the shift circuit 231 shifts the result of the conversion process into a two's complement number by the two's complement generation circuit 211 according to the output of the selector 232.

このようにして、入力データがFIXデータであるかF
LPデータであるかに基づいて、回路の動作を切り換え
ることにより、FLPデータとFIxデータとを相互に
変換することができる。
In this way, whether the input data is FIX data or
By switching the operation of the circuit based on whether the data is LP data or not, it is possible to mutually convert FLP data and FIx data.

これにより、従来の方式において重複していた2の補数
生成回路とシフト回路とを共用することが可能となるの
で、回路規模を小さくすることができる。
This makes it possible to share the two's complement generation circuit and the shift circuit, which were duplicated in the conventional system, so that the circuit scale can be reduced.

例えば、数値データが第3図に示したような構成となっ
ている場合は、実施例の回路の規模は、従来の回路のほ
ぼ2/3の回路規模となる。
For example, when the numerical data has a configuration as shown in FIG. 3, the circuit size of the embodiment is approximately two-thirds that of the conventional circuit.

v rIのりと なお、上述した本発明の実施例にあっては、32ビツト
の浮動小数点数と固定小数点数との間でデータ型を相互
に変換する場合を考えたが、数値データのビット数に制
限はない。また、浮動小数点数の指数部および仮数部に
割り当てられるビット数にも限定されない。
Note that in the embodiment of the present invention described above, a case was considered in which the data type was mutually converted between a 32-bit floating point number and a fixed point number, but the number of bits of numerical data There are no restrictions. Furthermore, the number of bits allocated to the exponent and mantissa parts of a floating point number is not limited.

更に、rI、実施例と第1図との対応関係」において、
本発明と実施例との対応関係を説明しておいたが、これ
に限られることはなく、本発明には各種の変形態様があ
ることは当業者であれば容易に推考できるであ、ろう。
Furthermore, in "correspondence between rI, Examples and FIG. 1",
Although the correspondence between the present invention and the embodiments has been explained, those skilled in the art can easily imagine that the present invention is not limited to this and that there are various modifications. .

〔発明の効果〕〔Effect of the invention〕

上述したように、本発明によれば、2の補数生成手段と
桁移動手段とを共用して、浮動少数点数と固定小数点数
とを相互に変換することが可能となり、回路規模を小さ
くすることができるので、実用的には掻めて有用である
As described above, according to the present invention, it is possible to mutually convert floating point numbers and fixed point numbers by sharing the two's complement generating means and the digit shifting means, thereby reducing the circuit scale. This is very useful in practical terms.

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

第1図は本発明のデータ型変換回路の原理ブロック図、 第2図は本発明の一実施例によるデータ型変換回路の構
成図、 第3図は数値データの例を示す図、 第4図は従来のデータ型変換回路の説明図である。 E)、 231.412,421はシフト回路、232はセレク
タである。 図において、 111は2の補数生成手段、 121は第1桁移動数生成手段、 122は第2桁移動数生成手段、 131は桁移動手段、 132は選択手段、 141は指数部生成手段、 211.411,423は2の補数生成回路、221.
241,414.422は加算回路、222.413は
プライオリティエンコーダ(P(a) (b) 入力テ゛−夕 A(ンンぢ 日F] のん、哩フ加ヅク回 (晃0〜yA30巳゛、往) 数イ直デ′−フ の否1コを1.1□□□第3図 り施例 の 講我回
Fig. 1 is a principle block diagram of a data type conversion circuit according to the present invention, Fig. 2 is a configuration diagram of a data type conversion circuit according to an embodiment of the present invention, Fig. 3 is a diagram showing an example of numerical data, and Fig. 4 is an explanatory diagram of a conventional data type conversion circuit. E), 231, 412 and 421 are shift circuits, and 232 is a selector. In the figure, 111 is a two's complement generation means, 121 is a first digit movement number generation means, 122 is a second digit movement number generation means, 131 is a digit movement means, 132 is a selection means, 141 is an exponent part generation means, 211 .411, 423 are two's complement generation circuits, 221.
241,414.422 is an adder circuit, 222.413 is a priority encoder (P(a) (b) 1.1 □□□ Lecture on the third example

Claims (1)

【特許請求の範囲】[Claims] (1)入力データの符号に応じて、前記入力データに対
する2の補数への変換処理を行なう2の補数生成手段(
111)と、 前記入力データに基づいて、浮動小数点数を固定小数点
数に変換する際の第1桁移動数を生成する第1桁移動数
生成手段(121)と、 前記2の補数生成手段(111)の出力に基づいて、固
定小数点数を浮動小数点数に変換する際の第2桁移動数
を生成する第2桁移動数生成手段(122)と、 前記第1桁移動数と前記第2桁移動数との何れか一方を
選択する選択手段(132)と、 前記選択手段(132)の出力に基づいて前記2の補数
生成手段(111)の出力に対する桁移動処理を行なう
桁移動手段(131)と、 前記第2桁移動数に基づいて浮動少数点数の指数部を生
成する指数部生成手段(141)と、を備えるように構
成したことを特徴とするデータ型変換回路。
(1) Two's complement generation means (
111), first digit shift number generation means (121) for generating a first digit shift number when converting a floating point number into a fixed point number based on the input data, and the two's complement generation means (111); 111), a second digit shift number generating means (122) that generates a second digit shift number when converting a fixed point number to a floating point number; a selection means (132) for selecting either one of the number of digit movements and a digit movement number; and a digit movement means (132) for performing digit movement processing on the output of the two's complement generation means (111) based on the output of the selection means (132). 131); and exponent part generation means (141) for generating an exponent part of a floating point number based on the second digit shift number.
JP63291248A 1988-11-18 1988-11-18 Data type converting circuit Pending JPH02137022A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63291248A JPH02137022A (en) 1988-11-18 1988-11-18 Data type converting circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63291248A JPH02137022A (en) 1988-11-18 1988-11-18 Data type converting circuit

Publications (1)

Publication Number Publication Date
JPH02137022A true JPH02137022A (en) 1990-05-25

Family

ID=17766402

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63291248A Pending JPH02137022A (en) 1988-11-18 1988-11-18 Data type converting circuit

Country Status (1)

Country Link
JP (1) JPH02137022A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002271207A (en) * 2001-03-13 2002-09-20 Asahi Kasei Microsystems Kk Data conversion device, data compression device and data extension device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002271207A (en) * 2001-03-13 2002-09-20 Asahi Kasei Microsystems Kk Data conversion device, data compression device and data extension device
JP4575609B2 (en) * 2001-03-13 2010-11-04 旭化成エレクトロニクス株式会社 Data converter

Similar Documents

Publication Publication Date Title
JP2651267B2 (en) Arithmetic processing device and arithmetic processing method
JPS59149539A (en) Fixed-to-floating point converting device
JP2000347836A (en) High-order radix divider and method therefor
KR19990013698A (en) Calculation method and device
JPH04290122A (en) Numerical expression conversion device
JPH05134851A (en) Multiplying circuit output system
JPS6068433A (en) Parallel multiplier circuit
EP0044450B1 (en) Digital adder circuit
JPH02137022A (en) Data type converting circuit
JPH0346024A (en) Floating point computing element
JPH0149973B2 (en)
JPH0464091B2 (en)
EP0326414B1 (en) High speed multiplier
GB2094525A (en) Programmable read-only memory adder
JPH0869372A (en) Binary multiplier
JPH0251732A (en) Floating point computing element
JPH0216632A (en) Fixed point number/floating point number converting circuit
JPH0448327A (en) Arithmetic unit
JPH07114454A (en) Multiplication circuit and multiplication method
JP2968718B2 (en) Arithmetic unit
JP2890412B2 (en) Code conversion circuit
JPH01176120A (en) Decoder circuit
JPH01276222A (en) Data converter
JPS62147526A (en) Multiplier
JPS60229139A (en) Decimal arithmetic device