JPH03263218A - Data form converting system and pack form data arithmetic system - Google Patents

Data form converting system and pack form data arithmetic system

Info

Publication number
JPH03263218A
JPH03263218A JP2064739A JP6473990A JPH03263218A JP H03263218 A JPH03263218 A JP H03263218A JP 2064739 A JP2064739 A JP 2064739A JP 6473990 A JP6473990 A JP 6473990A JP H03263218 A JPH03263218 A JP H03263218A
Authority
JP
Japan
Prior art keywords
data
decimal
code
format
held
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
JP2064739A
Other languages
Japanese (ja)
Inventor
Hirokazu Sato
弘和 佐藤
Takeshi Kosuge
健 小菅
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 JP2064739A priority Critical patent/JPH03263218A/en
Publication of JPH03263218A publication Critical patent/JPH03263218A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To simplify the processing by separating and holding the decimal data part and the code part of a pack-form data held in a data holding means. CONSTITUTION:A separating means 121 separates the decimal data part and the code part of pack-form data held in a data holding means 111, and the decimal data part is held in a decimal data holding means 131 with the least significant bit matched to the word boundary or the half-word boundary. The code part is held in a code holding means 141 while including upper bits of one byte. since the decimal data part and the code part of pack-form data are separated and held, only the decimal data part can be processed without paying an especial attention to the code part, and the separated decimal data part is matched to the word or half-word boundary to perform the processing with a word or a half word as the unit, and thus, the processing is simplified.

Description

【発明の詳細な説明】 〔概 要〕 パック形式で表されたデータの形式を変換し、変換後の
データを使用して演算を行うようにしたデータ形式変換
方式及びパック形式データ演算方式に関し、 処理の簡略化を目的とし、 パック形式のデータを保持するデータ保持手段と、デー
タ保持手段に保持されたパック形式〇デ−タが人力され
、このデータに含まれる10進データ部と符号部とを分
離する分離手段と、分離手段で分離した10進データ部
の最下位ビットを語境界または半語境界にあわせて保持
する10進データ保持手段と、分離手段で分離した符号
部を1バイトの上位ビットに含ませて保持する符号保持
手段とを備えるように構成する。10進データ保持手段
及び符号保持手段をパック形式の2つのデータのそれぞ
れに対応させて有し、2つの符号保持手段に保持された
2つの符号部に基づいて、2つの10進データ保持手段
に保持された2つのlO進データ部に対する所定の演算
処理を行う演算手段を備えるように構成する。
[Detailed Description of the Invention] [Summary] Regarding a data format conversion method and a packed format data calculation method that convert the format of data expressed in a packed format and perform calculations using the converted data, For the purpose of simplifying processing, a data holding means for holding data in a packed format, and the packed format 〇 data held in the data holding means are manually input, and the decimal data part and code part included in this data are a decimal data holding means that holds the least significant bit of the decimal data section separated by the separation means along a word boundary or a half-word boundary; and code holding means for holding the code included in the upper bits. It has a decimal data holding means and a code holding means corresponding to each of the two data in the pack format, and the data is stored in the two decimal data holding means based on the two code parts held in the two code holding means. The apparatus is configured to include arithmetic means for performing predetermined arithmetic processing on the two retained lO-adic data parts.

〔産業上の利用分野〕[Industrial application field]

本発明は、パック形式で表されたデータの形式を変換し
、変換後のデータを使用して演算を行うようにしたデー
タ形式変換方式及びパック形式データ演算方式に関する
ものである。
The present invention relates to a data format conversion method and a packed format data calculation method that convert the format of data expressed in a pack format and perform calculations using the converted data.

[従来の技術] 一般に、計算機内部で扱う数値データは固定小数点形式
や浮動小数点形式で表されており、プログラム言語等に
よって特定される形式が使用されている。特に、日常使
用されている10進数の数字は4ビツトで表すことがで
きるので、1ハイドに1桁あるいは2桁の数字を対応さ
せたアンパック形式あるいはパック形式のデータが多用
されている。
[Prior Art] Generally, numerical data handled inside a computer is expressed in a fixed-point format or a floating-point format, and a format specified by a programming language or the like is used. In particular, since decimal numbers in daily use can be expressed in 4 bits, unpacked or packed data in which one digit corresponds to one or two digits is often used.

第8図に、パック形式及びアンパック形式の具体例を示
す。パック形式は、同図(a)に示すように、1バイト
に2桁の10進数を対応させ、符号(「+」を16進数
のCに、「−」を16進数のDに対応させるものとする
)は最下位バイトの下位4ビツトに対応させたものであ
る。また、アンパック形式は、同図(b)に示すように
、1バイトに1桁の10進数を対応させ、符号は最下位
バイトの上位4ビツトに対応させたものである。最下位
バイト以外のバイトの上位4ビツトはゾーン部と称され
、所定のデータ(例えば16進数のF)が挿入される。
FIG. 8 shows specific examples of the packed format and unpacked format. In the pack format, as shown in Figure (a), one byte corresponds to a two-digit decimal number, and the symbols ("+" corresponds to hexadecimal C, and "-" corresponds to hexadecimal D) ) corresponds to the lower 4 bits of the least significant byte. In addition, in the unpack format, as shown in FIG. 4B, one byte corresponds to a one-digit decimal number, and the code corresponds to the upper four bits of the least significant byte. The upper four bits of the bytes other than the least significant byte are called a zone part, into which predetermined data (for example, F in hexadecimal) is inserted.

ところで、パック形式のデータを最下位4ビツトが符号
だと認識していないアーキテクチャで処理する場合、符
号部のみを分離して演算等の処理を行う必要がある。第
9図に、パック形式の2つのデータAI及びA2が入力
されたときに、この2つのデータを加算し、更に加算結
果をアンパック形式に変換する場合の処理の具体例を示
す。以下の■、■等の符号は、第9図内の符号に対応し
ている。
By the way, when data in packed format is processed by an architecture that does not recognize that the lowest four bits are a code, it is necessary to separate only the code part and perform calculations and other processing. FIG. 9 shows a specific example of processing when two data AI and A2 in packed format are input, the two data are added, and the addition result is further converted into unpacked format. The following symbols such as ■, ■, etc. correspond to the symbols in FIG.

■先ず、一方の人力データAl (=01234CH1
ここでHは16進データを表す記号とする)の符号部の
抽出を行う。パック形式の符号部は最下位バイトの下位
4ビツトであるので、最下位バイトを符号部OCRとし
て抽出して退避する。なお、上位4ビツトは符号には関
係ないので固定データOHを挿入しである。
■First, one side of the human power data Al (=01234CH1
Here, H is a symbol representing hexadecimal data). Since the code part in the packed format is the lower 4 bits of the least significant byte, the least significant byte is extracted and saved as the code part OCR. Note that the upper 4 bits are not related to the sign, so fixed data OH is inserted.

■次に、一方の入力データA1の10進データ部012
340Hを抽出する。抽出した1o進データを中間デー
タT1として保持する。
■Next, the decimal data part 012 of one input data A1
Extract 340H. The extracted decimal data is held as intermediate data T1.

■同様に、他方の入力データA2(=01000DH)
の符号部ODHを抽出して退避する。
■Similarly, the other input data A2 (=01000DH)
The code part ODH of is extracted and saved.

■他方の人力データの10進データ部010000Hを
抽出する。抽出した10進データを中間データT2とし
て保持する。
■Extract the decimal data part 010000H of the other human data. The extracted decimal data is held as intermediate data T2.

■次に、2つの入力データの符号判定を行う。(2) Next, the sign of the two input data is determined.

一方の入力データから抽出して退避した符号部(符号1
)と他方の入力データから抽出して退避した符号部(符
号2)が等しいか否かを調べる。
The code part extracted and saved from one input data (code 1
) is equal to the code part (code 2) extracted from the other input data and saved.

■符号判定の結果が真(肯定判断)である場合には、中
間データT1とT2とを加算する。また、符号判定の結
果が偽(否定判断)である場合には、値が大きな中間デ
ータT1から値が小さな中間データT2を減算する。加
減算結果を中間データT3として保持する。
(2) If the result of the sign determination is true (affirmative determination), add intermediate data T1 and T2. Further, if the result of the sign determination is false (negative determination), intermediate data T2 having a small value is subtracted from intermediate data T1 having a large value. The addition/subtraction results are held as intermediate data T3.

■次に、符号部を中間データT3に挿入してパック形式
に戻す。
(2) Next, the code part is inserted into the intermediate data T3 to return it to the packed format.

■更にパック形式の中間データT3をアンパック形式に
変換する場合には、先ず、最下位バイトの上位4ビツト
と下位4ビツトの入れ替えを行う。
(2) Furthermore, when converting the packed intermediate data T3 into an unpacked format, first, the upper 4 bits and lower 4 bits of the least significant byte are exchanged.

■次に、下位2バイト目をアンパック形式に変換する。■Next, convert the lower 2nd byte to unpacked format.

[相]同様に、最上位バイトをアンパック形式に変換す
る。なお、中間データT3の最上位バイトと下位2バイ
ト目の間に半語境界があるため、上述した■及び■の処
理を別々に行う必要がある。
[Phase] Similarly, convert the most significant byte to unpacked format. Note that since there is a half-word boundary between the most significant byte and the second least significant byte of the intermediate data T3, it is necessary to perform the above-mentioned processes ① and ① separately.

には−括して処理できず複数の語あるいは半語に分けて
同一処理を繰り返すことになる。
The words cannot be processed all at once, and the same processing must be repeated for multiple words or half words.

本発明は、このような点にかんがみて創作されたもので
あり、処理を簡略化するようにしたデータ形式変換方式
及びパック形式データ演算方式を提供することを目的と
している。
The present invention was created in view of these points, and an object of the present invention is to provide a data format conversion method and a packed format data calculation method that simplify processing.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

ところで、上述した従来方式にあっては、人力されたパ
ック形式のデータの最下位バイトを特別に意識して演算
やアンパック形式への変換処理を行う必要があり、処理
が複雑になるという問題点があった。
By the way, in the conventional method described above, it is necessary to perform calculations and conversion processing to unpacked format with special attention to the least significant byte of data in packed format manually, which makes the processing complicated. was there.

また、10進データ部は符号に対応した4ビット分が付
加されているため、その分データ長が長くなってデータ
の語境界あるいは半語境界をまたぐ可能性が高くなるの
で、同一処理を繰り返すことになり処理が複雑になると
いう問題点があった。
Also, since 4 bits corresponding to the code are added to the decimal data part, the data length becomes longer and there is a higher possibility that the data will cross word boundaries or half-word boundaries, so the same process is repeated. This poses a problem in that the processing becomes complicated.

一般には語あるいは半語、バイトが処理の単位となるた
め、語境界あるいは半語境界をまたぐ場合〔課題を解決
するための手段〕 第1図は、本発明の原理ブロック図である。
Generally, words, half words, or bytes are the units of processing, so when a word boundary or a half word boundary is crossed [Means for Solving the Problem] FIG. 1 is a block diagram of the principle of the present invention.

Llン工1の ■ 図において、データ保持手段111は、パック形式のデ
ータを保持する。
In Figure 1 of Llin Engineering 1, data holding means 111 holds data in pack format.

分離手段121は、データ保持手段111に保持された
パック形式のデータが人力され、このデータに含まれる
10進データ部と符号部とを分離する。
The separating means 121 receives the packed data held in the data holding means 111 manually and separates the decimal data part and the code part contained in this data.

10進データ保持手段131は、分離手段121で分離
した10進データ部の最下位ビットを語境界または半語
境界にあわせて保持する。
The decimal data holding means 131 holds the least significant bit of the decimal data part separated by the separating means 121 in alignment with word boundaries or half-word boundaries.

符号保持手段141は、分離手段121で分離した符号
部を1バイトの上位ビットに含ませて保持する。
The code holding means 141 stores the code part separated by the separating means 121 by including it in the upper bits of one byte.

従って、全体として、パック形式のデータを10進デー
タと符号とに分離した形式に変換するように横取されて
いる。
Therefore, as a whole, the data in the packed format is intercepted to be converted into a format in which the decimal data and the code are separated.

j  量ン′I2の 日 請求項1の10進データ保持手段131及び符号保持手
段141を6バツク形式の2つのデータのそれぞれに対
応させて有しており、演算手段151は、2つの符号保
持手段141に保持された2つの符号部に基づいて、2
つの10進データ保持手段131に保持された2つの1
0進データ部に対する所定の演算処理を行う。
The decimal data holding means 131 and the code holding means 141 of claim 1 are provided in correspondence with each of the two data in the 6-back format, and the calculation means 151 is provided with two code holding means Based on the two code parts held in the means 141, 2
Two 1s held in one decimal data holding means 131
Performs predetermined arithmetic processing on the 0-decimal data part.

従って、全体として、パック形式のデータから分離した
10進データ部及び符号部に対して演算を行うように横
取されている。
Therefore, as a whole, operations are performed on the decimal data part and the code part separated from the packed data.

〔作 用〕 11ン11の H 分離手段121は、データ保持手段111に保持されて
いるパック形式のデータの10進データ部と符号部を分
離し、この10進データ部は最下位ビットを語境界また
は単語境界にあわせて10進データ保持手段131に保
持される。また、この符号部は1バイトの上位ビットに
含ませて保持される。
[Operation] The H separation means 121 of the 11th line 11 separates the decimal data part and the code part of the packed format data held in the data holding means 111, and this decimal data part has the least significant bit as a word. The data is held in the decimal data holding means 131 in accordance with boundaries or word boundaries. Further, this code part is included and held in the upper bits of one byte.

請求項1のデータ形式変換方式にあっては、パック形式
のデータの10進データ部と符号部を分離して保持する
ことにより、符号部を特に意識せずに10進データ部の
みを処理することが可能になり、また、分離した10進
データ部を語または単語境界にあわせることにより、語
または単語単位での処理が可能になる。
In the data format conversion method according to claim 1, by separately holding the decimal data part and the code part of the packed data, only the decimal data part is processed without being particularly aware of the code part. Furthermore, by aligning the separated decimal data portion with words or word boundaries, it becomes possible to process words or words.

1i11ン1の、B 請求項2においては、2つのパック形式のデータのそれ
ぞれに対応した10進データ部及び符号部を、別個の1
0進データ保持手段131と符号保持手段141に保持
する。演算手段151は、保持されている2つの符号部
に基づいて、保持されている2つの10進データ部に対
する演算処理を行う0例えば、符号を考慮して加算、減
算等の演算処理を行う。
In claim 2, the decimal data part and code part corresponding to each of the data in two pack formats are separated into separate units.
It is held in the 0-base data holding means 131 and the code holding means 141. The arithmetic means 151 performs arithmetic processing on the two held decimal data parts based on the two held code parts. For example, the calculation means 151 performs arithmetic processing such as addition and subtraction in consideration of the signs.

請求項2のパック形式データ演算方式にあっては、請求
項1で分離した10進データ部及び符号部を用いてパッ
ク形式の2つのデータに対する演算処理を行うことによ
り、符号部を意識せず、かつ語または半語単位での演算
が可能になる。
In the packed format data calculation method of claim 2, the decimal data part and the code part separated in claim 1 are used to perform arithmetic processing on two pieces of data in the packed format, without being aware of the code part. , and operations can be performed on a word or half-word basis.

〔実施例〕〔Example〕

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

第2図は、本発明の実施例における計算機システムの構
成を示す。
FIG. 2 shows the configuration of a computer system in an embodiment of the present invention.

第2図において、211は人力データ保持部を、221
はデータ分離部を、231は中間データ保持部を、25
1は演算部を、261はアンパック形式変換部を、26
3及び273は出力データ保持部を、271はデータ合
或部をそれぞれ示している。
In FIG. 2, 211 is a human data storage unit, 221
231 is the data separation unit, 231 is the intermediate data holding unit, 25
1 is the calculation section, 261 is the unpack format conversion section, 26
3 and 273 indicate output data holding sections, and 271 indicates a data combining section, respectively.

第1図に示したデータ保持手段111は入力データ保持
部211に、分離手段121はデータ分離部221に、
10進データ保持手段131及び符号保持手段141は
共に中間データ保持部231に、演算手段151は演算
部251にそれぞれ相当している。
The data holding means 111 shown in FIG.
Both the decimal data holding means 131 and the code holding means 141 correspond to the intermediate data holding section 231, and the calculation means 151 corresponds to the calculation section 251.

入力データ保持部211は人力されるパック形式のデー
タを保持するものであり、データ分離部221は入力デ
ータ保持部211に保持されているパック形式のデータ
の符号部と10進データ部とを分離する。
The input data holding unit 211 holds manually input packed data, and the data separation unit 221 separates the code part and the decimal data part of the packed data held in the input data holding part 211. do.

中間データ保持部231は、データ分離部221で分離
された符号部及び10進データ部を中間データとして保
持するものであり、パック形式データに対する演算処理
やアンパック形式への変換処理等の各種処理はこの保持
された中間データに対して行われる。
The intermediate data holding unit 231 holds the code part and decimal data part separated by the data separation part 221 as intermediate data, and performs various processing such as calculation processing on packed format data and conversion processing to unpacked format. This is performed on this retained intermediate data.

演算部251は、中間データ保持部231に保持されて
いる2つの中間データを読み出して、所定の演算処理(
例えば加算処理)を行う。演算結果は再度中間データ保
持部231に保持される。
The calculation unit 251 reads the two intermediate data held in the intermediate data storage unit 231, and performs predetermined calculation processing (
For example, perform addition processing). The calculation result is held in the intermediate data holding unit 231 again.

アンパック形式変換部261は、中間データ保持部23
1に保持されている中間データをアンパック形式のデー
タに変換するものであり、出力データ保持部263はこ
の変換後のアンパック形式。
The unpack format converting unit 261 is an intermediate data holding unit 23
1 is converted into unpacked data, and the output data holding unit 263 stores the unpacked data after this conversion.

のデータを保持する。data is retained.

データ合或部271は、中間データ保持部231に保持
されている中間データ、すなわち符号部と10進データ
部を台底してパック形式のデータを得るものであり、出
力データ保持部273はこの得られたパック形式のデー
タを保持する。
The data combining unit 271 is for obtaining packed format data by combining the intermediate data held in the intermediate data holding unit 231, that is, the code part and the decimal data part. Retains the obtained data in packed format.

次に、上述した本発明実施例の動作を説明する。Next, the operation of the embodiment of the present invention described above will be explained.

いま、パック形式で表された2つの入力データAl及び
A2を加算し、その後アンパック形式に変換する場合を
考えるものとし、このような処理をプログラム言語C0
BOLを用いて実現した場合の一例を第3図に示す。
Let us now consider the case where two input data Al and A2 expressed in packed format are added and then converted into unpacked format. Such processing is performed using the programming language C0.
An example of implementation using BOL is shown in FIG.

第3図に示すように、A1は内部、10進(パック形式
)の4桁の値を有する変数であり、その値はr+123
4.」である。同様に、A2は内部10進の4桁の値を
有する変数であり、その値はr−t−1ooo、Jであ
る。これらの2つのデータAI及びA2を加算してその
結果を変数Bに代入する。
As shown in Figure 3, A1 is an internal variable that has a 4-digit value in decimal (packed format), and its value is r+123
4. ”. Similarly, A2 is a variable with an internal decimal 4-digit value, and its value is r-t-1ooo,J. These two data AI and A2 are added and the result is assigned to variable B.

また、第4図は中間データ保持部231における中間デ
ータの保持状態を、第5図は2入力データの加算及び加
算結果のアンパック形式への変換を行う場合の処理の具
体例を、第6図は加算処理の動作手順を、第7図はアン
バンク形式への変換処理の動作手順をそれぞれ示してい
る。以下の■。
Further, FIG. 4 shows the holding state of intermediate data in the intermediate data holding unit 231, FIG. 5 shows a specific example of processing when adding two input data and converting the addition result into an unpacked format, and FIG. 7 shows the operation procedure of the addition process, and FIG. 7 shows the operation procedure of the conversion process to the unbanked format. ■ Below.

■等の符号は、第5図〜第7図内の符号に対応している
Symbols such as (1) correspond to the symbols in FIGS. 5 to 7.

■先ず、一方の入力データAl (=01234CH)
から符号部と10進データ部の分離を行う。
■First, one input data Al (=01234CH)
Then, the code part and the decimal data part are separated.

入力データ保持部211に保持されているパック形式の
データA1をデータ分離部221に入力し、データ分離
部221によって符号部と10進データ部に分離する。
Packed data A1 held in the input data holding unit 211 is input to the data separation unit 221, and is separated into a code part and a decimal data part.

分離した各部は第4図に示す形式で中間データ保持部2
31に保持される。
The separated parts are stored in the intermediate data holding unit 2 in the format shown in Figure 4.
It is held at 31.

すなわち、4桁の10進データ部は語境界(4バイトで
1語が構成されているものとする)及び半語境界をまた
がないように保持され、この10進データ部に隣接する
上位ビット側に上位4ビツトに符号を含んだ1バイトの
符号部が保持される。
In other words, the 4-digit decimal data part is held so as not to cross word boundaries (one word is made up of 4 bytes) and half-word boundaries, and the upper bits adjacent to this decimal data part A 1-byte code section containing a code in the upper 4 bits is held on the side.

この符号部及び10進データ部の3バイトデータを中間
データTIとする。
The 3-byte data of the code part and decimal data part is defined as intermediate data TI.

■同様に1、他方の入力データA2(=01000DH
)から符号部とlO進データ部の分離を行い、分離後の
中間データT2を中間データ保持部231に保持する。
■Similarly 1, the other input data A2 (=01000DH
) is separated into a code part and an IO-adic data part, and the separated intermediate data T2 is held in the intermediate data holding unit 231.

以下、このようにして中間データ保持部231に保持さ
れた2つの中間データT1及びT2に対して、演算部2
51による加算処理を行う。
Hereinafter, for the two intermediate data T1 and T2 held in the intermediate data holding unit 231 in this way,
51 is performed.

■加算処理に先立って、2つの中間データの符号判定を
行う。演算部251は、一方の中間データT1の符号部
(最上位バイト)と他方の中間データT2の符号部(最
上位バイト)が等しいか否かを調べる。
(2) Prior to the addition process, the sign of the two intermediate data is determined. The calculation unit 251 checks whether the sign part (most significant byte) of one intermediate data T1 is equal to the sign part (most significant byte) of the other intermediate data T2.

■符号判定の結果が真(肯定判断)である場合には、中
間データT1とT2の各10進データ部を加算する。な
お、中間データTI及びT2の各10進データ部は共に
語境界あるいは半語境界をまたがない形式で保持されて
いるため、1度の処理で加算を行うことができる。
(2) If the result of the sign determination is true (affirmative determination), the decimal data portions of intermediate data T1 and T2 are added. Note that since the decimal data portions of the intermediate data TI and T2 are both held in a format that does not cross word boundaries or half-word boundaries, addition can be performed in one process.

また、符号判定の結果が偽(否定判断)である場合には
、10進データ部の値が大きな一方の中間データT1の
10進データ部から他方の中間データT2の10進デー
タ部を減算する。
Furthermore, if the result of the sign determination is false (negative judgment), the decimal data part of the other intermediate data T2 is subtracted from the decimal data part of the one intermediate data T1, which has a larger value in the decimal data part. .

■次に、演算部251は、加減算結果に対応する符号の
決定を行い、すなわち10進データ部の値が大きい方の
符号部を加減算結果に対応する符号部に決定する。決定
した符号部及び加減算結果である10進データ部は、新
たな中間データT3として中間データ保持部231に保
持される。
(2) Next, the calculation unit 251 determines the code corresponding to the addition/subtraction result, that is, the code part with the larger value of the decimal data part is determined as the code part corresponding to the addition/subtraction result. The determined code part and the decimal data part which is the addition/subtraction result are held in the intermediate data holding unit 231 as new intermediate data T3.

以下、このようにして中間データ保持部231に保持さ
れた中間データT3をアンパック形式に変換する。
Thereafter, the intermediate data T3 held in the intermediate data holding unit 231 in this manner is converted into an unpacked format.

■先ず、アンパック形式変換部261は、中間データT
3を読み出して、10進データ部のみをアンパック形式
に変換する。上述したように10進データ部は語境界あ
るいは半語境界をまたがない形式で保持されているため
、1度の処理でアンパック形式に変換することができる
■First, the unpack format conversion unit 261 converts the intermediate data T
3 and convert only the decimal data part to unpacked format. As described above, since the decimal data part is held in a format that does not cross word boundaries or half-word boundaries, it can be converted to unpacked format in one process.

■次に、アンパック形式変換部261は、■でアンパッ
ク形式に変換したデータの最下位バイトの上位4ビツト
に、符号部の上位4ビツトを挿入する。この挿入は、上
位ビットと下位ビットの入れ替え等が不要であるため簡
単な処理で実現することができる。
(2) Next, the unpacked format conversion unit 261 inserts the upper four bits of the code part into the upper four bits of the least significant byte of the data converted into the unpacked format in (2). This insertion can be realized by simple processing because it does not require exchanging the upper bits and lower bits.

このように、パック形式のデータをlO進データ部と符
号部とに分離し、10進データ部の最下位ビットを語境
界あるいは半語境界にあわせて保持することにより、1
0進データ部の全体が語あるいは半語単位で処理するこ
とができ、処理の繰り返しを削減して処理の簡略化を実
現することができる。また、分離した符号部を1バイト
の上位4ビツトに保持することにより、アンパック形式
に変換する処理も容易に実現することができる。
In this way, by separating the packed format data into the 10-decimal data part and the code part, and keeping the least significant bit of the decimal data part aligned with the word boundary or half-word boundary, 1
The entire 0-decimal data portion can be processed in units of words or half words, and repetition of processing can be reduced to simplify processing. Further, by holding the separated code part in the upper four bits of one byte, it is possible to easily realize the process of converting to an unpacked format.

更に、上述した分離後の2つの中間データを用いて所定
の演算を行うことにより、語あるいは半語単位の演算処
理が可能になるので、演算処理の簡略化が可能になる。
Furthermore, by performing a predetermined calculation using the two intermediate data after separation described above, calculation processing can be performed on a word or half-word basis, so that calculation processing can be simplified.

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

上述したように、請求項1の発明にあっては、パック形
式のデータの10進データ部と符号部を分離して保持す
ることにより、符号部を特に意識せずに10進データ部
のみを処理することが可能になり、また、分離した10
進データ部を語または半語境界に一致させることにより
、語または半語単位での処理が可能になるので、処理の
簡略化を実現することができる。
As described above, in the invention of claim 1, by separately holding the decimal data part and the code part of the data in packed format, it is possible to read only the decimal data part without being particularly aware of the code part. It is now possible to process and also separate 10
By matching the hexadecimal data portion to a word or half-word boundary, processing can be performed in units of words or half-words, thereby simplifying the processing.

また、請求項2の発明にあっては、請求項1で分離した
10進データ部及び符号部を用いてパック形式の2つの
データに対する演算処理を行うことにより、符号部を意
識せず、かつ語または半語単位での演算を行って処理を
簡略化することができる。
In addition, in the invention of claim 2, by performing arithmetic processing on two pieces of data in a packed format using the decimal data part and the code part separated in claim 1, the code part is not considered. Processing can be simplified by performing calculations on a word or half-word basis.

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

第1図は本発明の原理ブロック図、 第2図は本発明を適用した一実施例の構成図、第3図は
実施例のC0BOLプログラムを示す図、第4図は中間
データの保持状態の説明図、第5図は実施例の処理の説
明図、 第6図は実施例の加算処理の動作説明図、第7図は実施
例のアンパック形式への変換処理の動作説明図、 第8図はデータ形式の具体例を示す図、第9図は従来例
の処理の説明図である。 261はアンパック形式変換部、 263.273は出力データ保持部、 271はデータ合成部である。 図において、 111はデータ保持手段、 121は分離手段、 131は10進データ保持手段、 141は符号保持手段、 151は演算手段、 211は入力データ保持部、 221はデータ分離部、 231は中間データ保持部、 251は演算部、 k地側の構成図 第2図 刃ξ乃も日月fJ力沼王里フ゛ロック図第1図 01  AI   PIC39(4)  PACKED
−DECIMALν虹匪+l洲。 01A2PIC39(4)PACKED−DECIMA
L VALUE +1000゜PIC39(4)  o
+5puy。 cOび円I 実jら1う+J、yrCOBOLフbゲラムΣ六す間第
3図 10土違テ゛二y#p ↑   ↑    ↑    ↑    ↑  メイト
を番」は中間子・=7. (!−f寺A火゛慾の〕0月
図第4図 10這テ゛ニタ イ寸5 ↑ ↑ ↑ ↑ ↑ パ′イF4J (aン 実5邑fF/グのア7/?vりtンπへの変側飄色Jデ
のをカイ乍吉九四図第7図 (1)) ”” ”v  の 1141’!’J’t g f(f
$第8図 [
Fig. 1 is a block diagram of the principle of the present invention, Fig. 2 is a block diagram of an embodiment to which the present invention is applied, Fig. 3 is a diagram showing a C0BOL program of the embodiment, and Fig. 4 is a diagram showing the state of holding intermediate data. 5 is an explanatory diagram of the process of the embodiment. FIG. 6 is an explanatory diagram of the addition process of the embodiment. FIG. 7 is an explanatory diagram of the conversion process to the unpacked format of the embodiment. 9 is a diagram showing a specific example of a data format, and FIG. 9 is an explanatory diagram of processing in a conventional example. 261 is an unpack format conversion unit, 263 and 273 are output data holding units, and 271 is a data synthesis unit. In the figure, 111 is data holding means, 121 is separation means, 131 is decimal data holding means, 141 is code holding means, 151 is calculation means, 211 is input data holding section, 221 is data separation section, 231 is intermediate data Holding section, 251 is the calculation section, k Ground side configuration diagram Figure 2 Blade ξno mo Sun Moon fJ Chikinuma Ori block diagram Figure 1 01 AI PIC39 (4) PACKED
-DECIMALν Rainbow+l. 01A2PIC39(4)PACKED-DECIMA
L VALUE +1000゜PIC39(4) o
+5puy. cO circle I real j et al 1 + J, yrCOBOL fu b gelam Σ6 between Fig. 3 10 Tsuchitsu T 2 y#p ↑ ↑ ↑ ↑ ↑ "Mate turn" is the meson = 7. (!-f Temple A fire yearning) Figure 4 Figure 10 Dimensions 5 ↑ ↑ ↑ ↑ ↑ Pa'ai F4J 1141'!'J't g f(f
$Figure 8 [

Claims (2)

【特許請求の範囲】[Claims] (1)パック形式のデータを保持するデータ保持手段(
111)と、 前記データ保持手段(111)に保持されたパック形式
のデータが入力され、このデータに含まれる10進デー
タ部と符号部とを分離する分離手段(121)と、 前記分離手段(121)で分離した10進データ部の最
下位ビットを語境界または半語境界にあわせて保持する
10進データ保持手段(131)と、 前記分離手段(121)で分離した符号部を1バイトの
上位ビットに含ませて保持する符号保持手段(141)
と、 を備えるように構成したことを特徴とするデータ形式変
換方式。
(1) Data retention means for retaining data in pack format (
111), separation means (121) for inputting packed format data held in the data holding means (111) and separating a decimal data part and a code part contained in this data; and said separation means (111); a decimal data holding means (131) that holds the least significant bit of the decimal data part separated by step 121) along a word boundary or a half-word boundary; Code holding means (141) that is included in the upper bits and held
A data format conversion method characterized by being configured to include the following.
(2)請求項1の10進データ保持手段(131)及び
符号保持手段(141)をパック形式の2つのデータの
それぞれに対応させて有し、 前記2つの符号保持手段(141)に保持された2つの
符号部に基づいて、前記2つの10進データ保持手段(
131)に保持された2つの10進データ部に対する所
定の演算処理を行う演算手段(151)を備えるように
構成したことを特徴とするパック形式データ演算方式。
(2) The decimal data holding means (131) and the code holding means (141) of claim 1 are provided in correspondence with each of the two data in a pack format, and the data held in the two code holding means (141) is provided. Based on the two code parts, the two decimal data holding means (
131) A packed format data calculation method characterized in that it is configured to include calculation means (151) for performing predetermined calculation processing on two decimal data parts held in a data storage unit (131).
JP2064739A 1990-03-14 1990-03-14 Data form converting system and pack form data arithmetic system Pending JPH03263218A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2064739A JPH03263218A (en) 1990-03-14 1990-03-14 Data form converting system and pack form data arithmetic system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2064739A JPH03263218A (en) 1990-03-14 1990-03-14 Data form converting system and pack form data arithmetic system

Publications (1)

Publication Number Publication Date
JPH03263218A true JPH03263218A (en) 1991-11-22

Family

ID=13266823

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2064739A Pending JPH03263218A (en) 1990-03-14 1990-03-14 Data form converting system and pack form data arithmetic system

Country Status (1)

Country Link
JP (1) JPH03263218A (en)

Similar Documents

Publication Publication Date Title
US5668989A (en) Two-digit hybrid radix year numbers for year 2000 and beyond
WO1998055946A1 (en) System and method for transferring data between data sets
Zhou et al. " Receiver makes right" data conversion in PVM
JPH03263218A (en) Data form converting system and pack form data arithmetic system
JPH049340B2 (en)
JPS62140137A (en) Data holding system using arithmetic logic unit
CN110348000B (en) Typesetting document interaction calculation method, device, equipment and computer readable medium
US6009263A (en) Emulating agent and method for reformatting computer instructions into a standard uniform format
JP2713283B2 (en) Data processing device
JP3120551B2 (en) Code conversion device
JPS61168039A (en) Processing system for code conversion
JPH0234037A (en) Numerical data conversion system
JPH0792754B2 (en) Assembling device
JPH11296510A (en) Data converting device
JPH03144735A (en) Language processing system for interpreter
JPS6138493B2 (en)
JPS6051950A (en) Program outputting system
JPS62119629A (en) Code conversion system
JPS6260027A (en) Specification system for discrimination information
Thalmayer C: READ: A REENTRANT ROUTINE TO CONVERT EBCDIC DECIMAL NUMBERS TO HEXADECIMAL.
JPH04167128A (en) Decimal arithmetic processing system
JPH07191972A (en) Method for compressing sentence
JPS63128432A (en) Document producing device
JPS62257550A (en) Saving system for data base file
JPH07271558A (en) Arithmetic unit