JPS60186932A - Arithmetic device - Google Patents

Arithmetic device

Info

Publication number
JPS60186932A
JPS60186932A JP59016481A JP1648184A JPS60186932A JP S60186932 A JPS60186932 A JP S60186932A JP 59016481 A JP59016481 A JP 59016481A JP 1648184 A JP1648184 A JP 1648184A JP S60186932 A JPS60186932 A JP S60186932A
Authority
JP
Japan
Prior art keywords
carry
output
circuit
selector
digit
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
JP59016481A
Other languages
Japanese (ja)
Inventor
Yoshihisa Soda
曽田 善久
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
NEC Corp
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 NEC Corp, Nippon Electric Co Ltd filed Critical NEC Corp
Priority to JP59016481A priority Critical patent/JPS60186932A/en
Publication of JPS60186932A publication Critical patent/JPS60186932A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • G06F7/48Methods 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/50Adding; Subtracting
    • G06F7/505Adding; Subtracting in bit-parallel fashion, i.e. having a different digit-handling circuit for each denomination
    • G06F7/506Adding; Subtracting in bit-parallel fashion, i.e. having a different digit-handling circuit for each denomination with simultaneous carry generation for, or propagation over, two or more stages
    • G06F7/507Adding; Subtracting in bit-parallel fashion, i.e. having a different digit-handling circuit for each denomination with simultaneous carry generation for, or propagation over, two or more stages using selection between two conditionally calculated carry or sum values

Abstract

PURPOSE:To attain an operation of an arithmetic device at a high speed by selecting the outputs of arithmetic circuits having carry inputs 0 and 1 respectively in response to the presence or absence of a carry given from a carry look-ahead circuit. CONSTITUTION:This arithmetic circuit is provided with the 1st and 2nd operand holding registers 1 and 2, arithmetic circuit blocks 3-1-3-4, carry look-ahead circuits 4 and 5 having carry inputs 1 and 0 to be applied to the lowest digit respectively, etc. Each of blocks 3-1-3-4 consists of adders 31 and 32 of carry inputs 1 and 0, selectors 33 and 34 of carry inputs 1 and 0 to be applied to the lowest digit respectively, a selector 35 which is selected by the carry output given from the highest digit, and an arithmetic result holding register 36. In case binary numbers A and B of 16 bits, for example, are calculated, the parallel additions are carried out for every 4 bits with blocks 3-1-3-4 respectively. Then the circuit 4 selects the selector 31 or 32 according to the presence or absence of a carry obtained through the prescribed addition of contents of registers 1 and 2.

Description

【発明の詳細な説明】 〔技術分野〕 +Ih fIB kンー嘲「片に発−L/rtr鳥も一
轟齢袖令14り;橘、^演舞装置に関する。
[Detailed Description of the Invention] [Technical Field] +Ih fIB kn-mockery ``Kanini-Hatsu-L/rtr Tori mo Ichigo Age Soderei 14; Tachibana, ^Relating to performance equipment.

例えば浮動小数点演舞における仮数部の演舞的において
絶対価演算がしはしば必要となる。この場合にとくに問
題になるのはある数A(A〉0)からある数B (B〉
O’)の派XA−Bを行なうことである1、この問題は
、減算A−Bを行なうに歯りてA〉Hのときは結果とし
て正符号とその絶対値A−Hの価を与え、また、A<B
のときは結果として負符号とその絶対値B−Aの値を与
えるようにすることである。
For example, absolute value operations are often required in the operation of the mantissa part in floating-point operations. In this case, the problem is that from a certain number A (A〉0) to a certain number B (B〉
The problem is to perform the subtraction A-B, and when A>H, the positive sign and the value of its absolute value A-H are given as a result. , and A<B
In this case, a negative sign and its absolute value B-A should be given as a result.

〔従来技術〕[Prior art]

従来装置においては、これを例えば以下に示すように行
なっている。
In conventional devices, this is done, for example, as shown below.

すなわち、Aン0.B〉Oとし、A−Hの符号とその絶
対値とをめるに当って、Bの各桁毎の補数をとったもの
と■と書くと B、、、F−B ・・・・・・(1) となる。但しFは注目しているすべての桁を11”とし
た価とする。従って F+1=最高桁からのキャリイ十〇 となる。
That is, A 0. Letting B>O, when finding the sign of A-H and its absolute value, take the complement of each digit of B and write it as ■, then B,..., F-B...・(1) becomes. However, F is a value with all the digits of interest being 11". Therefore, F+1=carry from the highest digit is 10.

今、X=A十B+1を作ると、 X=A+B+1 (A−B )+(F+1 )・・・・
・・(2)となシ、A〉Hのときには(2)式は、(A
 B)+最高桁からのキャリイとなる。
Now, if we make X=A0B+1, then X=A+B+1 (A-B)+(F+1)...
...(2) When A>H, equation (2) becomes (A
B)+Carry from the highest digit.

一方、A<BのときにはC)式は、 X=F−(B −A )+1 となシ、この結果、最高桁からキャリイは出す、また、
X−1の各桁毎の補数をとると、X−1=F−(B −
A )=B −Aとなるい 以上をまとめると、Aン0、B〉0のときに、ABをめ
るには、まずX=A−1−B−4−1を作シ、最高桁か
らのキャリイが出る場合には結果は正符号となシ、この
最高桁から出るキャリイを無視した出力XがそのままI
A−Blと々る。
On the other hand, when A<B, formula C) becomes
Taking the complement of each digit of X-1, X-1=F-(B −
A ) = B - A. To summarize the above, when A is 0 and B is 0, to find AB, first create X = A-1-B-4-1, and then find the highest digit. If a carry occurs from the highest digit, the result will be a positive sign, and the output X that ignores the carry from the highest digit will be the same as I.
A-Bl Totoru.

また、最高桁からキャリイが出ない場合には、結果は負
符号となり、x−1の各桁毎の補数をとったx−1がI
A−Blと々る3゜ これをハードウェアで夾現するために、従来は、例えに
、第1図に示すように、第1オペランド保持レジスタ1
′、第2オペランド2′、演算器3′、リコンブリメン
ト回路4′2選択器5′、および演算結果保持レジスタ
6′ からなる回路を用いて以下のように行なう。
Also, if there is no carry from the highest digit, the result will be a negative sign, and x-1, which is the complement of each digit of x-1, will be I
In order to implement this in hardware, conventionally, as shown in FIG. 1, the first operand holding register 1 is
The following process is performed using a circuit consisting of a second operand 2', an arithmetic unit 3', a recombination circuit 4', a selector 5', and an arithmetic result holding register 6'.

すなわち、レジスタ1′、ニは人を格納し、レジスタ2
′には予めBの各桁毎の補数をとったBを格納する。演
舞器3′は最下桁へのキャリイ人力1が加わる加算器と
して動作させ、この結果、演語器3′の出力3000’
には前述のX、つまシ、X=A−1−B+lが生ずる。
That is, registers 1' and 2 store people, and register 2 stores people.
' is stored in advance with B obtained by taking the complement of each digit of B. The performer 3' is operated as an adder in which the carry force 1 is added to the lowest digit, and as a result, the output of the reenactor 3' is 3000'.
The above-mentioned X, tsumashi, and X=A-1-B+l occur.

演算器3′の最高桁からのキャリイは出力3001’か
ら出力されるが、これは前述のように結果の符号として
使用するとともに(出力が@1”の場合には正符号とし
、出力が10”の場合には負符号とする)、選択器5′
に対する制御信号として用いる。。
The carry from the highest digit of the arithmetic unit 3' is output from the output 3001', which is used as the sign of the result as described above (if the output is @1'', it is a positive sign, and the output is 10 ”, a negative sign), selector 5'
used as a control signal for .

すなわち、最高桁からのキャリイ出力3001’が1”
の場合には、選択器5′は演算器3′の出力3000’
 のXを選択してこれをレジスタ6′に格納する。
In other words, the carry output 3001' from the highest digit is 1"
In this case, the selector 5' selects the output 3000' of the arithmetic unit 3'
, and stores it in register 6'.

また、出力3001’が0”の場合にはりコンブリメン
ト回路4′の出力を選択してこれをレジスタ6′ に格
納する。
Further, when the output 3001' is 0'', the output of the recombination circuit 4' is selected and stored in the register 6'.

とのりコンブリメント回路6′は入力Xから1を引き、
その各桁毎の補数をとる演算つまシx −1の演舞を行
なう回路である。
The combination circuit 6' subtracts 1 from the input X,
This is a circuit that performs an arithmetic operation x-1 that takes the complement of each digit.

前述の説明から、以上の動作によ多出力3000’に正
しい符号が、また、レジスタ6″にはIA−Blの正し
い絶対値が得られることは明らかである。
From the foregoing explanation, it is clear that the above operation provides the correct sign at the multi-output 3000' and the correct absolute value of IA-Bl at the register 6''.

なお、絶対値が加算の場合には、レジスタ1′にはAを
、また、レジスタ2″ にはBをそのまま格納し、さら
に演算器3′は最下桁へのキャリイ入力0の加算器とし
て動作させ、選択器5′は常に出力3000’の側を選
択するようにすればよい。
When the absolute value is an addition, A is stored in register 1' and B is stored in register 2'' as is, and arithmetic unit 3' is used as an adder with a carry input of 0 to the lowest digit. The selector 5' may be operated so that the selector 5' always selects the output 3000' side.

さて、以上の構成によると、絶対値減算の場合、A(B
の場合にはりコンブリメント回路4′の出力が選択され
るが、これは演算回路3′ で加算された結果に、さら
に、上述したりコンブリメントの演算をkllrに行な
うためにそれだけ演舞時間が長くかかるという欠点があ
る。
Now, according to the above configuration, in the case of absolute value subtraction, A(B
In this case, the output of the conjoint circuit 4' is selected, but this is the result of addition in the arithmetic circuit 3', and the performance time is longer because the above-mentioned concomitant operation is performed in kllr. It has the disadvantage that it takes a long time.

とくに、高速演算を目的として、演算回路3′にキャリ
イルツクアヘッド方式を用いて高速加算を行なう場合に
は、リコンプリメント回路4′ のために殆んどこれと
同勢の余分の時間を浪費してしまうという欠点がある。
Particularly, when performing high-speed addition using the carry-overhead method in the arithmetic circuit 3' for the purpose of high-speed arithmetic, almost as much extra time is wasted for the recomplement circuit 4'. It has the disadvantage of being

〔発明の目的〕[Purpose of the invention]

本発明の目的は、上述の従来の欠点を除去した演算装置
を提供するにある。
SUMMARY OF THE INVENTION An object of the present invention is to provide an arithmetic device that eliminates the above-mentioned conventional drawbacks.

〔発明の―戚〕[Relatives of invention]

本発明の装機は、絶対値演算を行ないキャリイルツクア
ヘッドを用いた演算回路を肩する演算装置であって、キ
ャリイ入力Oの演算回路と、キャリイ人力1の演算回路
と、キャリイ人力0のキャリイルツクアヘッド回路と、
キャリイ人力1のキャリイルツクアヘッド回路と、前8
11.キャリイルックアヘッド回路から出力されるキャ
リイの有無によシ前記キャリイ人力0の演算回路の出力
と前記キャリイ入力1の演算回路の出力とを選択回路と
を含む。
The equipment of the present invention is an arithmetic device that performs absolute value calculations and supports an arithmetic circuit using a carry-ahead, and includes an arithmetic circuit with O carry input, an arithmetic circuit with 1 carry manpower, and a carry head with 0 carry manpower. Lutsukuahead circuit,
Carry truck head circuit with 1 carry force and front 8
11. The present invention includes a circuit for selecting the output of the arithmetic circuit with zero carry input and the output of the arithmetic circuit with one carry input depending on whether or not there is a carry output from the carry lookahead circuit.

〔実施例〕〔Example〕

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

第2図は本発明の一実施例を示すブロック回である。。FIG. 2 is a block diagram showing one embodiment of the present invention. .

本実施例は、餉1オペランド保持レジスタ1、第2オペ
ランド保持レジスタ2.4個の演算回路ブロック3−1
 、3−2 、3−3 、3−4 、最下桁へのキャリ
イ人力1のキャリイルツクアヘッド回路4および最下桁
へのキャリイ入力0のキャリイルツクアヘッド回路5を
有している。
In this embodiment, an arithmetic circuit block 3-1 includes 1 operand holding register 1, 2 second operand holding registers, and 4 arithmetic circuit blocks 3-1.
, 3-2 , 3-3 , 3-4 , a carry-out look-ahead circuit 4 with a carry input of 1 to the lowest digit, and a carry-out look-ahead circuit 5 with a carry input of 0 to the lowest digit.

また、各演算回路ブロック3−1〜3−4は、キャリイ
入力1の加算器31、キャリイ入力Oの加算器32、最
下桁へのキャリイ人力1の選択器33、最下桁へのキャ
リイ人力0の選択器34、最高桁からのキャリイ出力に
よシ選択される選択器35および演算結果保持レジスタ
36を含む、。
In addition, each arithmetic circuit block 3-1 to 3-4 includes an adder 31 for carry input 1, an adder 32 for carry input O, a selector 33 for carry human power 1 to the lowest digit, and a carry input 1 to the lowest digit. It includes a selector 34 requiring no human input, a selector 35 selected by the carry output from the highest digit, and an operation result holding register 36.

本実施例は、例えば16ビツトの2進数Aと16ビツト
の2進数Bとの演算を取シ扱うものとし、各演算回路ブ
ロック3−1〜3−4はそれぞれ4ビツトずつの並列加
算ヲ行なう4個の演算回路ブロック3−1 、3−2 
、3−3 、3−4からなるものとする。
In this embodiment, for example, operations on a 16-bit binary number A and a 16-bit binary number B are handled, and each arithmetic circuit block 3-1 to 3-4 performs parallel addition of 4 bits each. 4 arithmetic circuit blocks 3-1, 3-2
, 3-3, and 3-4.

キャリイ人力1のキャリイルツクアヘッド回路4は、第
1オペランド保持レジスタ1と第2オペランド保持レジ
スタ2との内容を最下桁へのキャリイ入力1があるとい
う条件の下に加算したときの、上記4個の各4ビツトブ
ロツクに対する下位からのキャリイの有無をキャリイル
ツクアヘッドによシ演算表示する4個の出力を有する。
The carry address circuit 4 of the carry operator 1 calculates the above 4 when the contents of the first operand holding register 1 and the second operand holding register 2 are added under the condition that there is a carry input 1 to the lowest digit. It has four outputs for calculating and displaying the presence or absence of a carry from the lower order for each of the 4-bit blocks based on the carry overhead.

例えば、演算回路ブロック3−1に対する出力4001
−1は、上記の演算の結身、回路ブロック3−1に下位
ブロック(つま多回路ブロック3−2に対応する4ビツ
トブロツク)からのキャリイ入力が存在する(′1#)
か否(0”)かを表示する出力である。
For example, the output 4001 for the arithmetic circuit block 3-1
-1 is the result of the above operation, and the circuit block 3-1 has a carry input from the lower block (4-bit block corresponding to the multi-circuit block 3-2) ('1#)
This is an output that displays whether the output is true or not (0'').

この出力11対応する演算回路ブロック3の中のキャリ
イ入力1の選択器33の入力を選択する制御信号として
供給され、キャリイ入力が存在する場合、つまシこの出
力が@1”の場合にはキャリイ人力1の加温器31の出
力3100側を選択して出力3300に出力し1、キャ
リイ入力が存在しない場合、つまシこの出力が10”の
場合にはキャリイ人力0の加算器32の出力3200側
を選択して出力3300に出力するよう制御する。
This output 11 is supplied as a control signal to select the input of the selector 33 of the carry input 1 in the corresponding arithmetic circuit block 3, and when there is a carry input, if this output is @1'', the carry signal is selected. Select the output 3100 side of the warmer 31 with human power 1 and output it to the output 3300. If there is no carry input, and if this output is 10", the output 3200 of the adder 32 with human power 0 is selected. The selected side is controlled to be output to the output 3300.

同様に、キャリイ入力0のキャリイルツクアヘッド回路
5は、第1オペランド保持レジスタ1と#L2オペラン
ド保持レジスタ2との内容を、下位からのキャリイ入力
が0であるという条件の下に加清したときの、上記4個
の各4ビツトブロツクに対する下位からのキャリイの有
無をキャリイルツクアヘッドによシ演算表示する4個の
出力を有する。例えば、演倉回路ブロック3−1に対す
る出力5001−1 は、上記の演算の結果、回路ブロ
ック3−1に下位ブロック(つまシ団路プpツク3−2
に対応する4ピツドブpツク)からのキャリイ入力が存
在する(11”)か否(@(1’)かを表示する出力で
ある。
Similarly, when the carry-output circuit 5 with a carry input of 0 clears the contents of the first operand holding register 1 and the #L2 operand holding register 2 under the condition that the carry input from the lower order is 0, It has four outputs for calculating and displaying the presence or absence of a carry from the lower order for each of the above four 4-bit blocks based on the carry overhead. For example, as a result of the above calculation, the output 5001-1 to the circuit block 3-1 is output to the circuit block 3-1 from the lower block (Tsumashi platform block 3-2).
This is an output that indicates whether there is a carry input (11") from the 4-pitched book corresponding to (1') or not (@(1')).

この出力は、対応する演算回路ブロック3の中のキャリ
イ入力0の選択器34の入力を選択する制御信号として
供給され、キャリイ入力が存在する場合、つまシこの出
力が′1#の場合にはキャリイ入力1の加算器の出力3
1004111を選択し、さらにとの各桁毎の補数をと
ったものを出力3400に出力し、またキャリイ入力が
存在しない場合、つtbこの出力が@0”の場合にはキ
ャリイ人力0の加算器32の出力3200側を選択し、
さらにとの各桁毎の補数をとったものを出力3400に
出力するように制御する。
This output is supplied as a control signal to select the input of the selector 34 of the carry input 0 in the corresponding arithmetic circuit block 3, and if there is a carry input, and if this output is '1#, Output 3 of adder with carry input 1
1004111, and further takes the complement of each digit and outputs it to output 3400, and if there is no carry input, then if this output is @0, it is an adder with 0 carry input. Select the output 3200 side of 32,
Furthermore, the complement of each digit is taken and the result is controlled to be outputted to the output 3400.

また、キャリイ人力0のルックアヘッド回路5は、前述
の回路5による演舞の結果、最高桁からのキャリイ出力
が生ずる(1”)か否(加”)かを表示する出力500
0を有していて、これは各演算回路ブロック3−1〜3
−4の中のキャリイ出力によシ選択される選択器35の
入力を選択する制御信号として供給され、この選択器3
5をキャリイ出力が生ずる場合(@1”の場合)には、
キャリイ入力lの選択器33の出力3300儒を選択し
、キャリイ出力が生じない場合(10#の場合)にはキ
ャリイ人力Oの選択器34の出力3400側を選択する
ように制御する。
Further, the look-ahead circuit 5 with zero carry power outputs an output 500 indicating whether a carry output from the highest digit is generated (1") or not (+") as a result of the performance by the circuit 5 described above.
0, which corresponds to each arithmetic circuit block 3-1 to 3-3.
-4 is supplied as a control signal to select the input of the selector 35 selected by the carry output, and this selector 3
When a carry output of 5 occurs (in the case of @1”),
The output 3300 of the selector 33 for the carry input 1 is selected, and when the carry output does not occur (in the case of 10#), the output 3400 of the selector 34 for the carry input 0 is selected.

さて次に、例えは演算回路ブロック3−1は、第1オペ
ランド保持レジスタ1の、このブロックに対応する4ビ
ツトの出力と、第2オペランド保持レジスタ2のこのブ
ロックに対応する4ビツトの出力とを、下位からのキャ
リイ入力が1という条件の下に並列に加算する加算器3
1と、同じく下位からのキャリイ入力が0という条件の
下に上と同じものを並列に加算する加算器32とを有し
、加算器31の出力3100と加算器32の出力320
0とは、ともにそれぞれ、キャリイ人力1の選択器33
およびキャリイ人力0の選択器34のそれぞれの入力に
供給されている。
Next, for example, the arithmetic circuit block 3-1 has a 4-bit output corresponding to this block of the first operand holding register 1, and a 4-bit output corresponding to this block of the second operand holding register 2. Adder 3 adds , in parallel under the condition that the carry input from the lower order is 1.
1 and an adder 32 that adds the same as above in parallel under the condition that the carry input from the lower is 0, and the output 3100 of the adder 31 and the output 320 of the adder 32.
0 is the selector 33 of carry human power 1, respectively.
and a carry force 0 selector 34, respectively.

以上のような構成によシ、各演算回路ブロック3の、選
択器33の出力3300は、レジスタ1とレジスタ2と
の内容を、最下桁へのキャリイ入力1があるという条件
の下に加算した結果の、対応するブロックの4ビツトの
出力を正しく与えるこ同様に、各演算回路ブロック3の
選択器34の出力3400は、レジスタ1とレジスタ2
との内容を、最下桁へのキャリイ入力がOであるという
条件の下に加算し、その各桁毎の補数をとった結果の、
対応するブロックに対する4ビツト分の出力を正しく与
えることは明らかでおる。
With the above configuration, the output 3300 of the selector 33 of each arithmetic circuit block 3 adds the contents of register 1 and register 2 under the condition that there is a carry input 1 to the lowest digit. Similarly, the output 3400 of the selector 34 of each arithmetic circuit block 3 is output from register 1 and register 2.
The result of adding the contents of and under the condition that the carry input to the lowest digit is O, and taking the complement of each digit, is
It is clear that the 4-bit output for the corresponding block is correctly provided.

以上の説明よシ、さらに、各演算回路ブロック3の演算
結果保持レジスタ36には、川下のような値が格納され
ることが分る。
Based on the above explanation, it can be seen that the calculation result holding register 36 of each calculation circuit block 3 stores downstream values.

令弟1オペランド保持レジスタ1にA(但しA〉0)を
格納し、第2オペランド保持レジスタ2にB(但しB〉
0とし、BはBの各桁毎の補数をもった値)を格納した
ツする。
Store A (where A>0) in younger brother 1 operand holding register 1, and store B (where B>0) in second operand holding register 2.
0, and B is a value with the complement of each digit of B).

こうすると、もし、A十Bが最高桁からキャリイを出力
する場合、つt〕出力5000が′1″の場合に祉、各
演算回路ブロック3の演算結果保持レジスタ36には、
最下桁へのキャリイ人力lがある場合のA十Bの値、り
ま夛A+B+1の、最高桁からのキャリイ出力を無視し
た値に対する、対応するブロックの4ビツト分が格納さ
れる。
In this way, if A0B outputs a carry from the highest digit, and if the output 5000 is '1', the calculation result holding register 36 of each calculation circuit block 3 will have the following information:
4 bits of the corresponding block are stored for the value of A+B when there is a carry force l to the lowest digit, and the value of A+B+1 ignoring the carry output from the highest digit.

前述のように、B=F−Bから A+l3=A+F−B=F+(A−B)で、最高桁から
キャリイを出力するのはA−B)0の場合であシ、この
場合には、 A十B+1=A−B−4−最高桁からのキャリイ出力と
なるため、各演算結果保持レジスタ36には、A)Hの
場合に、A Bの値の対応するブロックの4ビツト分が
正しく格納されることになる。
As mentioned above, from B=F-B, A+l3=A+F-B=F+(AB), and a carry is output from the highest digit only when A-B)0. In this case, Since A+B+1=A-B-4- is a carry output from the highest digit, each operation result holding register 36 contains the correct 4 bits of the corresponding block of the value of A B in the case of A)H. It will be stored.

またもし、A十Bが最高桁からキャリイを出力しない場
合、つt多出力5000が10”の場合には、各演算回
路ブロック3の演算結果保持レジスタ36に鉱、最下桁
へのキャリイ入力が0である場合の、λ十Bの値の各桁
毎の補数をとった値、つマリ(λ十B)に対応る対応す
るブロックの4ビツト分が格納される。
In addition, if A and B do not output a carry from the highest digit, and if the multi-output 5000 is 10'', a carry input to the lowest digit is input to the operation result holding register 36 of each arithmetic circuit block 3. When λ1B is 0, the value obtained by taking the complement of each digit of the value of λ0B, and 4 bits of the corresponding block corresponding to the value of λ1B is stored.

前述のように、最高桁からキャリイを出力しないのは、
A<、Bの場合であシ、この場合にはとなるため、各演
算結果保持レジスタ36には、−、くBの場合に、BA
の値に対応するブロックの4ビツト分が正しく格納され
ることになる。
As mentioned above, not outputting a carry from the highest digit is
In the case of A<, B, in this case, it becomes , so in each operation result holding register 36, in the case of -, B, BA
4 bits of the block corresponding to the value will be stored correctly.

以上によjj)、A′2Q 、 Bン0の場合に、減算
A−Bを行ない、その絶対値IA Blと、その符号S
とをめるには、Aを第1オペランド保持レジスタ1に格
納し、Bの各桁毎の補数をとった値Bを第2オペランド
保持レジスタ2に格納することによりて得られる各回路
ブロック3−1〜3−4の中の演算結果保持レジスタ3
6の出力を並列に合成するとIA−Blが得られ、また
このときのキャリイルツクアヘッド回路5の最高桁から
のキャリイ出力5000は、この減算結果の符号を与え
ることになる。但し、キャリイ出力5000の11”社
正符号を表わし、キャリイ出力5000の0”は負符号
を表わすものとする。また結果が00場合には負符号が
現われる。
According to the above, in the case of jj), A'2Q, Bn0, perform subtraction A-B, and calculate its absolute value IA Bl and its sign S
To find out, each circuit block 3 obtained by storing A in the first operand holding register 1 and storing the value B obtained by taking the complement of each digit of B in the second operand holding register 2. -1 to 3-4 operation result holding register 3
If the outputs of 6 are combined in parallel, IA-Bl is obtained, and the carry output 5000 from the highest digit of the carry scan head circuit 5 at this time gives the sign of this subtraction result. However, 11'' of the carry output 5000 represents a positive sign, and 0'' of the carry output 5000 represents a negative sign. Also, if the result is 00, a negative sign appears.

以上のように、本実施例によると、最下桁へのキャリイ
入力が1の場合の演算と、最下桁へのキャリイ入力が0
の場合の演算とを、おのおのに対するキャリイルツクア
ヘッド回路と、それに対する加算器とを備えて並列に行
ない、最高桁からのキャリイ出力に応じて前記演算の結
果を選択することによjj)、A)Hの場合の結果も、
A<:Bの場合の結果もキャリイルツクアヘッド回路5
の出力と同時に得られることになる。これによシ前述し
た従来方式に比してほぼ2倍の演算速度が得られること
になる。
As described above, according to this embodiment, the calculation is performed when the carry input to the lowest digit is 1, and when the carry input to the lowest digit is 0.
By performing the calculations in the case of A in parallel by providing a carry-out look-ahead circuit for each and an adder for it, and selecting the result of the calculation according to the carry output from the highest digit, jj), A ) The result for H is also
The result in the case of A<:B is also the same as the carry-out look-ahead circuit 5.
This will be obtained at the same time as the output of . As a result, a computation speed approximately twice as fast as that of the conventional method described above can be obtained.

なお以上は、A〉O、B)Qの場合の減算A−Bを行な
う場合について詳述したが、加算A−1−Bも行なえる
ようにするためには、各演算回路ブロック3のキャリイ
人力Oの選択器34、およびキャリイ出力によシ選択さ
れる選択器35の構成を第3図に示すようにすればよい
Note that the above has been described in detail for the case of performing subtraction A-B in the case of A>O, B)Q, but in order to be able to perform addition A-1-B as well, it is necessary to The configuration of the selector 34 for human power O and the selector 35 selected by the carry output may be as shown in FIG.

すなわち、キャリイ入力0の選択器34のかわシに、第
3図に示すキャリイ入力0の選択器34−Mとして、出
力3100および出力3200のうちの一方を選択しこ
れの各ビットを反転して出力する(各桁毎の補数をとっ
て出力する)前述の出力3400とともに、選択しただ
けで反転をしない出力3401を別に設け、これを第3
図に示すキャリィ出力によシ選択される選択器35−M
に供給する。
That is, in place of the selector 34 with the carry input 0, one of the outputs 3100 and 3200 is selected as the selector 34-M with the carry input 0 shown in FIG. 3, and each bit of this is inverted. In addition to the above-mentioned output 3400 that outputs (takes the complement of each digit and outputs it), we separately provide an output 3401 that does not invert even if it is selected.
Selector 35-M selected by the carry output shown in the figure.
supply to.

従って、選択器35−Mは出力3300と出力3400
と新らしく設けた出力340】との3人力の選択器とな
る。これに対する入力を選択する制御信号は、前述と同
じ回路5からの出力5000のほかに、さらに、減算モ
ード信号3500を供給し、絶対値減算の場合には、こ
の減舞モード信号3500を′1″にして供給し、絶対
値加算を行なう場合にはこれを10″として供給するよ
うにする。そして、選択器35−Mは、制御信号として
の上記出力5000と減算モード信号3500との組合
せに応じて、第4図の○で示すように、上述の3人力の
中の1人力を選択してこれを演算結果保持レジスタ36
に格納する。
Therefore, the selector 35-M outputs 3300 and 3400.
and the newly installed output 340], making it a three-person selector. In addition to the output 5000 from the same circuit 5 as described above, the control signal for selecting the input for this also supplies a subtraction mode signal 3500, and in the case of absolute value subtraction, this reduction mode signal 3500 is If absolute value addition is to be performed, it is supplied as 10''. Then, the selector 35-M selects one of the three manual forces, as indicated by the circle in FIG. 4, according to the combination of the output 5000 as a control signal and the subtraction mode signal 3500. This is stored in the calculation result holding register 36.
Store in.

第4図から明らかなように、絶対値減算の場合(減算モ
ード信号3500が′1”の場合)には、選択器34−
Mと選択器35−Mとは、それぞれ前述の選択器34お
よび選択器35と全く等測的な動作を行なうため、上に
詳述した絶対値減算の動作と全く同じになる。
As is clear from FIG. 4, in the case of absolute value subtraction (when the subtraction mode signal 3500 is '1'), the selector 34-
Since M and selector 35-M perform operations completely isometric to the aforementioned selector 34 and selector 35, respectively, the operation is exactly the same as the absolute value subtraction described in detail above.

これに対して、絶対値加等の場合には、減舞モード信号
3500は60”kなシ、この結果、選択器35−Mは
キャリイルツクアヘッド回路5の最高桁からのキャリイ
出力5000の如伺にかかわらず常に選択器34−Mの
反転しない出力3401を選択してこれを演算結果保持
レジスタ36に供給して格納する。従って、Aを第1オ
ペンンド保持レジスタ1に格納し、Bをそのまま第2オ
ペランド保持レジスタ2に格納することによシ演算結果
保持レジスタ36にはA−1−Hの結果が第列に得られ
ることになる。
On the other hand, in the case of absolute value addition, etc., the reduction mode signal 3500 is 60''k, and as a result, the selector 35-M outputs a signal like the carry output 5000 from the highest digit of the carry-out look-ahead circuit 5. Regardless of the condition, the non-inverted output 3401 of the selector 34-M is always selected and is supplied to and stored in the operation result holding register 36. Therefore, A is stored in the first open holding register 1, and B is left unchanged. By storing the results in the second operand holding register 2, the results of A-1-H are obtained in the operation result holding register 36 in the column.

カお、以上は本発明の一実施例を1明したもので本発明
はこれに限定されるものではない9、例えば、本実施例
においては各演算回路ブロック3は4ビツトづつの演算
を行なうとしたが、これ紘−例であル伺もこれに限るも
のではない。
Please note that the above is an explanation of one embodiment of the present invention, and the present invention is not limited to this.9 For example, in this embodiment, each arithmetic circuit block 3 performs a four-bit operation. However, this example is not limited to this.

また、本実施例においては、最高桁からのキャリイ出力
によシ選択される選択器35の選択制御信号として、最
下桁へのキャリイ人力0のキャリイルツクアヘッド回路
5の、最高桁からのキャリィ出力5000を用いたが、
これは、最下桁へのキャリイ入力1のキャリイルツクア
ヘッド回路4の最高桁からのキャリイ出力を用いるよう
にすることもできる。
In this embodiment, the selection control signal of the selector 35 which is selected by the carry output from the highest digit is the carry output from the highest digit of the carry forward circuit 5 when the carry output to the lowest digit is 0. I used an output of 5000,
This can also be done by using the carry output from the highest digit of the carry forward circuit 4 of the carry input 1 to the lowest digit.

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

以上のように本発明によると、キャリイルツクアヘッド
回路を用いて行なう絶対値減算の高速化を連球できる。
As described above, according to the present invention, the speed of absolute value subtraction performed using a carry-over head circuit can be increased rapidly.

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

第1図は従来例を説明するブロック図、第2図は本発明
の一実施例を示すブロック図、第3図は上記実施例の一
部の詳細を説明するためのプp2り図および第4図はこ
の動作を説明するための図である。 図において、1・旧・・第1オペランド保持レジスタ、
2・・・・・・第2オペランド保持レジスタ、3−1〜
3−4・・・・・・演算回路ブロック、4・・・・・・
最下桁へのキャリイ人力1のキャリイルツクアヘッド回
路、5・・・・・・最下桁へのキャリイ入力0のキャリ
イルックアヘッド回路、31・・・・・・キャリイ人力
1の加算器、32・・・・・・キャリイ入力0の加算器
、33・・・・・・最下桁へのキャリイ入力lの選択器
、34.34−M・・・・・・最下桁へのキャリイ人力
0の選択器、35゜35−M・・・・・・最高桁からの
キャリイ出力によシ選択される選択器、36・・・・・
・演算結果保持レジスタ。 h l 図 z 4 図
FIG. 1 is a block diagram explaining a conventional example, FIG. 2 is a block diagram showing an embodiment of the present invention, and FIG. FIG. 4 is a diagram for explaining this operation. In the figure, 1, old, first operand holding register,
2...Second operand holding register, 3-1~
3-4... Arithmetic circuit block, 4...
Carry lookahead circuit with 1 carry input to the lowest digit, 5... Carry lookahead circuit with 0 carry input to the lowest digit, 31... Adder with 1 carry input, 32 ...Adder with carry input 0, 33...Selector with carry input l to the lowest digit, 34.34-M...Carry manual power to the lowest digit 0 selector, 35°35-M...Selector selected by carry output from the highest digit, 36...
- Operation result holding register. h l Figure z 4 Figure

Claims (1)

【特許請求の範囲】[Claims] 絶対仙演算を行ないキャリイルツクアヘッドを用いた演
舞回路を有する演算装置において、キャリイ入力0の演
算回路と、キャリイ人力1の演算回路と、キャリイ入力
Oのキャリイルツクアヘッド回路と、キャリイ人力1の
キャリイルツクアヘッド回路と、前Weキャリイルツク
アヘッド回路から出力されるキャリイの有無によシ前記
キャリイ人力0の演算回路の出力と前記キャリイ人力1
の演舞回路の出力とを選択回路とを含むことを特徴とす
る演舞装置3.
In an arithmetic device that performs an absolute calculation and has a performance circuit using a carry-forward operation, there is an arithmetic circuit with a carry input of 0, a carry-out operation circuit with a carry force of 1, a carry-out operation circuit with a carry input of O, and a carry-out circuit with a carry force of 1. Depending on the presence or absence of the carry output from the look-ahead circuit and the previous We carry look-ahead circuit, the output of the arithmetic circuit with the carry manpower of 0 and the carry manpower of 1
3. A performance device comprising: an output of a performance circuit; and a selection circuit.
JP59016481A 1984-02-01 1984-02-01 Arithmetic device Pending JPS60186932A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP59016481A JPS60186932A (en) 1984-02-01 1984-02-01 Arithmetic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP59016481A JPS60186932A (en) 1984-02-01 1984-02-01 Arithmetic device

Publications (1)

Publication Number Publication Date
JPS60186932A true JPS60186932A (en) 1985-09-24

Family

ID=11917474

Family Applications (1)

Application Number Title Priority Date Filing Date
JP59016481A Pending JPS60186932A (en) 1984-02-01 1984-02-01 Arithmetic device

Country Status (1)

Country Link
JP (1) JPS60186932A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61131037A (en) * 1984-11-29 1986-06-18 Nec Corp Adder circuit
JPS63118835A (en) * 1986-11-06 1988-05-23 Nec Corp Arithmetic unit
JPH01232423A (en) * 1988-03-11 1989-09-18 Fujitsu Ltd Arithmetic circuit

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5892036A (en) * 1981-11-27 1983-06-01 Toshiba Corp Addition circuit
JPS58225437A (en) * 1982-06-24 1983-12-27 Panafacom Ltd Carry look-ahead adder

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5892036A (en) * 1981-11-27 1983-06-01 Toshiba Corp Addition circuit
JPS58225437A (en) * 1982-06-24 1983-12-27 Panafacom Ltd Carry look-ahead adder

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61131037A (en) * 1984-11-29 1986-06-18 Nec Corp Adder circuit
JPS63118835A (en) * 1986-11-06 1988-05-23 Nec Corp Arithmetic unit
JPH07122845B2 (en) * 1986-11-06 1995-12-25 日本電気株式会社 Arithmetic unit
JPH01232423A (en) * 1988-03-11 1989-09-18 Fujitsu Ltd Arithmetic circuit

Similar Documents

Publication Publication Date Title
US6233597B1 (en) Computing apparatus for double-precision multiplication
JPH01125626A (en) Reciprocal calculating method
US20180052660A1 (en) Apparatus and method for fixed point to floating point conversion and negative power of two detector
JPH0612229A (en) Multiplication and accumulation circuit
US4594680A (en) Apparatus for performing quadratic convergence division in a large data processing system
JPS62191926A (en) Arithmetic unit
JPS60186932A (en) Arithmetic device
JP2722858B2 (en) Square root arithmetic unit
US20170293467A1 (en) Apparatus and method for supporting a conversion instruction
US7080112B2 (en) Method and apparatus for computing an approximation to the reciprocal of a floating point number in IEEE format
JPS63123125A (en) Floating point adder
JP3019796B2 (en) Multiplier
JPS63186329A (en) Pre-processor for trigonometric function
JPH086766A (en) Sine and cosine arithmetic device
JP3691538B2 (en) Vector data addition method and vector data multiplication method
JP2951685B2 (en) Fixed-point arithmetic unit
JP4428778B2 (en) Arithmetic device, arithmetic method, and computing device
JPS61182134A (en) Adding device
JP3522167B2 (en) Arithmetic processing circuit and arithmetic processing method
JP3137131B2 (en) Floating point multiplier and multiplication method
JP2752698B2 (en) Floating point addition / subtraction circuit
JPS6224322A (en) Floating point arithmetic unit
JP3612950B2 (en) Arithmetic apparatus and method
JP3100868B2 (en) Arithmetic unit for floating point numbers
JPH03282926A (en) Floating-point numerical arithmetic unit