JPH0855011A - Method for converting data between different machine kinds - Google Patents
Method for converting data between different machine kindsInfo
- Publication number
- JPH0855011A JPH0855011A JP6206108A JP20610894A JPH0855011A JP H0855011 A JPH0855011 A JP H0855011A JP 6206108 A JP6206108 A JP 6206108A JP 20610894 A JP20610894 A JP 20610894A JP H0855011 A JPH0855011 A JP H0855011A
- Authority
- JP
- Japan
- Prior art keywords
- data
- converted
- conversion
- decimal
- computer
- 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
Links
Landscapes
- Control Of Heat Treatment Processes (AREA)
Abstract
Description
【0001】[0001]
【産業上の利用分野】本発明は、実数型データの内部表
現が異なるコンピュータ間のデータ変換方法に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data conversion method between computers having different internal representations of real number type data.
【0002】[0002]
【従来の技術】従来、プロセスコンピュータ(以降、プ
ロコンと略す)でファイル等に書かれた、図3(a)に
示すような形式のデータを、互換性のない図3(b)に
示すようなIEEE規格によるデータ形式の他のコンピ
ュータで用いようとする場合、実数型データの指数部、
小数部等の内部表現の差異により、直接読み書きするこ
とができない。2. Description of the Related Art Conventionally, data in a format as shown in FIG. 3 (a) written in a file by a process computer (hereinafter abbreviated as "pro computer") is converted into incompatible data as shown in FIG. If you try to use it in another computer with a data format according to the IEEE standard, the exponent part of the real number type data,
It is not possible to read and write directly because of the difference in internal representation such as the decimal part.
【0003】そこで、図4の従来の変換システムのブロ
ック図に示すような構成により、一般的に流用したい実
数型データのファイル42を、一旦プロコン40上で変
換プログラム43によりテキストデータ44に変換して
から、他のコンピュータ41上でそのテキストデータの
ファイル45から変換プログラム46により、再び実数
型データ47に戻す方法が使われている。この場合の変
換は例えば、ファイル45に入力したテキストデータが
“123.4”だったとすれば、左から順番に1を読み
出し次に小数点は存在しないので桁を上げ、次に2を読
み出し同様に小数点を基準に1と2の桁を上げ、次の3
はそのまま読み出し、次の4は小数点の次にあるので桁
を−1乗に下げて、123.4を指数部、小数部で表す
実数データに変換するというような手順である。Therefore, by the configuration shown in the block diagram of the conventional conversion system of FIG. 4, a file 42 of real number type data which is generally desired to be diverted is once converted into text data 44 by a conversion program 43 on the processor 40. Then, a method of returning from the text data file 45 to the real number type data 47 on another computer 41 by the conversion program 46 is used. In this case, for example, if the text data input to the file 45 is “123.4”, 1 is read in order from the left and the decimal point does not exist, so the digit is increased and then 2 is read. Increase the digit of 1 and 2 based on the decimal point, and move to the next 3
Is read as it is, and the next 4 is next to the decimal point, so the digit is lowered to the power of −1, and 123.4 is converted into real number data represented by the exponent part and the decimal part.
【0004】[0004]
【発明が解決しようとする課題】しかしながら、上記の
従来例は、テキストデータという形で広く一般のコンピ
ュータで読み書きできるため汎用性はあるものの、32
ビットコンピュータ上で4バイトで表現可能な実数型デ
ータが、テキストデータに変換する段階で7〜8バイト
となってしまい、ファイル44、45の容量が約2Nと
なり通常の容量Nの倍近い記憶容量を必要とするという
問題がある。However, the above-mentioned conventional example is versatile because it can be widely read and written in the form of text data by general computers.
Real number type data that can be expressed in 4 bytes on a bit computer becomes 7 to 8 bytes at the stage of conversion to text data, and the capacity of the files 44 and 45 is about 2N, which is a storage capacity close to twice the normal capacity N. There is a problem that requires.
【0005】そこで、本発明の目的は、標準形式による
実数型データの内部表現を基にプロコンのデータを直接
他のコンピュータ上で扱える形式に変換することを可能
にして、データ変換に要する記憶容量を削減できる異機
種間データ変換方法を提供することにある。Therefore, an object of the present invention is to make it possible to directly convert the data of the process computer into a format that can be handled by another computer based on the internal representation of the real number type data in the standard format, and the storage capacity required for the data conversion. It is to provide a heterogeneous data conversion method that can reduce
【0006】[0006]
【課題を解決するための手段】上記の目的を達成するた
めに、本発明は、内部表現の差異により互換性のない機
種間のデータ変換方法において、被変換データの指数部
の表現を対応する変換データの指数部の表現に書換える
指数部書換え手段と、前記被変換データの小数部が前記
変換データの小数部と同値となるようにけた数を並べ換
える小数部並べ換え手段を有している。In order to achieve the above object, the present invention addresses the representation of the exponent part of the converted data in a data conversion method between models that are incompatible due to the difference in internal representation. It has exponent part rewriting means for rewriting to the representation of the exponent part of the converted data, and decimal part rearranging means for rearranging the numbers so that the decimal part of the converted data has the same value as the decimal part of the converted data. .
【0007】[0007]
【作用】上記の構成によれば、指数部書換え手段は被変
換データの指数部を変換データの指数部に対応するよう
に書換え、小数部並べ換え手段は被変換データの小数部
を同値となるように変換データの小数部のけた数に並べ
換えるので、被変換データを変換データの表現形式に直
接変換することができる。According to the above construction, the exponent part rewriting means rewrites the exponent part of the converted data so as to correspond to the exponent part of the converted data, and the decimal part rearranging means makes the decimal part of the converted data the same value. Since the converted data is rearranged to the digit of the decimal part, the converted data can be directly converted into the representation format of the converted data.
【0008】[0008]
【実施例】以下、本発明の一実施例を図に基づいて説明
する。図1は本発明の一実施例に係る異機種間データ変
換方法のブロック図である。図2は図1に示す実施例の
変換処理手順を示す図である。An embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram of a heterogeneous data conversion method according to an embodiment of the present invention. FIG. 2 is a diagram showing a conversion processing procedure of the embodiment shown in FIG.
【0009】図1において、プロコン1で作成した被変
換データとなる実数型データのファイル3は、符号S=
1けた(1ビット)、指数部=7ビット、小数部=24
ビット(16進6けた)の表現形式をとる図3(a)の
従来型のものである。In FIG. 1, the file 3 of the real number type data which is the converted data created by the processor 1 has a code S =
1 digit (1 bit), exponent part = 7 bits, decimal part = 24
This is the conventional type shown in FIG. 3 (a), which takes a bit (hexadecimal 6-digit) representation format.
【0010】実数型データファイル3を他コンピュータ
2のファイル4に移し、他コンピュータ2側に収納して
いる変換プログラム5を構成する指数部書換え手段6と
小数部並べ換え手段7により、変換データとなる図3
(b)に示した、他コンピュータ2のIEEE標準によ
る表現形式、符号S=1ビット、指数部=8ビット(2
のべき乗、0〜256)、小数部=23ビット(2進2
3桁)に直接変換し、変換実数型データファイル8に収
納して他コンピュータ2で用いるものである。The real number type data file 3 is transferred to the file 4 of the other computer 2 and converted into the converted data by the exponent part rewriting means 6 and the decimal part rearranging means 7 constituting the conversion program 5 stored in the other computer 2 side. Figure 3
The representation format according to the IEEE standard of the other computer 2 shown in (b), code S = 1 bit, exponent part = 8 bits (2
Exponentiation, 0-256), fraction = 23 bits (binary 2
(3 digits) is directly converted and stored in the converted real number type data file 8 to be used by another computer 2.
【0011】つぎに変換処理の動作について説明する。
被変換データである図3(a)に示したプロコン1の実
数型データは、小数部は正規化された絶対値表示であっ
て、24ビットを4ビットずつまとめた6けた16進表
示であり、指数部は7ビットで0〜127までを表現す
るが64のゲタにより、実際は−64〜63の指数がこ
れにより表現される。また、小数点は小数部の最高けた
左側の位置とされている。Next, the operation of the conversion process will be described.
In the real number type data of the process controller 1 shown in FIG. 3A, which is the data to be converted, the decimal part is a normalized absolute value display and is a 6-digit hexadecimal display in which 24 bits are grouped by 4 bits. , The exponent part expresses 0 to 127 with 7 bits, but exponents of -64 to 63 are actually expressed by this with 64 characters. The decimal point is the leftmost digit of the decimal part.
【0012】このような形式の実数型データファイル4
をIEEE規格に変換するには、図2の変換手順に示す
ように、先ず被変換データの符号部の31ビットが
[0]:正数か、[1]:負数かを調べ、IEEE規格
の変換データの符号部S=31ビットに写す(S2
0)。Real number type data file 4 of such a format
2 is converted to the IEEE standard, as shown in the conversion procedure of FIG. 2, first, it is checked whether 31 bits of the code part of the converted data are [0]: positive number or [1]: negative number, and the IEEE standard The code part of the converted data is copied to S = 31 bits (S2
0).
【0013】続いて指数部書換え手段6により被変換デ
ータの指数部形式、7ビット(0〜127、−64〜6
3)の指数部を、変換データのIEEE規格の指数部形
式、8ビット(0〜256、−127〜128)に書換
える(S21)。Subsequently, the exponent part rewriting means 6 makes the exponent part format of the data to be converted into 7 bits (0 to 127, -64 to 6).
The exponent part of 3) is rewritten into the exponent part format of the IEEE standard of the converted data, which is 8 bits (0 to 256, -127 to 128) (S21).
【0014】この指数部書換えは、例えば、プロコン1
側の指数部の表現が、[1000000=64、011
1111=63]間を表し、IEEE規格の指数部が、
[01111111=127、10000000=12
8]間を表しているものとすれば、その間の書換え処理
である。This rewriting of the exponent part can be performed, for example, by using a computer 1
The expression of the exponent on the side is [1000000 = 64, 011
1111 = 63], and the exponent part of the IEEE standard is
[01111111 = 127, 10000000 = 12
8] is the rewriting process during that period.
【0015】次に、小数部並べ換え手段7により被変換
データの16進6けたの小数部を、同値となるIEEE
規格の小数部の2進数23けたに合わせてビットを並べ
換える。なお、この場合、小数点は小数部の最高けたの
左側位置であり、小数点の左側に想定されるビットが常
に1になる正規化表現に留意する(S22)。Next, the decimal part rearrangement means 7 makes the hexadecimal 6-digit decimal part of the data to be converted into the IEEE equivalent.
The bits are rearranged according to the 23-digit binary number in the decimal part of the standard. Note that in this case, the decimal point is the leftmost position of the decimal part, and the normalized expression in which the bit assumed on the left side of the decimal point is always 1 is noted (S22).
【0016】この並べ換えは、単純に16進〜2進間
の、例えば、16進数[3CFH]を2進数[1111
001111]とするようなけた並べ換えを、16進数
6けたと2進数23けた間で行う。This rearrangement is simply performed between hexadecimal and binary, for example, hexadecimal [3CFH] is converted into binary [1111].
[001111] is rearranged between 6 hexadecimal digits and 23 binary digits.
【0017】こうしてIEEE規格に変換した実数デー
タはファイル8に収納し、他コンピュータ2上で使用さ
れることになる。The real number data thus converted to the IEEE standard is stored in the file 8 and used on another computer 2.
【0018】このように本実施例では、図4に示した従
来例に比較して、プロコン1と他コンピュータ2間の変
換処理に要する変換プログラムは、他コンピュータ2側
の変換プログラム5だけで済み、記憶容量もプロコン1
側で容量2Nのテキストデータ用44が不要になり、他
コンピュータ2側でも容量2Nから容量Nに減らせるの
で、データ変換処理に要する記憶容量を大幅に削減する
ことができる。As described above, in this embodiment, as compared with the conventional example shown in FIG. 4, the conversion program required for the conversion processing between the computer 1 and the other computer 2 is only the conversion program 5 on the other computer 2 side. , Memory capacity is also PROCON 1
Since the text data 44 of the capacity 2N is unnecessary on the side, and the capacity of the other computer 2 can be reduced from the capacity 2N to the capacity N, the storage capacity required for the data conversion processing can be significantly reduced.
【0019】また、簡単で且つデータ落等がない信頼性
が保証される手法でIEEE標準規格の表現形式に変換
できるので、この場合の変換プログラム5をFD等の外
部記憶装置に収納して単体で可搬可能なように構成すれ
ば、従来のIBM系等のコンピュータとIEEE規格の
標準型コンピュータが混在する最近特に増加している環
境においてシステムの稼働性が向上する。Further, the conversion program 5 in this case can be stored in an external storage device such as an FD or the like because it can be converted into the representation format of the IEEE standard by a simple and reliable method without data loss. If it is configured so as to be portable, the system operability is improved in an environment where the number of computers of the conventional IBM system and the standard type computer of the IEEE standard are mixed, and the number of computers is increasing recently.
【0020】[0020]
【発明の効果】以上、説明したように、本発明の異機種
間データ変換方法は、実数型データ等の内部表現の差異
により互換性のない機種間のデータ変換において、被変
換データの指数部の表現を対応する変換データの指数部
の表現に書換える指数部書換え手段と、被変換データの
小数部が変換データの小数部と同値になるようけた数を
並べ換える小数部並べ換え手段を有しているので、変換
プログラムが1つで済みプロコンと他コンピュータ間で
テキストデータを作成する必要が無くなり、変換に要す
るディスク容量も削減できるものである。As described above, according to the data conversion method between different models of the present invention, the exponent part of the converted data is used in the data conversion between the models which are not compatible due to the difference in the internal representation of the real number type data. Exponent part rewriting means for rewriting the expression of the exponent part of the corresponding converted data, and decimal part rearranging means for rearranging the number of digits so that the decimal part of the converted data has the same value as the decimal part of the converted data. Therefore, only one conversion program is required, and there is no need to create text data between the process computer and another computer, and the disk capacity required for conversion can be reduced.
【図1】本発明の一実施例に係る異機種間データ変換方
法のブロック図である。FIG. 1 is a block diagram of a heterogeneous data conversion method according to an embodiment of the present invention.
【図2】図1に示す実施例の変換処理手順を示す図であ
る。FIG. 2 is a diagram showing a conversion processing procedure of the embodiment shown in FIG.
【図3】従来のプロセスコンピュータのファイル内のデ
ータの形式を示す図である。FIG. 3 is a diagram showing a format of data in a file of a conventional process computer.
【図4】従来の変換システムのブロック図である。FIG. 4 is a block diagram of a conventional conversion system.
1 プロセスコンピュータ 2 他コンピュータ 3,4 実数型デ−タファイル 5 変換プログラム 6 指数部書換え手段 7 小数部並べ換え手段 8 変換実数型データファイル 1 process computer 2 other computer 3,4 real number type data file 5 conversion program 6 exponent part rewriting means 7 fractional part rearranging means 8 conversion real number type data file
Claims (1)
間のデータ変換方法において、 被変換データの指数部の表現を対応する変換データの指
数部の表現に書換える指数部書換え手段と、前記被変換
データの小数部が前記変換データの小数部と同値となる
ようにけた数を並べ換える小数部並べ換え手段を有する
ことを特徴とする異機種間データ変換方法。1. An exponent part rewriting means for rewriting the exponent part of the converted data to the corresponding exponent part of the converted data in a data conversion method between models that are incompatible due to a difference in internal representation. A heterogeneous data conversion method comprising a decimal part rearranging means for rearranging digits so that the decimal part of the converted data has the same value as the decimal part of the converted data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP6206108A JPH0855011A (en) | 1994-08-09 | 1994-08-09 | Method for converting data between different machine kinds |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP6206108A JPH0855011A (en) | 1994-08-09 | 1994-08-09 | Method for converting data between different machine kinds |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH0855011A true JPH0855011A (en) | 1996-02-27 |
Family
ID=16517941
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP6206108A Withdrawn JPH0855011A (en) | 1994-08-09 | 1994-08-09 | Method for converting data between different machine kinds |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH0855011A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR100345401B1 (en) * | 1999-10-19 | 2002-07-26 | 한국전자통신연구원 | Method and apparatus for binary program translation |
-
1994
- 1994-08-09 JP JP6206108A patent/JPH0855011A/en not_active Withdrawn
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR100345401B1 (en) * | 1999-10-19 | 2002-07-26 | 한국전자통신연구원 | Method and apparatus for binary program translation |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP1717719A1 (en) | Application conversion of source data | |
CN113366436A (en) | Compress/decompress instruction for designating history buffer zone to be used in data compress/decompress | |
JP2022521465A (en) | Overflow management methods, systems, programs for memory boundary containment | |
JPH034936B2 (en) | ||
JPH0855011A (en) | Method for converting data between different machine kinds | |
JPH10247165A (en) | Method and device for data writing in write-compensation-frequency limited memory | |
JPH08202529A (en) | Method and device for data processing | |
JPS58137064A (en) | Address extension system | |
JPS5821299B2 (en) | memory | |
JP2507399B2 (en) | Database equipment | |
JPH0283619A (en) | Random data generation circuit | |
JP2001282777A (en) | Document form transforming device and recording medium with document form transforming program recorded thereon | |
JPH01290026A (en) | Rom production system | |
JP2658097B2 (en) | Secondary file creation method | |
JPH0528156A (en) | Document data converter | |
JP2764024B2 (en) | Storage device table indexing method and indexing device | |
JP3474347B2 (en) | Instruction decoding unit of microcomputer | |
JPH0642220B2 (en) | Protocol data unit processing computer | |
JPH01290027A (en) | Rom production system | |
JPS59163638A (en) | Setting system of register | |
JPH09244904A (en) | Virtual code translation system and virtual machine system | |
JPS6235151B2 (en) | ||
JPH08263264A (en) | Data processor | |
JPS62271278A (en) | Cd-rom device | |
JPH08305686A (en) | Character processor |
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: 20011106 |