JPS60181834A - Decimal arithmetic processor - Google Patents
Decimal arithmetic processorInfo
- Publication number
- JPS60181834A JPS60181834A JP59035933A JP3593384A JPS60181834A JP S60181834 A JPS60181834 A JP S60181834A JP 59035933 A JP59035933 A JP 59035933A JP 3593384 A JP3593384 A JP 3593384A JP S60181834 A JPS60181834 A JP S60181834A
- Authority
- JP
- Japan
- Prior art keywords
- data
- digit
- register
- decimal
- result
- 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
- 230000000295 complement effect Effects 0.000 claims description 18
- 238000010977 unit operation Methods 0.000 claims 1
- 238000006243 chemical reaction Methods 0.000 description 13
- 238000000034 method Methods 0.000 description 5
- 238000010586 diagram Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000007423 decrease Effects 0.000 description 1
- 230000014509 gene expression Effects 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F7/00—Methods or arrangements for processing data by operating upon the order or content of the data handled
- G06F7/38—Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
- G06F7/48—Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
- G06F7/491—Computations with decimal numbers radix 12 or 20.
- G06F7/492—Computations with decimal numbers radix 12 or 20. using a binary weighted representation within each denomination
- G06F7/493—Computations with decimal numbers radix 12 or 20. using a binary weighted representation within each denomination the representation being the natural binary coded representation, i.e. 8421-code
- G06F7/494—Adding; Subtracting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2207/00—Indexing scheme relating to methods or arrangements for processing data by operating upon the order or content of the data handled
- G06F2207/492—Indexing scheme relating to groups G06F7/492 - G06F7/496
- G06F2207/4924—Digit-parallel adding or subtracting
Landscapes
- Engineering & Computer Science (AREA)
- Computing Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computational Mathematics (AREA)
- Mathematical Analysis (AREA)
- Mathematical Optimization (AREA)
- Pure & Applied Mathematics (AREA)
- General Engineering & Computer Science (AREA)
Abstract
Description
【発明の詳細な説明】
〔発明の技術分野〕
この発明は、新規なデータ形式のlO進データを適用す
る10進演見処理裟置に関する。DETAILED DESCRIPTION OF THE INVENTION [Technical Field of the Invention] The present invention relates to a decimal performance processing device that applies a new data format of 10-adic data.
従来、10進演算処理装置、例えば事務用演算処理装置
で適用される10進データは、第1図に示すデータ形式
で表現されていた。第1図のデータは、2バイト(16
ビツト)データの例を示すもので、D、−D、は数値デ
ータ、Sは符号データを示す。数値データDi、符号デ
ータSはにバイト(4ビツト)構成である。3桁のデー
タD1D、 D3は絶対値データであり、その符号は符
号データSによって示される。符号データSは、”11
00’ 、即ちC1,(添字の16は16進表現を示す
)で正(零を含む)を示し、”1101”、即ちD16
で負を示す。Conventionally, decimal data applied in a decimal arithmetic processing device, for example, an office arithmetic processing device, has been expressed in the data format shown in FIG. The data in Figure 1 is 2 bytes (16
This shows an example of (bit) data, where D and -D represent numerical data, and S represents code data. Numerical data Di and code data S have a byte (4 bit) configuration. The three-digit data D1D and D3 are absolute value data, and their signs are indicated by sign data S. The code data S is “11
00', that is, C1, (the subscript 16 indicates hexadecimal representation) indicates positive (including zero), and "1101", that is, D16
indicates negative.
このように、従来の演算処理装置で適用されるlO進デ
ータは、符号データSのための符号桁が必要であり、メ
モリ(主メモリ、外部記m)上にその分の領域が必要で
あった13才だ、この種lO進データを用いた四則演算
は絶対値データの演算を基本とするため、異符号データ
の演算では、その前後で符号変換処理を必要とする欠点
があった。例えば、−8と2との加算処理の手順は、
■ 主メモリからのデータ(−8)読出しの 主メモリ
からのデータ(+2)読出し■ −8に対する補数変換
(符号変換)■ 手順■での変換データと2との加算■
手順■で得られた加算データに対する補数変換(この
変換データが結果となる)
■ 手順■で得られた結果の主メモリへの格納であり、
手順■、■に示すように2回の補数変換(符号変換)処
理が必要であった。このため、従来の事務用演算処理装
置(10進演算処理装置)では、補数変換処理のために
演算速度が低下する欠点があった。また、補数変換のた
めの変換機能も装備しなければならなかった。In this way, the lO-decimal data applied in conventional arithmetic processing devices requires a code digit for the code data S, and an area for this is required in the memory (main memory, external memory m). I was 13 years old.Since the four arithmetic operations using this kind of 10-adic data are based on operations on absolute value data, operations on data with opposite signs had the disadvantage of requiring sign conversion processing before and after the operation. For example, the procedure for adding -8 and 2 is: ■ Reading data (-8) from main memory Reading data (+2) from main memory ■ Complement conversion (sign conversion) for -8 ■ Step ■ Addition of converted data and 2■
Complement conversion of the addition data obtained in step ■ (this converted data becomes the result) ■ Storing the result obtained in step ■ in main memory,
As shown in steps ① and ②, two-complement conversion (code conversion) processing was required. For this reason, conventional office arithmetic processing devices (decimal arithmetic processing devices) have the disadvantage that arithmetic speed decreases due to complement conversion processing. It also had to be equipped with a conversion function for complement conversion.
この清明は上記事情に鑑みてなされたものでその[的は
、10進データを格納するのに、メモリ領域が効率よく
使用でき、且つ10進演算の高速化が図れる10進演算
処理装置を提供することにある。This proposal was made in view of the above circumstances, and its purpose is to provide a decimal arithmetic processing device that can efficiently use memory space to store decimal data and speed up decimal arithmetic operations. It's about doing.
この発明では、1桁が4ビツトで構成され、最上位桁が
、16進数値rOJ〜「8」で10進数値「0」〜「8
」の正符号数値データを示し、16進数値「9」で補数
表現の負符号数値データを示す数値/符号共用データ桁
として用いられ、残り桁が数値データ桁として用いられ
る補数表現データ形式lo進データが各種格納される主
メモリが設けられている。演算手段は、lO進演算に際
し、主メモリに格納されている1o進データのうち演算
対象となる第1および第2のlO進データを続出して、
これらデータ間の演算を下位桁より2桁単位で行なう。In this invention, one digit consists of 4 bits, and the most significant digit is a hexadecimal value rOJ ~ "8" and a decimal value "0" ~ "8".
'', the hexadecimal value "9" is used as a numeric/sign shared data digit to indicate negative sign numeric data in complement representation, and the remaining digits are used as numeric data digits. Complement representation data format lo decimal A main memory is provided in which various types of data are stored. The arithmetic means successively outputs first and second IO-adic data to be calculated from among the IO-adic data stored in the main memory during the IO-adic calculation,
Calculations between these data are performed in units of two digits starting from the lower digit.
この2桁演算において、演算すべき2桁データをり、i
とすると、上記演算手段は、先行する2桁単位での演算
におけるキャリー出力とhとiとの加算を行ない2桁デ
ークjを算出し、このデータjを用いて[((j +6
616 )■(h■1))ANDIIOI。〕÷1o、
、 X 61.−1− j の演算を行なうことにより
、2桁の加算データを得る。In this two-digit operation, the two-digit data to be calculated is i
Then, the arithmetic means calculates a two-digit data j by adding the carry output in the preceding two-digit unit calculation with h and i, and uses this data j to calculate [((j +6
616)■(h■1))ANDIIOI. ]÷1o,
, X 61. By performing the calculation −1− j, two-digit addition data is obtained.
第2図はこの発明の一実施例に係る事務用演算処理装置
4の構成を示す。同図においてIOは装置全体を制御す
ると共に通常の命令処理を行なうCPU、20は主メモ
リである。主メモリ20には例えば事務用演算命+(μ
下、BPH命+)を含むプログラム、各種の10進デー
タなどが格納される。この実施例で適用される10進デ
ータのデータ形式を第3図に示す。なお、第3図の形式
は2バイ)(16ビツト)データの揚台である。同図に
おいて、最上位桁のり、 /8は数値/符号共用データ
を示し、残り桁のD2〜D4は数値データを示す。具体
的には、D1/Sは、O+a (’0000’)〜81
.l(’1000”)であれば、10進数値「0」〜「
8」の正符号の数値データを示す。同じ(D1/8は、
9+e(”1001”)であれば補数表現の負符号lO
進数値データを示す。第3図に示す新規なデータ形式を
補数表現データ形式と呼ぶ。第3図の補数表現データ式
の10進データのデータ表現能力を第2表に示す。FIG. 2 shows the configuration of an office arithmetic processing device 4 according to an embodiment of the present invention. In the figure, IO is a CPU which controls the entire device and also performs normal instruction processing, and 20 is a main memory. The main memory 20 contains, for example, an office calculation instruction +(μ
Below, programs including BPH order +), various decimal data, etc. are stored. FIG. 3 shows the data format of decimal data applied in this embodiment. The format shown in FIG. 3 is a 2-byte (16-bit) data platform. In the figure, the most significant digit /8 indicates numerical/code shared data, and the remaining digits D2 to D4 indicate numerical data. Specifically, D1/S is O+a ('0000') ~ 81
.. If l ('1000"), the decimal value "0" ~ "
8" is shown with a positive sign. Same (D1/8 is
If 9+e (“1001”), the negative sign lO in complement representation
Indicates hex value data. The new data format shown in FIG. 3 is called a complement representation data format. Table 2 shows the data representation capability of decimal data of the complement representation data formula shown in FIG.
第1表から明らかなように、第3図の補数表現データ形
式10進データ(2バイト)では、−1000〜+89
99の数値表現が可能となる。これに対し、第1図の従
来形式10進データ(2バイト)の数値表現能力は−9
99〜+999であり、補数表現データ形式10進デー
タに比べて著しく劣る。As is clear from Table 1, the complement representation data format decimal data (2 bytes) in Figure 3 ranges from -1000 to +89.
99 numerical expressions are possible. On the other hand, the numerical representation ability of the conventional format decimal data (2 bytes) in Figure 1 is -9
99 to +999, which is significantly inferior to decimal data in the complement representation data format.
再び第2図を参照すると、30はBPH命令を実行する
事務用演算ユニット(以下、BPHUと称する)である
。B PHU 30は、CPUzoからの指示に応じて
ユニット全体を制御する演算制御部3Iと、この演算制
御部3Iの制御のもとて事務用演算処理を行なう演算処
理ロジックを有している。4IはCPUzOからのコン
トロール情報を転送するコントロールバス、42は入力
バス、43は出力バスである。BPHU3゜はこれらの
バス41〜43を介してCPUl0に結合されている。Referring again to FIG. 2, 30 is a business processing unit (hereinafter referred to as BPHU) that executes BPH instructions. The B PHU 30 includes an arithmetic control section 3I that controls the entire unit according to instructions from the CPUzo, and an arithmetic processing logic that performs office arithmetic processing under the control of the arithmetic control section 3I. 4I is a control bus for transferring control information from CPUzO, 42 is an input bus, and 43 is an output bus. BPHU3° is coupled to CPU10 via these buses 41-43.
第4図は演算処理ロジック32の内部構成を示す。同図
において、FLr、F+、tは入力バス42上のデータ
を保持するレジスタ、5 Z 、 52はマルチプレク
サ(以下、MPXと称する)である。MPXsrは、レ
ジスタR1がらの出方データ、固定値r6616J(”
01100110”)、後述するフリップフロップ54
からの出方データ、またはレジスタR3からの出力デー
タのいずれか一つを選択出力する。また、 MPXsz
は、レジスタR2からの出力データ、後述するレジスタ
R4からの出力データ、または乗算器6oからの出力デ
ータのいずれか一つを選択出力する。FIG. 4 shows the internal configuration of the arithmetic processing logic 32. In the figure, FLr, F+, and t are registers that hold data on the input bus 42, and 5Z and 52 are multiplexers (hereinafter referred to as MPX). MPXsr is the output data from register R1, fixed value r6616J("
01100110"), a flip-flop 54 to be described later.
Either the output data from the register R3 or the output data from the register R3 is selectively output. Also, MPXsz
selectively outputs any one of output data from register R2, output data from register R4 (described later), or output data from multiplier 6o.
53はMPX5Z 、52からの各選択出力データを加
算す乞2桁(1バイト)加算器、54は加算器53から
のキャリー信号を保持するフリップフ。ツブ′(以下、
F/Fと称する)である。53 is a 2-digit (1 byte) adder that adds each selected output data from MPX5Z and 52; 54 is a flip-flop that holds the carry signal from adder 53; Tsubu' (hereinafter referred to as
(referred to as F/F).
R13,TL4は加算器53からの出力データを保持す
るレジスタ、SRは同じくシフトレジスタである。シフ
トレジスタ8FLからの出力データは出力バス43に導
かれる。R13 and TL4 are registers that hold output data from the adder 53, and SR is also a shift register. Output data from shift register 8FL is guided to output bus 43.
55はレジスタRZ、R,(からの出力データのいずれ
か一方を選択出力するMPX(マルチプレクサ)、56
はレジスタR2または後述するレジスタR・5からの出
力データのいずれか一方を選択出力するMPX (マル
チプレクサ)である。57はMPX55.s eからの
各選択出力データの排他的論理和をとる排他的論理和回
路(以下、EX−ORと称する)、R5はEX−011
L57からの出力データを保持するレジスタ、58はI
D X −ORs 7からの出力データと固定値r11
016J <“100010000”) との論理積を
とるアンドゲート(以下、ANDと称する)である。5
9はANDs&からの出力データを1ffi定値rlO
+aJ (’ooootoooo” ) で除を除算器
、60は除算器59からの出力データに固定値r6J(
”000000110”)を乗する乗算器である。55 is an MPX (multiplexer) for selectively outputting one of the output data from registers RZ, R, (; 56;
is an MPX (multiplexer) that selectively outputs either one of the output data from register R2 or registers R.5 to be described later. 57 is MPX55. Exclusive OR circuit (hereinafter referred to as EX-OR) that calculates exclusive OR of each selected output data from s e, R5 is EX-011
A register that holds output data from L57, 58 is I
Output data from D X -ORs 7 and fixed value r11
016J<“100010000”) This is an AND gate (hereinafter referred to as AND) that performs a logical product with 016J<“100010000”). 5
9 is the output data from ANDs & 1ffi constant value rlO
+aJ ('ooootooooo") is the divider, and 60 is the output data from the divider 59 with a fixed value r6J (
"000000110").
次に、この発明の一実施例の動作を第5図のフローチャ
ートラ参照して説明する。今、主メモリ2θに置かれた
BPH命令がCPUrOに取込まれたものとする。CP
U10はBPH命令の属性から、扁令コード、データサ
イズ、オペランドアドレスなど、命令実行に必要な情報
をフントロールバス4I経由でBPH030に転送する
。Next, the operation of one embodiment of the present invention will be explained with reference to the flowchart shown in FIG. Assume that the BPH instruction placed in the main memory 2θ is now taken into the CPUrO. C.P.
U10 transfers information necessary for executing the instruction, such as the instruction code, data size, and operand address, from the attributes of the BPH instruction to the BPH 030 via the controller bus 4I.
BPHUso内の演算制御部3Zはコントロールバス4
Zより転送される情報(オペランドアドレスなど)に従
って、演算対象となるlO進データを主メモリ20から
人力バス42経由で演算処理ロジック32に取込む。こ
の際、演算対象データの下位桁より2桁単位で演算処理
ロジック32に取込まれる。この例において、BPH命
令で加算が指定されているものとすると、まず被加数と
なる演算対象データの下位2桁が、被加数データAとし
てレジスタRzにロードされる(ステップ8z)。次に
、加数となる演算対象データの下位2桁が、加数データ
BとしてレジスタR2にロードされる(ステップ82)
。The calculation control unit 3Z in the BPHUso is connected to the control bus 4.
According to the information (operand address, etc.) transferred from Z, the lO-adic data to be calculated is taken from the main memory 20 to the calculation processing logic 32 via the human power bus 42. At this time, the data to be calculated is taken into the calculation processing logic 32 in units of two digits starting from the lower digits. In this example, assuming that the BPH instruction specifies addition, the lower two digits of the operation target data, which will be the summand, are first loaded into the register Rz as the summand data A (step 8z). Next, the lower two digits of the data to be operated on as the addend are loaded into register R2 as addend data B (step 82).
.
次に、レジスタFLI、R,2の各内容、およびF/F
54からの出力ビットの加算を行なってレジスタRJ
、 FL4にロードする処理(ステップS3)が行なわ
れる。このステップS3は、例えば次のように行なわれ
る。まず、MPX57によってF/F54からの出力ビ
ットが選択されルト共に、MPX52によってレジスタ
R2からの出力データが選択される。しかして、加算器
53によりMPX5z 、52からの各選択出力データ
間の加算、即ち(F/F)+(R2)プ)3行なわれる
。加算器53の加算結果はレジスタR4にロードされる
。次に、MPX51によってレジスタ几Iからの出力デ
ータが選択されると共Oこ、MPX521こよってレジ
スタR4からの出力データが選択される。しかして加算
器53によりMPX5I、s 2からの各選択出力デー
タ間の加算、即ち(H,I) +(R4)が行なわれる
。加算器63のhO算結果(R,I)+(R4)、即ち
(R,z)+(11,2)+(F/F)はレジスタR,
s 、 R,4に共通にロードされる。なお、F/F5
4からの出力ピッ)(F/F)は、前回の2桁演算にお
ける加算器53からのキャリー出力を示す。この例のよ
うに1回目の演算の場合には、(F/F)−2’O’で
ある。Next, the contents of registers FLI, R, 2 and F/F
Adding the output bits from 54 and register RJ
, a process of loading it into FL4 (step S3) is performed. This step S3 is performed, for example, as follows. First, the output bit from the F/F 54 is selected by the MPX 57, and the output data from the register R2 is selected by the MPX 52. Thus, the adder 53 performs addition between the selected output data from the MPXs 5z and 52, that is, (F/F)+(R2)3. The addition result of adder 53 is loaded into register R4. Next, MPX51 selects the output data from register I, and MPX521 selects the output data from register R4. Thus, the adder 53 performs addition between each selected output data from MPX5I, s2, that is, (H, I) + (R4). The hO calculation result (R, I) + (R4) of the adder 63, that is, (R, z) + (11, 2) + (F/F) is stored in the register R,
Commonly loaded to s, R,4. In addition, F/F5
4 (F/F) indicates the carry output from the adder 53 in the previous two-digit operation. In the case of the first calculation as in this example, it is (F/F)-2'O'.
ステップS3が終了すると、レジスタRZ。When step S3 is completed, register RZ.
R2の各内容の排他的論理和をとり、その結果をレジス
タR5にロードする処理(ステップS4)が行なわれる
。このステップS4での具体的な処理内容は次の通りで
ある。まず、MPX55によってレジスタR,1からの
出力データが選択されると共に、MPX56によってレ
ジスタR2からの出力データが選択される。しかして、
EX−OFLs 7 により、MPXss 、s eか
らの各選択出力データ間の排他的論理和がとられる。A process (step S4) is performed in which the contents of R2 are exclusive-ORed and the result is loaded into register R5. The specific processing contents in step S4 are as follows. First, the MPX55 selects the output data from the register R,1, and the MPX56 selects the output data from the register R2. However,
EX-OFLs 7 performs exclusive OR between each selected output data from MPXss and se.
EX−0几57 からの出力デ/′−タ、即ち(几7)
+(R,、?)はレジスタR75にロードされる。Output data from EX-0 几57, i.e. (几7)
+(R,,?) is loaded into register R75.
ステップS4が終了すると、レジスタR4の内容に固定
値r66t6jを加えて得られる加算結果とレジスタR
5の内容との排他的論理和をとり、その結果と固定値r
llO+aJとの論理積をとる処理(ステップS5)が
行なわれる。このステップS5での具体的な処理内容は
次の通りである。まず、MPX51をこよって固定値[
6616Jが選択されると共に、MPX5.?によって
レジスタR4からの出力データが選択される。しかして
加算器53によりMPX5Z 、52からの各選択出力
データ間の加算、即ち661g”(FL4)が行なイつ
れる。加算器53の加算結果661.+(R4)は、レ
ジスタR,4,MPX55を介してEX−OR,57に
供給される。このEX−OR57には、MPX56を介
してレジスタR5からの出力データも供給される。しか
してEX−uR5vにより、MPX55.56からの各
選択出力データ間の排他的論理和がとられる。次に、A
ND58により、EX−OR57からの出力データ、即
ち((R・4)+661,1■(R5)と固定値「11
01.」 との論理積がとられ、中間結果Qtがめられ
る。When step S4 is completed, the addition result obtained by adding the fixed value r66t6j to the contents of register R4 and register R
Take the exclusive OR with the contents of 5 and set the result and the fixed value r
A process of calculating the logical product with llO+aJ (step S5) is performed. The specific processing contents in step S5 are as follows. First, pass MPX51 to a fixed value [
6616J is selected, and MPX5. ? The output data from register R4 is selected by. Thus, the adder 53 performs addition between the selected output data from the MPXs 5Z and 52, that is, 661g'' (FL4).The addition result 661.+(R4) of the adder 53 is added to the register R, , MPX55 to EX-OR, 57. This EX-OR57 is also supplied with output data from register R5 via MPX56. An exclusive OR is taken between the selected output data. Next, A
The ND58 outputs the output data from the EX-OR57, that is, ((R・4)+661,1■(R5)) and the fixed value "11
01. ” and an intermediate result Qt is obtained.
ステップS5が終了すると、AND5Bからの出力デー
タを固定値[10saJで除し、この結果に固定値「6
6」を乗する処理(ステップ86)が行なわれる。即ち
ステップS6では、まず除算器59により、AND S
8からの出力データを固定値l016で除する処理が行
なわれる。次に、乗算器6oにより、除算器59の除算
結果Q1÷10.6と固定値「66」との乗算が行なわ
れ、中間結果Q2がめられる。When step S5 is completed, the output data from AND5B is divided by the fixed value [10saJ, and this result is added to the fixed value "6
6'' (step 86) is performed. That is, in step S6, the divider 59 first calculates AND S
Processing is performed to divide the output data from 8 by a fixed value l016. Next, the multiplier 6o multiplies the division result Q1÷10.6 of the divider 59 by a fixed value "66" to obtain an intermediate result Q2.
ステップS6が終了すると、乗算器60の乗算結果Q2
とレジスタR3の内容(R3)との加算を行ない、その
結果をシフトレジスタSRにロードする処理(ステップ
87.)が行なわれる。When step S6 is completed, the multiplication result Q2 of the multiplier 60 is
and the contents of register R3 (R3), and the result is loaded into shift register SR (step 87).
即ちステップS7では、まずMPX5Zによってレジス
タR,sからの出力データが選択されると共に、MPX
52によって乗算器60の乗算結果が選択される。しか
して加算器53によりMPX51.52からの各選択出
力データ間の加算、即ち(R3)+Q、2 が行なわれ
る。加算器53の加算結果(1バイト)はシフトレジス
タSR,の上位2桁(1バイト)にロードされる。なお
、加算結果のローディングに際し、シフトレジスタ81
’Lの内容は、2桁右シフトされている。また、このス
テップS7では、加算器53からのキャリー出力はF/
F54に保持される。That is, in step S7, the MPX5Z first selects the output data from the registers R,s, and the MPX5Z selects the output data from the registers R,s.
52 selects the multiplication result of multiplier 60. Then, the adder 53 performs addition between the selected output data from the MPXs 51 and 52, that is, (R3)+Q,2. The addition result (1 byte) of the adder 53 is loaded into the upper two digits (1 byte) of the shift register SR. Note that when loading the addition result, the shift register 81
The contents of 'L have been shifted right by two places. Also, in this step S7, the carry output from the adder 53 is F/
It is held in F54.
上記ステップ81〜87の処理が終了すると、次の2桁
データの加算処理が同様の手順で行なわれる。μ上の繰
返しにより、指定された演算対象データ間の加算結果が
補数表現データ形式IO進データの形でシフトレジスタ
SRに保持される。シフトレジスタSELの内容は、出
力バス43を介してCPU7(7,或いは主メモリ20
に転送される。When the processing of steps 81 to 87 is completed, the addition processing of the next two-digit data is performed in the same manner. By repeating on μ, the result of addition between the designated data to be operated on is held in the shift register SR in the form of complement representation data format IO base data. The contents of the shift register SEL are sent to the CPU 7 (or main memory 20) via the output bus 43.
will be forwarded to.
μ上の処理の具体例を被加数が「08」、加数7’lS
r02J)4’S合(7)加I’1. (08+02
=10)、fi加数がr−08J’、加数が「02」の
場合の加算(−08+0z−06)について、以下に示
す。A specific example of processing on μ is where the summand is "08" and the addend is 7'lS
r02J) 4'S combination (7) addition I'1. (08+02
=10), the fi addend is r-08J', and the addition (-08+0z-06) when the addend is "02" is shown below.
(わ被加数が「08」、即ちA=08.、、加数が「0
2」、即ちB=02s、Iの場合、ステップSI〜S7
での各結号は次の通りとなる。(The summand is "08", that is, A=08., the addend is "08".
2'', that is, B=02s, in the case of I, steps SI to S7
Each conclusion is as follows.
87 ・・・・・・ 0000 1000S2・・・・
・・ 0000 0010S3・・・・・・0 ’0O
QO1010S4・・・・・・0 0000.1010
S5・・・・・・・o oooi too。87...0000 1000S2...
・・・ 0000 0010S3・・・・・・0 '0O
QO1010S4...0 0000.1010
S5......ooooi too.
S6・・・・・・o oooo oit。S6...ooooooit.
S7・・・・・・・0 0001 0000ステツプS
7により、l1otaJ 、n口ち「10」がめられる
。S7...0 0001 0000 step S
7, l1otaJ, n-chi "10" is set.
■ 被加数がl’−08」、即ちA=92.、 、加数
が「02」、即ちB=Q 21. の場合、ステップ5
r−87での各結果は次の通りである。■ The summand is l'-08'', that is, A=92. , , the addend is "02", that is, B=Q 21. If , step 5
The results for r-87 are as follows.
SI・・・・・・・ 1001 0010S2・・・・
・・・ oooo oot。SI・・・・・・ 1001 0010S2・・・・
... oooo oot.
S3・・・・・・・0 1001 0100S4・・・
・・・・Otool 0000S5・・・・・・・o
oooo ooo。S3...0 1001 0100S4...
・・・・Otool 0000S5・・・・・・・o
ooooooooo.
Be−−−−−−−000000000S7・・・・・
・・0 1001 0100ステツプS7によりr94
+eJ 、叩ち「−6」がめられる。Be------000000000S7...
...0 1001 0100 r94 by step S7
+eJ, hit "-6".
なお、前記実施例では、加算演算について説明したが、
減算演算にも応用できる。この場合、被減数、減数のい
ずれか一方を[9”+6.jより減する前処理を行なう
と共に、予めキャリーを立てておく必要がある。また、
本発明は、乗算、除算、比較、補数変換などlこも応用
することができ、10進演算処理装置全般に適用できる
。In addition, in the above embodiment, the addition operation was explained, but
It can also be applied to subtraction operations. In this case, it is necessary to perform preprocessing to reduce either the minuend or the subtrahend from [9"+6.j, and to set up a carry in advance. Also,
The present invention can also be applied to multiplication, division, comparison, complement conversion, etc., and can be applied to all decimal arithmetic processing devices.
以上詳述したようにこの発明ζこよれば、次に列挙する
作用効果を奏することができる。As detailed above, according to the present invention, the following effects can be achieved.
■ 最上位桁が数値/符号共用データ桁となる補数表現
の新規なデータ形式のio進データが適用できるので、
従来に比べて数値表現能力が約捧桁向上し、lO進デー
タを格納するのにメモリ領域が効率よく使用できる。■ It is possible to apply io-decimal data in a new data format with complement representation where the most significant digit is a numeric/sign shared data digit.
Numerical representation capability is improved by about an order of magnitude compared to the prior art, and memory area can be used efficiently to store lO-adic data.
■ 2桁間時ζこ処理できるため演算処理速度が高速と
なる。■ The calculation processing speed is high because it can process ζ times between two digits.
■ 異符号演算が直接性なえるので、従来必要であった
演葬前後の補数変換(符号変換)処理が不要となり、演
算処理速度の一層の高速化が図れると共に、補数変換機
能を不要とすることができる。■ Since opposite-sign calculations are less direct, the complement conversion (sign conversion) processing before and after the performance, which was previously necessary, is no longer necessary, further increasing the calculation processing speed and eliminating the need for complement conversion functions. I can do it.
第1図は従来の10進データのデータ形式を示す図、第
2図はこの発明の一実施例に係る事務用演算処理装置の
全体構成を示す図、第3図は第2図の装置で適用される
10進データのデータ形式を示す図、第4図は第2図に
示す演算処理ロジックの内部構成を示す図、第5図は動
作を説明するためのフローヂャートである。
IO・・・CPU、、?(7・・・主メモリ、30・・
・事務用演算ユニッ) (BPHU )、32・・・演
算処理ロジック、53・・・加算器、54・・・フリッ
プフロップ(F/F)、RzN’FLs・・・レジスタ
。
出願人代理人 弁理士 鈴 江 武 彦第1図
第2図
6
第3図
IKS4図FIG. 1 is a diagram showing the data format of conventional decimal data, FIG. 2 is a diagram showing the overall configuration of an office arithmetic processing device according to an embodiment of the present invention, and FIG. FIG. 4 is a diagram showing the data format of applied decimal data, FIG. 4 is a diagram showing the internal configuration of the arithmetic processing logic shown in FIG. 2, and FIG. 5 is a flowchart for explaining the operation. IO...CPU...? (7...main memory, 30...
- Business operation unit) (BPHU), 32... Arithmetic processing logic, 53... Adder, 54... Flip-flop (F/F), RzN'FLs... Register. Applicant's representative Patent attorney Takehiko Suzue Figure 1 Figure 2 Figure 6 Figure 3 IKS Figure 4
Claims (1)
0」〜「8」で10進数値「0」〜「8」の正符号数値
データを示し、16進値「91で補数表現の負符号数値
データを示す数値/符号共用データ桁として用いられ、
残り桁が数値データ桁として用いられる補数表現データ
形式10進データが各種格納される主メモリと、この主
メモ1月こ格納されている上記10進データのうぢ、演
算対象となる第1および第2の上記10進データを読出
して、これらデータ間の演算をF位桁より2桁単位で行
なう演算手段とを具備し、この演算手段は、演算すべき
2桁データを11、iとすると、先行する2桁単位での
演算におけるキャリー出力とhとiとの加算を行ない2
桁データjを算出する手段と、(:((j+x6進数値
「66J)Q+(h■i ) l ANI)(16進
数値[oJ))÷(16進数値rlOJ)x(x6進数
値r6J/)+jの演算を行ない2桁の加算データを得
る手段とを備えていることを特徴とするlo進演算処理
装置。One digit consists of 4 bits, and the most significant digit is the hexadecimal value "
0" to "8" indicate positive sign numerical data with decimal values "0" to "8," and hexadecimal value "91 is used as a numerical/sign shared data digit to indicate negative sign numerical data in complement representation.
The main memory stores various types of decimal data in the complement representation data format in which the remaining digits are used as numerical data digits, and the main memory stores the decimal data stored in this main memo. It is equipped with an arithmetic means for reading out the second decimal data and performing an arithmetic operation between these data in units of two digits starting from the F digit. , the carry output in the preceding two-digit unit operation is added to h and i, and 2
A means for calculating digit data j, and )+j to obtain two-digit addition data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP59035933A JPS60181834A (en) | 1984-02-29 | 1984-02-29 | Decimal arithmetic processor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP59035933A JPS60181834A (en) | 1984-02-29 | 1984-02-29 | Decimal arithmetic processor |
Publications (1)
Publication Number | Publication Date |
---|---|
JPS60181834A true JPS60181834A (en) | 1985-09-17 |
Family
ID=12455824
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP59035933A Pending JPS60181834A (en) | 1984-02-29 | 1984-02-29 | Decimal arithmetic processor |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPS60181834A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4760544A (en) * | 1986-06-20 | 1988-07-26 | Plessey Overseas Limited | Arithmetic logic and shift device |
-
1984
- 1984-02-29 JP JP59035933A patent/JPS60181834A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4760544A (en) * | 1986-06-20 | 1988-07-26 | Plessey Overseas Limited | Arithmetic logic and shift device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JPS6347874A (en) | Arithmetic unit | |
EP0075745B1 (en) | Method and apparatus for division | |
JPH0816365A (en) | Multiplier | |
US4247891A (en) | Leading zero count formation | |
GB2104260A (en) | Arithmatic logic unit | |
JPH0145649B2 (en) | ||
JPH022171B2 (en) | ||
GB2024473A (en) | Key input control apparatus | |
JPS6125245A (en) | Rounding process circuit | |
JP2617974B2 (en) | Data processing device | |
GB2033626A (en) | Floating point arithmetic unit | |
JPS60181834A (en) | Decimal arithmetic processor | |
US4240144A (en) | Long operand alignment and merge operation | |
JPH10187416A (en) | Floating point arithmetic unit | |
US4224677A (en) | Effective digit count on a resultant operand | |
JP2000020486A (en) | Simd type computing element | |
JPH0831024B2 (en) | Arithmetic processor | |
RU2113010C1 (en) | Multiprocessor scalar computer | |
JPS6259828B2 (en) | ||
JPS61138334A (en) | Decimal arithmetic processor | |
JP2001100979A (en) | Method and device for multiplication of integer with sign | |
JPH0251732A (en) | floating point arithmetic unit | |
JPH0225924A (en) | floating point arithmetic processing unit | |
JPS5935236A (en) | Variable word length multiplying circuit | |
JPH01233520A (en) | High radix non-recoverable divider |