JPH01217622A - Conversion system for expression of floating point - Google Patents
Conversion system for expression of floating pointInfo
- Publication number
- JPH01217622A JPH01217622A JP63045112A JP4511288A JPH01217622A JP H01217622 A JPH01217622 A JP H01217622A JP 63045112 A JP63045112 A JP 63045112A JP 4511288 A JP4511288 A JP 4511288A JP H01217622 A JPH01217622 A JP H01217622A
- Authority
- JP
- Japan
- Prior art keywords
- expression
- converted
- value
- conversion
- hardware
- 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
Links
- 238000006243 chemical reaction Methods 0.000 title claims abstract description 16
- 238000000034 method Methods 0.000 claims description 9
- 238000010586 diagram Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 1
Abstract
Description
【発明の詳細な説明】
〔産業上の利用分野〕
この発明はコンピュータで扱う数値の内部表現に関する
ものである。DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] This invention relates to the internal representation of numerical values handled by a computer.
浮動小数点の表現方法はハードウェアごとに異なってい
るため異なるハードウェア間で数値の転送を行う場合、
転送後の数値が転送前の数値とは違うものとして解釈さ
れる場合がある。The representation method of floating point numbers differs depending on the hardware, so when transferring numbers between different hardware,
The numbers after transfer may be interpreted as different from the numbers before transfer.
このため、浮動小数点の表現方法が異なったハードウェ
ア間でデータを転送する場合は、その各々のハードウェ
アに準じてプログラマが表現の変換のプログラムを作成
していた。For this reason, when data is transferred between hardware with different floating point representation methods, a programmer creates a representation conversion program according to each hardware.
従来の浮動小数点表現の変換方式は浮動小数点の表現方
法がハードウェアによって異なっているために、プログ
ラマが各ハードウェアに合わせていちいちプログラムを
作成してそれを実行する必要があシ、このため時間や手
間がかかり、かつそのプログラムには汎用性がないなど
の課題があった。Conventional floating-point representation conversion methods require programmers to create and execute programs for each hardware because the floating-point representation method differs depending on the hardware, which takes time. There were problems such as it was time-consuming and the program lacked versatility.
この発明は上記のような課題を解消するためになされた
もので、変換したい値を限定することなくかつ、短時間
で表現を変換するような浮動小数点表現の変換方式を得
ることを目的とする。This invention was made to solve the above-mentioned problems, and the purpose is to obtain a floating-point representation conversion method that does not limit the value to be converted and can convert the representation in a short time. .
この発明に係る浮動小数点表現の変換方式は変換したい
数値と、その浮動小数点表現のフォーマットと、変換後
の表現のフォーマットを入力することによって、変換後
のデータを求めるようにしたものである。The floating point representation conversion method according to the present invention calculates the converted data by inputting a numerical value to be converted, its floating point representation format, and the converted representation format.
この発明における浮動小数点表現の変換方式は異なる八
−ドウエア間でデータを転送する場合等の浮動小数点表
現の変換を要する際その変換を容易に行うことができる
。The floating-point representation conversion system of the present invention can easily perform floating-point representation conversion when data is transferred between different eight-way hardware.
以下、この発明の一実施例を図について説明する。第1
図において、変換したい値(16進値)と、その表現の
指数部の基数と桁数を読みこみ(ステップ1)、次いで
変換後の表現の指数部の基数と桁数を読みこむ(ステッ
プ2)。変換前の値は10進値では何に相当するのかを
計算する(ステップ3)。求めた値から変換後の表現の
基数をもとに指数部を計算し、続いて仮数部を求める(
ステップ4)。変換後のデータを16進で出力する。An embodiment of the present invention will be described below with reference to the drawings. 1st
In the figure, read the value you want to convert (hexadecimal value) and the base number and number of digits of the exponent part of its expression (step 1), then read the base number and number of digits of the exponent part of the expression after conversion (step 2). ). It is calculated what the value before conversion corresponds to in decimal value (step 3). From the obtained value, calculate the exponent part based on the radix of the converted expression, and then calculate the mantissa part (
Step 4). Output the converted data in hexadecimal.
第2図は具体的な浮動小数点の表現を用いてこの発明の
変換方式の流れを示した説明図である。FIG. 2 is an explanatory diagram showing the flow of the conversion method of the present invention using concrete floating point representation.
図において、変換したい値とそのデータ(財)を10進
表現のに変換し、変換後のフォーマットのに基づき表現
変換を行う〇
〔発明の効果〕
以上のようにこの発明によれは、変換したい浮動小数点
の表現をその表現フォーマットとともに読みこんで求め
る表現フォーマットに変換するこトニよシ、異なるハー
ドウェア間でデータ転送を行う際、そのハードウェアご
とに変換プログラムを作成しなくてもよいという効果が
ある。In the figure, the value to be converted and its data (goods) are converted into decimal representation, and the expression conversion is performed based on the converted format. [Effect of the invention] As described above, according to this invention, the value to be converted is converted into a decimal representation. By reading the floating-point representation along with its representation format and converting it to the desired representation format, there is an advantage that when data is transferred between different hardware, there is no need to create a conversion program for each piece of hardware. There is.
第1図はこの発明の詳細な説明するための流れ図、第2
図はこの発明に係る浮動小数点表現変換方式の一実施例
を説明する説明図である。Figure 1 is a flowchart for explaining the invention in detail;
The figure is an explanatory diagram illustrating an embodiment of the floating-point representation conversion method according to the present invention.
Claims (1)
現を各ハードウェアに即した表現に変換することを特徴
とする浮動小数点表現の変換方式。A conversion method for floating point representation, which is characterized by converting floating point representation, which is the internal representation of real numbers in a computer, into a representation suitable for each hardware.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP63045112A JPH01217622A (en) | 1988-02-26 | 1988-02-26 | Conversion system for expression of floating point |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP63045112A JPH01217622A (en) | 1988-02-26 | 1988-02-26 | Conversion system for expression of floating point |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH01217622A true JPH01217622A (en) | 1989-08-31 |
Family
ID=12710182
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP63045112A Pending JPH01217622A (en) | 1988-02-26 | 1988-02-26 | Conversion system for expression of floating point |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH01217622A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5687106A (en) * | 1995-03-31 | 1997-11-11 | International Business Machines Corporation | Implementation of binary floating point using hexadecimal floating point unit |
US11360769B1 (en) | 2021-02-26 | 2022-06-14 | International Business Machines Corporation | Decimal scale and convert and split to hexadecimal floating point instruction |
US11663004B2 (en) | 2021-02-26 | 2023-05-30 | International Business Machines Corporation | Vector convert hexadecimal floating point to scaled decimal instruction |
-
1988
- 1988-02-26 JP JP63045112A patent/JPH01217622A/en active Pending
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5687106A (en) * | 1995-03-31 | 1997-11-11 | International Business Machines Corporation | Implementation of binary floating point using hexadecimal floating point unit |
US11360769B1 (en) | 2021-02-26 | 2022-06-14 | International Business Machines Corporation | Decimal scale and convert and split to hexadecimal floating point instruction |
US11663004B2 (en) | 2021-02-26 | 2023-05-30 | International Business Machines Corporation | Vector convert hexadecimal floating point to scaled decimal instruction |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JPS6124729B2 (en) | ||
JPH01217622A (en) | Conversion system for expression of floating point | |
JPS6180325A (en) | Information input system of pointing device | |
JPH0789314B2 (en) | Floating point condition code generation method | |
JP2507980B2 (en) | Data conversion program automatic generation method | |
JP2899316B2 (en) | Recognition processing method of code system of caller | |
JPS6275838A (en) | Arithmetic unit for numerical data with variable accuracy | |
JPH03127224A (en) | External name changing system | |
JPS61216038A (en) | System for generating automatically copy-library at converting program | |
Belhamel et al. | Model-Based Design for high performance devices oriented to advanced smart solutions | |
JPS6155738A (en) | Determining system of operation mode | |
JPH01276222A (en) | Data converter | |
JPS6232557A (en) | Communication protocol converter | |
JPS61210426A (en) | Form converting circuit | |
JPH11296510A (en) | Data converting device | |
JPH022423A (en) | Cobol program source conversion system | |
JPH04248624A (en) | Program conversion processor | |
JPH09171467A (en) | Emulation device and method therefor | |
JPH02284225A (en) | Arithmetic processor | |
JPS62160536A (en) | Cobol syntax converting method | |
JPH04120632A (en) | Logic analyzer | |
Wong | A high-speed hardware unit for a subset of logic resolution | |
JPS6316330A (en) | String converting system | |
JPH02110764A (en) | Internal data format converting processing system in multi-system capable of cooperation processing | |
JPS61666U (en) | Vector index generation processing device |