JPS6016649B2 - data processing equipment - Google Patents

data processing equipment

Info

Publication number
JPS6016649B2
JPS6016649B2 JP13234877A JP13234877A JPS6016649B2 JP S6016649 B2 JPS6016649 B2 JP S6016649B2 JP 13234877 A JP13234877 A JP 13234877A JP 13234877 A JP13234877 A JP 13234877A JP S6016649 B2 JPS6016649 B2 JP S6016649B2
Authority
JP
Japan
Prior art keywords
data
storage device
temporary storage
word
calculation
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.)
Expired
Application number
JP13234877A
Other languages
Japanese (ja)
Other versions
JPS5465447A (en
Inventor
良成 中崎
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.)
NEC Corp
Original Assignee
Nippon Electric Co 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 Nippon Electric Co Ltd filed Critical Nippon Electric Co Ltd
Priority to JP13234877A priority Critical patent/JPS6016649B2/en
Publication of JPS5465447A publication Critical patent/JPS5465447A/en
Publication of JPS6016649B2 publication Critical patent/JPS6016649B2/en
Expired legal-status Critical Current

Links

Landscapes

  • Executing Machine-Instructions (AREA)

Description

【発明の詳細な説明】 本発明は、演算対象データ長および演算結果が演算器の
演算データ中よりも大きいデータ処理装置の構造に関す
る。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a structure of a data processing device in which the length of data to be operated on and the result of operation are larger than the length of data to be computed by an arithmetic unit.

従来この種の袋贋は演算結果を格納するデータ領域の大
小に従い0づめ、オーバフローチェック処理として特別
な処理を行う必要があった。
Conventionally, with this type of counterfeiting, it was necessary to perform special processing as an overflow check process by zeroing out the data area according to the size of the data area storing the calculation results.

例えば、第1図に一時記憶装置と2つの演算レジスタを
持つ演算装層の例を示す。この装置を用いて2語長(1
3行)のパック型+進数データであるデータAとデータ
Bを加え3語長(24桁)のパック型+進数データであ
るデータCに格納する(A+B→C)第1の例の場合に
ついて説明する。簡単のために各データについて小数点
以下の桁数が等しいものとする。記憶装置1から記憶レ
ジスタ2を介してデータAとデータBを読み出し、一時
記憶装置3に格納される。演算時には演算レジスタA6
には演算アドレスレジスタA4で指示されるデータAの
最下位語を格納し、演算レジスタB7には演算アドレス
レジスタB5で指示されるデータBの最下位語を格納す
る。この両演算レジスタの内容を演算器8で加算して演
算アドレスレジスタB5で指示される語に結果を格納す
る。次に両演算アドレスレジス夕4.5では技下語に続
く上位語、第1図の例では最上位語を指示するように歩
進させ、最下位語の場合と同様に演算結果を演算アドレ
スレジスタ85で指示される位置に格納する。この結果
、演算結果は一時記憶装魔3中のデータBが格納されて
いた2藷に格納されることになる。この演算結果を記憶
装置1中のデータC(3語)に格納するためには上位語
に0づめする必要がある。この操作は受け側データ(デ
ータC)に合わせて一時記憶装置3中の演算結果のさら
に上位1語にゼロを格納して3語の演算結果として記憶
装置1のデータCに一時記憶装置3から出力することに
よって行われる。あるいは2語の演算結果を記憶装置1
のデータCに格納した後、さらに1語をデ−タCに移送
する必要性を検出して記憶レジスタ2で0生成を行いデ
ータCの上位語に0づめを行う制御を行うことにより実
現される。前記のような菱魔においては演算データを格
納する際に一時記憶装置3の0づめ処理あるいは記憶レ
ジスタ2での0生成処理により受け側データの0づめを
行うので、特別な制御が必要になり移送時の効率が悪化
する。
For example, FIG. 1 shows an example of an arithmetic unit layer having a temporary storage device and two arithmetic registers. Using this device, the length of 2 words (1
Regarding the case of the first example (A+B→C), add data A and data B, which are packed type + hexadecimal data (3 lines), and store them in data C, which is packed type + hexadecimal data with a length of 3 words (24 digits). explain. For simplicity, it is assumed that each data has the same number of digits after the decimal point. Data A and data B are read from the storage device 1 via the storage register 2 and stored in the temporary storage device 3. During calculation, calculation register A6
The least significant word of data A indicated by the arithmetic address register A4 is stored in the arithmetic register B7, and the least significant word of the data B indicated by the arithmetic address register B5 is stored in the arithmetic register B7. The contents of both arithmetic registers are added by the arithmetic unit 8 and the result is stored in the word indicated by the arithmetic address register B5. Next, in both operation address registers 4.5, step forward to point to the higher order word following the lower word, in the example in Figure 1, the highest word, and as in the case of the lowest word, the operation result is transferred to the operation address. It is stored in the location indicated by the register 85. As a result, the calculation result will be stored in the second storage area in which data B in the temporary storage device 3 was stored. In order to store this calculation result in data C (3 words) in the storage device 1, it is necessary to pad the higher-order word with 0. This operation stores zero in the upper one word of the operation result in the temporary storage device 3 according to the receiving data (data C), and transfers the operation result from the temporary storage device 3 to the data C of the storage device 1 as the operation result of three words. This is done by outputting. Alternatively, the calculation result of two words can be stored in storage device 1.
This is achieved by detecting the need to transfer one more word to data C after storing it in data C, generating 0 in storage register 2, and performing control to add 0 to the higher-order word of data C. Ru. In the above-mentioned Ryoma, when storing calculation data, the receiving data is zero-filled by zero-filling processing in the temporary storage device 3 or zero-generating processing in the storage register 2, so special control is required. Efficiency during transportation deteriorates.

次にデータAが正で3語のデータ長を有し、その有効デ
ータは最下位語にだけ存在して、データBが正で1語の
データ長で、データAとデータ−Bとの関係がAくBで
あるときに、A−B→Cを行う第2の例の場合を示す。
Next, data A is positive and has a data length of 3 words, and its valid data exists only in the lowest word, data B is positive and has a data length of 1 word, and the relationship between data A and data - B is A second example case in which A-B→C is performed when A×B.

第1図の装置において、減算結果は一時記憶装置3のデ
ータAの領域に書き込まれる。この減算においては先ず
最下位語に関する演算A一Bを行い、この結果ボローが
生ずる。第2番目の下位語を演算するためにはデータB
が1語だけであることから演算レジスタB7には0を格
納して減算を行う必要がある。A〈Bであることからデ
ータAの第2番目、3番目(最上位語)の下位語は0で
あり3回の減算を行った後ポローが発生することからA
−B<oが判明する。十進データの表現に使われるよう
に補数表示でなく十、一の符号を添えて数値を表現する
場合には、上記のA−Bの結果の橘数を計算する必要が
あるので、演算結果の3語に対してさらに3回の減算を
行う必要が生ずる。このように演算対象データのデータ
長が異なる場合、さらに小数点位置がずれていることに
より演算対象データの語単位の対応がなくなるような場
合には語のずれを検出して演算レジスタA6あるいは演
算レジスタB7に0を格納して演算を行う操作が必要と
なる。
In the apparatus shown in FIG. 1, the subtraction result is written to the data A area of the temporary storage device 3. In this subtraction, operations A and B regarding the least significant word are first performed, resulting in a borrow. In order to calculate the second hyponym, data B
Since there is only one word, it is necessary to store 0 in the arithmetic register B7 to perform subtraction. A
-B<o is found. When expressing numerical values by appending tens and ones signs instead of using complements as is used to express decimal data, it is necessary to calculate the orange number of the result of A-B above, so the calculation result It becomes necessary to perform three more subtractions for the three words. If the data lengths of the calculation target data are different in this way, and if the decimal point position is shifted and the word-by-word correspondence of the calculation target data is lost, the word shift is detected and the calculation register A6 or It is necessary to perform an operation by storing 0 in B7.

さらに前記のような減算においてはデータAの上位2語
がゼロであるので最下位語の(A−B)の減算結果に対
して1回の欄数処理用減算を行えば十分であるのに対し
て3回の減算と3回の補数処理用減算を行う。このよう
に演算時の制御機能および演算回数の増加を伴っている
。本発明の目的は、演算結果を送り先(受け側)データ
に格納するときに0生成を行うための特別な制御を行う
ことなく効率よく移送する装置を提供することにある。
Furthermore, in the above subtraction, since the top two words of data A are zero, it is sufficient to perform one column number processing subtraction on the subtraction result of the lowest word (A-B). For this, three subtractions and three-times complement subtraction are performed. In this way, the control function during calculation and the number of calculations are increased. An object of the present invention is to provide an apparatus that efficiently transfers arithmetic results without performing special control to generate 0 when storing them in destination (receiving) data.

本発明の他の目的は、演算対象データの藷の対応に過不
足がある場合において演算データを補うために過不足を
検出して0を生成する制御を不要にして効率よく演算を
行う装置を提供することにある。
Another object of the present invention is to provide a device that efficiently performs calculations by eliminating the need for control to detect surpluses and deficiencies and generate 0s in order to compensate for calculation data when there is excess or deficiency in correspondence between data to be calculated. It is about providing.

本発明の更に他の目的は、演算対象データの内容の特性
に応じて演算範囲を決定して、演算回数をできるだけ少
なくすることにより、演算速度を向上させることができ
る装置を提供することにある。
Still another object of the present invention is to provide an apparatus that can improve the calculation speed by determining the calculation range according to the characteristics of the content of the data to be calculated and reducing the number of calculations as much as possible. .

すなわち、本発明のデータ処理装置は、命令及びデータ
を格納する記憶装置と演算対象データおよび演算結果を
一時的に格納する複数筒の語に分割された一時記憶装置
と、前記一時記憶装置中の語を指定する演算アドレスレ
ジスタと、一時記憶装置の各語の特性を表示して前記演
算アドレスレジス外こよって指示される内容表示器と、
前記一時記憶袋贋への入力データの内容が特定の値であ
るか杏かを検査してこの検査結果を前記内容表示器に出
力するデータ検査器と、前記演算アドレスレジスタによ
って指示される前記一時記憶装置の語を議し出すときに
対応する内容表示器に従って前記一時記憶装置中の語の
内容か前記内容表示器で示される特定の内容を選択する
選択回路と、この選択回路で選択されたデータを入力し
処理結果を前記一時記憶装置に出力する演算器と前記内
容表示器を参照して必要とされる演算範囲を決定する演
算範囲決定回路と、この演算範囲決定回路の出力と演算
アドレスレジスタの内容とを比較して演算制御に必要な
比較信号を生成するアドレス比較回路と、演算と前記一
時記憶装置に格納された演算結果を前記記憶袋鷹に移送
する処理を制御する制御装置とから構成されている。
That is, the data processing device of the present invention includes a storage device for storing instructions and data, a temporary storage device divided into a plurality of words for temporarily storing operation target data and operation results, and a storage device in the temporary storage device. an arithmetic address register that specifies a word; a content display that displays characteristics of each word in the temporary storage device and is indicated by the outside of the arithmetic address register;
a data checker that checks whether the content of the input data to the temporary memory bag is a specific value or not and outputs the test result to the content display; a selection circuit for selecting the content of the word in the temporary storage device or a specific content indicated by the content indicator according to a corresponding content indicator when a word in the storage device is to be discussed; an arithmetic unit that inputs data and outputs processing results to the temporary storage device; an arithmetic range determining circuit that determines a required arithmetic range by referring to the content display; and an output and arithmetic address of the arithmetic range determining circuit. an address comparison circuit that compares the contents of the register and generates a comparison signal necessary for arithmetic control; and a control device that controls a process of arithmetic operations and transfer of the arithmetic results stored in the temporary storage device to the memory bag hawk. It consists of

次にこの発明について図面を参照して詳細に説明する。Next, the present invention will be explained in detail with reference to the drawings.

第2図は本発明の一実施例を示すブロック図である。こ
の実施例では演算対象データは常に小数点以下が同桁で
ある場合である。外部記憶装置I0には加算命令などの
命令列およびデータが保存されている。外部記憶装置1
0に格納されている命令は命令アドレスレジスタ12に
よって指定され命令レジスタ14に読み出される。外部
記憶装置101こ保存されているデー外まデータアドレ
スレジスタ16によって指定され記憶レジスタ18に議
し出される。また記憶レジスタ18の内容をデータアド
レスレジスタ16で指定される外部記憶装置10に格納
することが可能である。シフト回路20では外部記憶装
置10のデータのバイト位置を演算処理し易いデータの
バイト位置に変えるためのシフトを行う。例えば、一時
記憶装置A22においては最下位語を右づめして格納す
るのでこれに合わせてシフト回路20では記憶レジスタ
18の内容をシフトする。またシフト回路20の8桁出
力を全て演算対象データの内容にすることができないと
き、例えば演算対象データが3桁であるときには、残り
の上位5桁には0を挿入してシフト回路20の8桁出力
とする機能も備える。また演算結果を外部記憶装置1川
こ移送する際にもバイト位置合わせが必要となりこのシ
フト回路20が利用される。このシフト回路20は演算
機能、移送機能を備える従釆の計算機で一般に使用され
るものであり、主にデータ選択素子で構成される。シフ
ト回路20からの出力は一時記憶装置22に格納される
と共にデータ検査器24で1語のデータ全てが0である
か否かが検査され全データが0のときには0を出力し、
0以外の数が存在するときには1を出力する。データ検
査器24は通常の論理素子あるいは比較素子により構成
される。一時記憶装置A22への演算対象データ格納位
置は演算アドレスレジスタ26で指定される。さらにデ
ータ検査器24の出力も演算アドレスレジスタ26によ
って指定される内容表示器28の中のビットに格納され
る。内容表示器28は一時記憶装置A22の語数に等し
い数のフリップフロツプで構成される。したがって内容
表示器28の各ビットは一時記憶装置22の各語に対応
して語の内容が全て0であるか否かを示す。さらに、内
容表示器28の全ビットをクリアすることができる。演
算アドレスレジスタ26で指定される語を演算対象デー
タとして読み出すときには、内容表示器28内の対応す
るビットの情報を選択回路30の選択信号として用いる
。この選択信号に応じて選択回路30では演算アドレス
レジスタ26で指示される一時記憶装置A22の語ある
いは0に等しいデータを選択することによって演算アド
レスレジスタ26で指示された演算対象データを得る。
選択回燐30‘ま2入力の中の1つを出力として選択す
るデータ選択素子によって構成されている。選択回路3
0の出力は演算器32の入力となっている。演算器32
は市販の4ビットALU素子を用いて1演算クロックで
8桁の演算を行える構成となっている。また選択回路3
0の出力はシフト回路20によって受け側データへの格
納に適したシフトが行われ記憶レジスタ18に送られる
。記憶レジスタ18の内容を外部記憶装置10に書き込
むことができる。演算器32の他方の入力データはシフ
ト回路20の出力である。この入力データも演算対象デ
ータの最下位桁が語の右端に位置するようにシフト回路
20でシフトされたデータである。演算器32での演算
結果は−記憶装置A22に格納される。このときの格納
位鷹は演算アドレスレジスタ26で示された位鷹である
。一時記憶装置A22に格納すると同時にデータ検査器
24で演算結果として入力する1語が全て0であるか杏
かを検査して対応する内容表示器28に格納する。内容
表示器28の各ビットは演算範囲決定回路34で参照さ
れ一時記憶装置A22に格納した演算対象データで語の
内容が0でない最高位の語が格納されている位置を示す
上位有効アドレス信号(3ビットで表現され、0〜7番
地を示す)を生成する。演算範囲決定回路34は市販の
プラィオリテイェンコーダで構成される。アドレス比較
回路36では、演算対象語を演算する毎に歩進して、順
次、演算処理を行うために歩進する演算アドレスレジス
タ26の内容と上位有効語アドレスとの大小比較を行い
、上位有効語アドレス≦演算アドレスレジスタ内容のと
きに1、そうでないときに0を制御装置38に送る。ア
ドレス比較器36は演算アドレスレジスタ26の3ビッ
トと上位有効語アドレス信号の3ビットを比較するので
市販の4ビット比較素子で構成される。制御走層38は
従釆一般に用いられているマイクロプログラミング技術
によって構成されている装置で命令をデコードして命令
に応じた処理を行う機能を備える。なおマイクロプログ
ラムを用いた制御菱瞳はすでにmM社から販売されてい
る電子計算機360シリーズに使用されている。一実施
例として第2図に示した袋贋を用いて、各種言語で指定
可能なC=A十Bで示される演算を行う場合を説明する
。ここでデータAは十進パックデータ1成行の整数、デ
ータBは十進パックデータ7桁の整数、データCは十進
パックデータ24桁の整数である。処理内容としてはデ
ータAとデータBを加えた結果をデータCに格納する処
理である。データAとデータBの数値内容を第3図に示
すよういにデータA=1230123、データB;32
10321である。一時記憶装置A22は1語4バイト
で8藷から構成されている。外部記憶装置101こ格納
されていた上記加算命令が命令アドレスレジスタ12に
よって指示されるとこの命令を命令レジスタ14に格納
する。
FIG. 2 is a block diagram showing one embodiment of the present invention. In this embodiment, the calculation target data always has the same digits after the decimal point. The external storage device I0 stores instruction sequences such as addition instructions and data. External storage device 1
The instruction stored in 0 is specified by the instruction address register 12 and read into the instruction register 14. The data stored in the external storage device 101 is specified by the data address register 16 and sent to the storage register 18. It is also possible to store the contents of the storage register 18 in the external storage device 10 designated by the data address register 16. The shift circuit 20 performs a shift to change the byte position of data in the external storage device 10 to a byte position of data that is easier to perform arithmetic processing. For example, in the temporary storage device A22, the lowest word is stored right-aligned, so the shift circuit 20 shifts the contents of the storage register 18 accordingly. In addition, when it is not possible to make all the 8-digit output of the shift circuit 20 into the data to be calculated, for example, when the data to be calculated is 3 digits, 0 is inserted into the remaining upper 5 digits. It also has a function to output digits. Also, when transferring the calculation results to an external storage device, byte alignment is required and the shift circuit 20 is used. This shift circuit 20 is generally used in a subordinate computer having an arithmetic function and a transfer function, and is mainly composed of data selection elements. The output from the shift circuit 20 is stored in a temporary storage device 22, and a data checker 24 checks whether all the data of one word is 0. If all the data is 0, it outputs 0.
If a number other than 0 exists, 1 is output. The data checker 24 is constituted by ordinary logic elements or comparison elements. The storage position of the calculation target data in the temporary storage device A22 is specified by the calculation address register 26. Additionally, the output of data checker 24 is also stored in the bit in content indicator 28 specified by arithmetic address register 26. The content display 28 consists of a number of flip-flops equal to the number of words in the temporary storage device A22. Therefore, each bit of content indicator 28 corresponds to each word of temporary storage 22 and indicates whether the content of the word is all zeros. Additionally, all bits of content indicator 28 can be cleared. When reading out the word specified by the operation address register 26 as operation target data, the information of the corresponding bit in the content display 28 is used as a selection signal of the selection circuit 30. In response to this selection signal, the selection circuit 30 selects the word or data equal to 0 in the temporary storage device A22 indicated by the arithmetic address register 26, thereby obtaining the data to be computed indicated by the arithmetic address register 26.
The selection circuit 30' is constituted by a data selection element that selects one of two inputs as an output. Selection circuit 3
The output of 0 serves as an input to the arithmetic unit 32. Arithmetic unit 32
The system uses a commercially available 4-bit ALU element and is configured to perform 8-digit calculations in one calculation clock. Also, selection circuit 3
The output of 0 is shifted by the shift circuit 20 to be suitable for storage in the receiving data and is sent to the storage register 18. The contents of storage register 18 can be written to external storage device 10. The other input data of the arithmetic unit 32 is the output of the shift circuit 20. This input data is also data that has been shifted by the shift circuit 20 so that the least significant digit of the data to be operated on is located at the right end of the word. The calculation result of the calculation unit 32 is stored in the storage device A22. The storage position at this time is the position indicated by the calculation address register 26. At the same time as the data is stored in the temporary storage device A22, the data checker 24 checks whether the input word is all 0 or 0 as a calculation result, and the data is stored in the corresponding content display 28. Each bit of the content display 28 is referenced by the calculation range determining circuit 34 and is used as an upper effective address signal ( (expressed in 3 bits and indicating addresses 0 to 7). The calculation range determining circuit 34 is constructed from a commercially available priority encoder. The address comparison circuit 36 increments each time the arithmetic target word is computed, and compares the contents of the arithmetic address register 26, which is incremented in order to sequentially perform arithmetic processing, with the upper effective word address. If word address≦operation address register contents, 1 is sent to the control device 38, otherwise 0 is sent to the control device 38. Since the address comparator 36 compares 3 bits of the operational address register 26 with 3 bits of the upper effective word address signal, it is constituted by a commercially available 4-bit comparison element. The control layer 38 is a device configured by a commonly used microprogramming technique and has a function of decoding instructions and performing processing according to the instructions. Note that the control system using a microprogram is already used in the computer 360 series sold by mm. As an example, a case will be described in which the computation represented by C=A+B, which can be specified in various languages, is performed using the bag counterfeit shown in FIG. Here, data A is an integer with one row of decimal packed data, data B is an integer with 7 digits of decimal packed data, and data C is an integer with 24 digits of decimal packed data. The processing content is to store the result of adding data A and data B in data C. The numerical contents of data A and data B are as shown in Figure 3, data A = 1230123, data B; 32.
It is 10321. The temporary storage device A22 is composed of 8 lines, each word being 4 bytes. When the addition instruction stored in the external storage device 101 is designated by the instruction address register 12, this instruction is stored in the instruction register 14.

制御装置38は命令レジスタ14を参照して以下に示し
加算命令の制御を行う。演算処理開始時に内容表示器2
8をクリアすると共に最初に一時記憶装置A22に格納
するデータAの最下位語を0番地に格納するために演算
アドレスレジスタ26の内容を0にする。データAの最
下位語がデータアドレスレジスタ16で指示され外部記
憶装置10から記憶レジスタ18に読み出される。この
デー夕はシフト回路20で最下位桁が藷の右端に位置す
るようにシフトされ、演算アドレスレジスタ26で指示
される一時記憶装置A22の0番地に格納される。この
ときシフト回路20の出力はデータ検査器24で全てが
0か否かを検査される。シフト回路20での出力は01
230123であることから0でないことを示すデータ
検査器24の出力1が内容表示器28の0番地に格納さ
れる。続いてデータAを一時記憶装置A22に格納する
ために、演算アドレスレジスタを十1する。データアド
レスレジスタ16も歩進されて外部記憶装置10中のデ
ータAの第2下位語(最上位語)を指示する。この第2
下位語を記憶レジスター8に読み出し、最下位語と同様
にシフト回路20出力を一時記憶袋魔A22の1番地に
格納し、データ検査器22出力を内容表示器28の1番
地に格納する。データ検査器24の出力はシフト回路2
0の出力が0000000であることから0となる。こ
の結果一時記憶装置A22と内容表示器28にセットさ
れた状態を第4図に示す。尚×は0または1を示す。デ
ータAを外部記憶装鷹10から読み出す処理が終了する
とデータアドレスレジスタ16には外部記憶装置10の
データBを指示する内容が格納される。
The control device 38 refers to the instruction register 14 and controls the addition instruction as described below. Content display 2 at the start of calculation processing
8 is cleared, and the contents of the arithmetic address register 26 are set to 0 in order to store the least significant word of data A to be initially stored in the temporary storage device A 22 at address 0. The least significant word of data A is indicated by data address register 16 and read from external storage device 10 to storage register 18 . This data is shifted by the shift circuit 20 so that the least significant digit is located at the right end of the column, and is stored at address 0 of the temporary storage device A 22 designated by the arithmetic address register 26. At this time, the output of the shift circuit 20 is checked by a data checker 24 to see if all are 0. The output of the shift circuit 20 is 01
Since it is 230123, the output 1 of the data checker 24 indicating that it is not 0 is stored at address 0 of the content display 28. Subsequently, in order to store data A in the temporary storage device A22, the arithmetic address register is set to 11. Data address register 16 is also incremented to point to the second lower word (most significant word) of data A in external storage device 10. This second
The lower-order word is read into the storage register 8, the output of the shift circuit 20 is stored in address 1 of the temporary memory storage device A22, and the output of the data checker 22 is stored in address 1 of the content display 28 in the same manner as the lower-order word. The output of the data checker 24 is the shift circuit 2
Since the output of 0 is 0000000, it becomes 0. The resulting state set in the temporary storage device A22 and the content display 28 is shown in FIG. Note that × indicates 0 or 1. When the process of reading data A from the external storage device 10 is completed, the data address register 16 stores contents indicating data B in the external storage device 10.

このデータアドレスレジスタ16に指示されるデータB
の最下位語を記憶レジスタ18に格納する。これによっ
てシフト回路20はデータBの最下位語を出力し演算器
32の入力になる。シフト回路20の出力となるデータ
Bの最下位語出力を第5図に示す。データAも最下位語
から加算処理を行うために演算アドレスレジスタ26に
は0を格納する。この結果、内容表示器28の0審地に
格納されている1が選択回路30の選択信号として出力
される。この選択信号により一時記憶菱鷹A22の0番
地に格納されている01230123がデータAの最下
位語として選択回路30の出力となり、演算器32に出
力される、演算器32では前記データA、データBの最
下位語を加算してその結果(04440444)が一時
記憶装置A22の0番地に格納される。このときの入力
データをデータ検査器24で検査し、格納する語が0で
ないことから内容表示器28の0番地に1が格納される
。データBは7桁で1語内に収まり、演算器32では桁
上りが発生しないので、デ−タAとデータBの加算は1
回で終了する。演算結果を格納したときの一時記憶菱直
A22の内容を第6図に示す。演算結果が得られると外
部記憶装置10中の3語を占めるデータCにこの結果を
格納する。
Data B specified in this data address register 16
The least significant word of is stored in storage register 18. As a result, the shift circuit 20 outputs the least significant word of data B, which becomes an input to the arithmetic unit 32. The lowest word output of data B, which is the output of the shift circuit 20, is shown in FIG. Data A is also stored with 0 in the arithmetic address register 26 in order to perform addition processing starting from the least significant word. As a result, the 1 stored in the 0 field of the content display 28 is output as the selection signal of the selection circuit 30. With this selection signal, 01230123 stored at address 0 of the temporary memory Hishitaka A22 becomes the output of the selection circuit 30 as the lowest word of the data A, and is output to the arithmetic unit 32. The lowest word of B is added and the result (04440444) is stored at address 0 of temporary storage device A22. The input data at this time is checked by the data checker 24, and since the word to be stored is not 0, 1 is stored at address 0 of the content display 28. Data B is 7 digits and fits within one word, and no carry occurs in the arithmetic unit 32, so the addition of data A and data B is 1
It ends in times. FIG. 6 shows the contents of the temporary storage diamond A22 when the calculation results are stored. When a calculation result is obtained, this result is stored in data C occupying three words in the external storage device 10.

下位語から格納するため演算アドレスレジスタ26に0
を格納して、内容表示器28の0番地の内容1を選択信
号として出力する。選択信号が1であることから選択回
路30の出力として一時記憶装置A22の0番地の内容
(0444瓜44)を選択して、シフト回路20を介し
、記憶レジスタ18のデータCに格納する。データアド
レスレジスタ16には外部記憶装置10中のデータCの
最下位桁を指示する内容が格納されているので、これを
参照して記憶レジス夕18中の演算結果最下位語を外部
記憶菱贋10に格納する。続いてデータCの第2下位語
に演算結果を格納するため、演算アドレスレジス夕26
は十1され、内容表示器28の1番地の内容0を選択信
号として出力し、選択回路30の出力として8桁がすべ
て0の十進数(allo)を選択する。これを最下位語
と同様にシフト回路.20、記憶レジスタ18を介して
外部記憶装置10のデータCの第2下位語に格納する。
データCの第3下位語に演算結果を格納するため演算ア
ドレスレジスタ26は十1され内容表示器28の2番地
の内容を指示し、その内容0を選択信号として出力する
。このとき一時記憶装置A22の2番地には演算結果が
格納されていないが、選択信号が0であることから選択
回路30ではalloを出力して外部記憶装置10中の
データCの第3下位語(データCは3語のデータである
から最上位語を意味する)にalloを格納して一連の
加算命令処理を終了する。第2図の実施例において、C
=A−Bの減算を行う場合について説明する。
0 is stored in the calculation address register 26 to store from the lower word.
is stored, and the content 1 at address 0 of the content display 28 is output as a selection signal. Since the selection signal is 1, the contents of address 0 (0444) of the temporary storage device A22 are selected as the output of the selection circuit 30 and stored in the data C of the storage register 18 via the shift circuit 20. The data address register 16 stores contents indicating the least significant digit of the data C in the external storage device 10, so by referring to this, the least significant word of the operation result in the storage register 18 is stored in the external storage device 10. 10. Next, in order to store the operation result in the second lower word of data C, the operation address register 26 is
is 11, the content 0 at address 1 of the content display 28 is output as a selection signal, and a decimal number (allo) in which all eight digits are 0 is selected as the output of the selection circuit 30. This is a shift circuit similar to the lowest word. 20, stored in the second lower word of data C in the external storage device 10 via the storage register 18.
In order to store the operation result in the third lower word of data C, the operation address register 26 is set to 11 to indicate the contents of address 2 of the contents display 28, and outputs the contents 0 as a selection signal. At this time, the calculation result is not stored at address 2 of the temporary storage device A22, but since the selection signal is 0, the selection circuit 30 outputs allo to select the third lower word of the data C in the external storage device 10. (Since data C is 3-word data, it means the most significant word) and allo is stored, and the series of addition instruction processing is completed. In the embodiment of FIG. 2, C
A case in which the subtraction of =A-B is performed will be explained.

データA、データB、データCは前記説明で用いたデー
タと同様のデータ長および値を有するものとする。命令
レジスタ14に、減算命令が格納されて制御装置38で
は減算操作の制御を開始する。
It is assumed that data A, data B, and data C have the same data length and value as the data used in the above description. A subtraction instruction is stored in the instruction register 14, and the control device 38 starts controlling the subtraction operation.

前記加算命令と同様に一時記憶装置A22にはデータA
の2語が0番地、1番地に格納され、第4図と同様の内
容になっている。このとき演算範囲決定回路34におい
ては内容表示器28の内容を参照して、1である最高番
地は0番地であることから上位有効語アドレスレとして
0を出力する。減算開始時には演算アドレスレジスタ2
6に0を格納し演算器32へデータAの最下位語012
30123を選択回路30から出力させる。演算器32
の他方の入力は、シフト回路20から第5図に示すデー
タBの最下位語03210321が送られ減算を行う。
その結果聡01班02を演算器32の出力として一時記
憶装置A22に格納する。それを第7図に示す。このと
き演算器32ではボローが生成される。ここでアドレス
比較回路36では上位有効語アドレスと演算アドレスレ
ジスタ26の内容との大小比較を行い、0=0となるの
で大小比較信号は1になる。この結果、制御装置38で
は、データAの第2下位語にボローを用いた減算を施す
必要がないことを認識し、データA<データBと判定す
る。得られた結果を絶対値で表現するために演算アドレ
スレジスタ26に0を格納して、〔0一選択回路出力〕
処理を演算器32で行う。つまり0一班01鱗02が演
算されその結果01難01班が演算器出力として一時記
憶装置A22の0番地に格納される。これを前記加算命
令のときと同様にして外部記憶装置10のデータCに格
納する。このとき符号表示用データ領域には負のコード
を格納する。第2図の実施例において、データAのデー
タ長がデータBのデータ長より短い語数で構成されてい
た場合について説明する。データAのデータ長に対応す
る演算が終了し、データ8の未演算データが残る状態が
生ずる。このときにデータAより上位の語を演算するた
めには残ののデータBに対応してデータAとしてゼロを
生成する必要が生ずるが、内容表示器28をデータA格
納前に0にしてお秋よ、0を生成するための特別な制御
は不要になる。以上のように本発明のデータ処理装置に
よれば演算結果を移送する際に演算結果の議長よりも大
きいデータが受け側となっている場合に、演算結果のデ
ータ長によって制御を変えることなく0づめが行なえ、
移送制が容易になると共に移送時の性能も向上する。
Similar to the addition instruction, data A is stored in the temporary storage device A22.
The two words are stored at addresses 0 and 1, and the contents are the same as in FIG. At this time, the calculation range determining circuit 34 refers to the contents of the content display 28 and outputs 0 as the upper effective word address since the highest address that is 1 is address 0. Operation address register 2 at the start of subtraction
6 is stored as 0, and the lowest word 012 of data A is sent to the arithmetic unit 32.
30123 is output from the selection circuit 30. Arithmetic unit 32
The other input of is sent the least significant word 03210321 of data B shown in FIG. 5 from the shift circuit 20 to perform subtraction.
As a result, Satoshi 01 Group 02 is stored in the temporary storage device A22 as the output of the arithmetic unit 32. This is shown in Figure 7. At this time, the arithmetic unit 32 generates a borrow. Here, the address comparison circuit 36 compares the higher-order effective word address with the contents of the arithmetic address register 26, and since 0=0, the magnitude comparison signal becomes 1. As a result, the control device 38 recognizes that there is no need to perform subtraction using a borrow on the second lower word of data A, and determines that data A<data B. In order to express the obtained result as an absolute value, 0 is stored in the arithmetic address register 26, and [0-selection circuit output]
Processing is performed by a computing unit 32. In other words, 01 group 01 scale 02 is calculated, and as a result, 01 and 01 group is stored at address 0 of the temporary storage device A22 as the output of the arithmetic unit. This is stored in the data C of the external storage device 10 in the same manner as the addition instruction. At this time, a negative code is stored in the code display data area. In the embodiment shown in FIG. 2, a case will be described in which the data length of data A is made up of a shorter number of words than the data length of data B. A situation arises in which the calculation corresponding to the data length of data A is completed and uncalculated data of data 8 remains. At this time, in order to calculate a word higher than data A, it is necessary to generate zero as data A corresponding to the remaining data B, but the content display 28 must be set to 0 before data A is stored. Autumn, no special control is needed to generate 0. As described above, according to the data processing device of the present invention, when data larger than the length of the calculation result is transferred when the calculation result is transferred, the control can be changed without changing the control depending on the data length of the calculation result. Let's do our best,
The transfer system becomes easier and the performance during transfer is improved.

さらに一時記憶装置に格納されるデータの語長が短いデ
ータを演算する際に上位語の演算用として0を生成する
制御を必要としないので演算性能が向上する。
Furthermore, when computing data stored in the temporary storage device whose word length is short, control for generating 0 for computing high-level words is not required, so computing performance is improved.

さらに減算における処理で示したように演算対象データ
の語単位での内容を表示することにより有効データが格
納されている範囲を検出して演算回数を減少させること
により演算性能を向上させることができる。
Furthermore, as shown in the subtraction process, by displaying the word-by-word contents of the data to be operated on, it is possible to detect the range where valid data is stored and reduce the number of operations, thereby improving computational performance. .

また第2図における実施例の選択回路30への1つの入
力となっているal帆青報生成部としてレジス夕を用い
制御装置38で内容を変えることを可能にすることによ
り、結果格納データにBLANK WHENZERO(
データが0のときに“ブランク(空白)”を格納する)
の編集指定に基づく処理を容易に行える。
In addition, by using a register as an input to the selection circuit 30 of the embodiment shown in FIG. BLANK WHENZERO (
(Stores “blank” when data is 0)
Processing based on editing specifications can be easily performed.

つまり内容表示器28が全て0であった場合には前記レ
ジスタにプランクを格納することにより選択回路出力を
全てブランクに変えることができる。
In other words, when the content display 28 is all 0, all selection circuit outputs can be changed to blanks by storing blanks in the register.

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

第1図は従来のデータ処理装置を示すブロック図、第2
図はこの発明の一実施例を示すブロック図、第3図は2
つの演算対象データ内容を示す図、第4図は一時記憶装
置Aに第1番目の演算対象データを格納したときの内容
を示す図、第5図は第2番目の演算対象データをシフト
回路から出力した内容を示す図、第6図は加算結果を一
時記憶装置Aに格納したときの内容を示す図、第7図は
減算結果を一時記憶装置Aに格納したときの内容を示す
図である。 図において、10…・・・外部記憶装置、12・・・・
・・命令アドレスレジスタ、14…・・・命令レジスタ
、16…・・・データアドレスレジスタ、18・・・・
・・記憶レジスタ、20・・・・・・シフト回路、22
……一時記憶装魔A、24…・・・データ検査器、26
…・・・演算アドレスレジスタ、28・・・・・・内容
表示器、30・・・・・・選択回路、32・・・・・・
演算器、34・・・…演算範囲決定回路、36・・・・
・・アドレス比較回路、38・・・・・・制御装置をそ
れぞれ示す。 オー図 オ2図 オ3図 オ4図 オ5図 力6図 オ7図
Figure 1 is a block diagram showing a conventional data processing device, Figure 2 is a block diagram showing a conventional data processing device.
The figure is a block diagram showing one embodiment of this invention, and FIG.
4 is a diagram showing the contents when the first data to be calculated is stored in the temporary storage device A, and FIG. 5 is a diagram showing the contents of the data to be calculated by the second data from the shift circuit. 6 is a diagram showing the contents when the addition result is stored in the temporary storage device A, and FIG. 7 is a diagram showing the contents when the subtraction result is stored in the temporary storage device A. . In the figure, 10...external storage device, 12...
...Instruction address register, 14...Instruction register, 16...Data address register, 18...
...Storage register, 20...Shift circuit, 22
...Temporary Memory Magic A, 24...Data Examiner, 26
......Arithmetic address register, 28...Content display, 30...Selection circuit, 32...
Arithmetic unit, 34...Arithmetic range determination circuit, 36...
. . . Address comparison circuit, 38 . . . Control device are shown respectively. Figure 0 Figure 2 Figure 3 Figure 4 Figure 5 Figure Power 6 Figure 7

Claims (1)

【特許請求の範囲】[Claims] 1 命令及びデータを格納する記憶装置と、演算対象デ
ータおよび演算結果を一時的に格納する複数箇の語に分
割された一時記憶装置と、前記一時記憶装置中の語を指
定する演算アドレスレジスタと、前記一時記憶装置の各
語の特性を表示して前記演算アドレスレジスによつて指
示される内容表示器と、前記一時記憶装置への入力デー
タの内容が特定の値であるか否かを検査してこの検査結
果を前記内容表示器に出力するデータ検査器と、前記演
算アドレスレジスタによつて指示される前記一時記憶装
置の語を読み出すときに対応する前記内容表示器の信号
に従つて前記一時記憶装置中の語の内容が前記内容表示
器の信号で示される特定の内容を選択する選択回路と、
この選択回路で選択されたデータを入力し処理結果を前
記一時記憶装置に出力する演算器と、前記内容表示器を
参照して必要とされる演算範囲を決定する演算範囲決定
回路と、この演算範囲決定回路の出力と演算アドレスレ
ジスタの内容とを比較して演算制御に必要な比較信号を
生成するアドレス比較回路と、演算と前記一時記憶装置
に格納された演算結果を前記記憶装置に移送する処理を
制御する制御装置とから構成され、演算を効率よく行い
、さらに演算結果を格納する受け側データのデータ長に
応じて効率よく演算結果を移送することを特徴としたデ
ータ処理装置。
1. A storage device that stores instructions and data, a temporary storage device that is divided into a plurality of words that temporarily stores operation target data and operation results, and an operation address register that specifies words in the temporary storage device. , a content indicator that displays the characteristics of each word in the temporary storage device and is indicated by the arithmetic address register, and checks whether the content of the input data to the temporary storage device is a specific value. a data checker for outputting the test result to the content display; and a data checker for outputting the test result to the content display; a selection circuit for selecting a particular content whose word content in a temporary storage device is indicated by the signal of the content indicator;
an arithmetic unit that inputs the data selected by the selection circuit and outputs the processing result to the temporary storage device; an arithmetic range determining circuit that determines the required arithmetic range by referring to the content display; an address comparison circuit that compares the output of the range determination circuit and the contents of the calculation address register to generate a comparison signal necessary for calculation control; and an address comparison circuit that transfers the calculation and the calculation result stored in the temporary storage device to the storage device. A data processing device comprising a control device for controlling processing, efficiently performing calculations, and efficiently transferring the calculation results according to the data length of receiving data in which the calculation results are stored.
JP13234877A 1977-11-02 1977-11-02 data processing equipment Expired JPS6016649B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP13234877A JPS6016649B2 (en) 1977-11-02 1977-11-02 data processing equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP13234877A JPS6016649B2 (en) 1977-11-02 1977-11-02 data processing equipment

Publications (2)

Publication Number Publication Date
JPS5465447A JPS5465447A (en) 1979-05-26
JPS6016649B2 true JPS6016649B2 (en) 1985-04-26

Family

ID=15079240

Family Applications (1)

Application Number Title Priority Date Filing Date
JP13234877A Expired JPS6016649B2 (en) 1977-11-02 1977-11-02 data processing equipment

Country Status (1)

Country Link
JP (1) JPS6016649B2 (en)

Also Published As

Publication number Publication date
JPS5465447A (en) 1979-05-26

Similar Documents

Publication Publication Date Title
US5631859A (en) Floating point arithmetic unit having logic for quad precision arithmetic
US4675809A (en) Data processing system for floating point data having a variable length exponent part
JPH02138620A (en) Calculation of numerical quantity and numerical data processor
FI78186B (en) DATAPROCESSOR SOM UTFOER EN DECIMALMULTIPLIKATIONSOPERATION UNDER ANVAENDNING AV ETT LAESMINNE.
EP0075745A2 (en) Method and apparatus for division
JPH0470662B2 (en)
JPH0145649B2 (en)
US20100095099A1 (en) System and method for storing numbers in first and second formats in a register file
JPH0113130B2 (en)
JPS63245518A (en) Dividing arithmetic unit
JPS5838811B2 (en) marumesouchi
JPH022171B2 (en)
JPH0139131B2 (en)
CA1170773A (en) Data processor using a read only memory for selecting a part of a register into which data is written
JPH034936B2 (en)
JPS6016649B2 (en) data processing equipment
US6240540B1 (en) Cyclic redundancy check in a computer system
JPS5917457B2 (en) Binary coded decimal correction device
JPH0778723B2 (en) Information processing equipment
US5751623A (en) Digital computer for adding and subtracting
JP3055558B2 (en) n-bit arithmetic unit
JPS61109139A (en) Arithmetic unit
JP2606580B2 (en) Numerical data calculation method
JPH02230320A (en) Data processor
JPS6034136B2 (en) Reed-Solomon code decoding method