JPH087670B2 - Adder circuit - Google Patents
Adder circuitInfo
- Publication number
- JPH087670B2 JPH087670B2 JP1197563A JP19756389A JPH087670B2 JP H087670 B2 JPH087670 B2 JP H087670B2 JP 1197563 A JP1197563 A JP 1197563A JP 19756389 A JP19756389 A JP 19756389A JP H087670 B2 JPH087670 B2 JP H087670B2
- Authority
- JP
- Japan
- Prior art keywords
- carry
- overflow
- adder
- circuit
- bit
- 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 - Fee Related
Links
Description
【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、加算回路に係り、特に2の補数表現でのデ
ィジタル値の加算処理を高速に行う加算回路に関する。Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an adder circuit, and more particularly to an adder circuit that performs addition processing of digital values in two's complement representation at high speed.
第3図は従来の加算回路を示す回路図である。 FIG. 3 is a circuit diagram showing a conventional adder circuit.
第3図において、合計16個の全加算器1が直列接続さ
れている。16ビットのAデータ〔A0,A1,A2,A3,……,A1
3,A14,A15〕と16ビットのBデータ〔B0,B1,B2,B3,……,
B13,B14,B15〕とが、各々の全加算器1に入力される。
ここで、〔Ci,C0,C1,C2,C3,……C12,C13,C14,C15〕は、
各全加算器1の桁上がり信号である。オーバーフロー信
号を出力する排他的論理和10は、桁上がり信号8,9を入
力とする。In FIG. 3, a total of 16 full adders 1 are connected in series. 16-bit A data [A0, A1, A2, A3, ..., A1
3, A14, A15] and 16-bit B data [B0, B1, B2, B3, ...,
B13, B14, B15] are input to each full adder 1.
Here, [Ci, C0, C1, C2, C3, ... C12, C13, C14, C15] is
This is a carry signal of each full adder 1. The exclusive OR 10 which outputs the overflow signal receives the carry signals 8 and 9.
従来の加算回路は、全加算器1を直列接続することに
より構成されており、オーバーフローの検出は、加算結
果の最上位ビットからの桁上がり信号8、及び最上位ビ
ットへの桁上がり信号9の排他的論理和10により求めて
いた。このため、加算処理が終了するまでに加算処理に
よるオーバーフローの有無を判定することはできなかっ
た。The conventional adder circuit is configured by connecting the full adders 1 in series, and the overflow is detected by detecting the carry signal 8 from the most significant bit of the addition result and the carry signal 9 to the most significant bit. It was calculated by exclusive OR 10. Therefore, it is not possible to determine the presence or absence of overflow due to the addition processing before the addition processing ends.
〔発明が解決しようとする課題〕 前述の従来の加算回路に於いては、オーバーフローの
検出を加算処理の結果から行っていたため、オーバーフ
ローの発生により、演算結果の補正処理等を行う場合
に、多大な処理時間が必要になるという欠点があった。[Problems to be Solved by the Invention] In the above-described conventional adder circuit, since overflow is detected from the result of the addition process, a large amount of error occurs when the calculation result is corrected by the occurrence of overflow. However, there is a drawback that it requires a long processing time.
本発明の構成は、2の補数で表現された双方のディジ
タル値の加算処理を多数の直列接続された全加算器で行
う加算回路に於いて、オーバーフローを前記加算処理と
並行して検出するように、前記加算処理を行う全加算器
の途中のビットから取り出した桁上げ信号と、前記桁上
げ信号より上位のビットの加算データとを入力とするオ
ーバーフロー検出回路を設けたことを特徴とする。According to the configuration of the present invention, an overflow is detected in parallel with the addition processing in an addition circuit which performs addition processing of both digital values represented by 2's complement by a large number of full adders connected in series. In addition, an overflow detection circuit is provided, which inputs a carry signal extracted from a bit in the middle of a full adder that performs the addition processing and addition data of bits higher than the carry signal.
次に図面を参照しながら本発明を説明する。 The present invention will now be described with reference to the drawings.
第1図は本発明の第1の実施例の加算回路を示すブロ
ック図である。FIG. 1 is a block diagram showing an adder circuit according to the first embodiment of the present invention.
第1図において、第3図と同様に直列接続された合計
16個の全加算器1が設けられ、さらに本実施例では、オ
ーバーフロー検出回路3が設けられている。本実施例の
動作は、第3図と同様に直列接続された全加算器1で加
算処理を行うが、オーバーフロー検出回路のオーバーフ
ローの検出は、ビット13の全加算器1からの桁上げ信号
2、及びビット14,ビット15の全加算器1への入力デー
タA15,B15,A14,B14(取り出した桁上げ信号より上位の
ビットの加算データ)から、オーバーフロー検出回路3
により行っており、全16ビットの加算動作と、オーバー
フローの検出とを、並行して行うことが可能となる。In Fig. 1, total connected in series as in Fig. 3.
Sixteen full adders 1 are provided, and further, an overflow detection circuit 3 is provided in this embodiment. In the operation of the present embodiment, addition processing is performed by the full adder 1 connected in series as in the case of FIG. 3, but the overflow detection circuit detects overflow by the carry signal 2 from the full adder 1 of bit 13. , And the input data A15, B15, A14, B14 of the bit 14 and the bit 15 to the full adder 1 (addition data of bits higher than the carry signal taken out) are used to detect the overflow detection circuit 3
This makes it possible to perform the addition operation of all 16 bits and the detection of overflow in parallel.
以下に第1図に示したオーバーフロー検出回路3の真
理値表を示す。The truth table of the overflow detection circuit 3 shown in FIG. 1 is shown below.
この真理値表において、Aデジタル入力データ〔A15,
A14〕と、Bデジタル入力データ〔B15,B14〕と、桁上が
り信号C13とが入力された場合、これらのすべての組み
合せを示し、オーバーフロー検出回路3の出力状態を
〔無〕又は〔有〕として示している。 In this truth table, A digital input data [A15,
A14], B digital input data [B15, B14], and carry signal C13 are input, all combinations of these are shown, and the output state of the overflow detection circuit 3 is set to [absent] or [present]. Shows.
従来技術で述べたように、2の補数表現のディジタル
値の加算処理においては、加算器の最上位ビットからの
桁上げと最上位ビットへの桁上げの排他的論理和がオー
バーフローであるため、本実施例では、加算器への入力
データの組合せから最上位ビットからの桁上げ、最上位
ビットへの桁上げの有無を検出することにより、オーバ
ーフローが必ず発生する場合、必ず発生しない場合、及
び検出に使用した入力データの最下位ビットへの桁上げ
入力により左右される場合を判定することが出来る。本
実施例の場合、入力データ〔A15,A14,B15,B14〕が(0,
1,0,1)及び(1,0,1,0)の場合にオーバーフローが必ず
発生し、(0,0,0,1)、(0,1,0,0)、(1,0,1,1)、及
び(1,1,1,0)の場合、ビット14への桁上げ信号(C13)
によりオーバーフローの有無が決定する。従って、本実
施例では、前記組合せを加算器への入力値から検出して
おくことにより、オーバーフローが必ず発生する場合、
必ず発生しない場合、及び桁上げ入力により左右される
場合を判定でき、検出処理を加算処理と並行して行って
おくことにより、最も遅い場合でも、判定に使用する桁
上がりの発生とほぼ同時にオーバーフローの有無を判定
することが出来る。As described in the prior art, in the addition processing of the digital value represented by 2's complement, the exclusive OR of the carry from the most significant bit and the carry to the most significant bit of the adder is an overflow. In this embodiment, a carry from the most significant bit from the combination of input data to the adder, by detecting the presence or absence of a carry to the most significant bit, if overflow always occurs, if it does not occur, and It is possible to determine the case depending on the carry input to the least significant bit of the input data used for detection. In the case of this embodiment, the input data [A15, A14, B15, B14] is (0,
An overflow always occurs in the case of (1,0,1) and (1,0,1,0), and (0,0,0,1), (0,1,0,0), (1,0,1) 1,1) and (1,1,1,0), carry signal to bit 14 (C13)
The presence or absence of overflow is determined by. Therefore, in this embodiment, when the combination is detected from the input value to the adder and overflow always occurs,
It is possible to determine when it does not always occur and when it depends on carry input, and by performing detection processing in parallel with addition processing, even at the slowest time, overflow occurs almost at the same time as the carry used for determination. The presence or absence of can be determined.
本実施例では、加算処理を行う加算回路の途中のビッ
トからの桁上げ信号と、取り出した桁上げ信号より上位
のビットの加算データとの組合せ回路によるオーバーフ
ローの検出回路を設けている。In the present embodiment, an overflow detection circuit is provided by a combination circuit of a carry signal from a bit in the middle of an adder circuit that performs addition processing and added data of bits higher than the taken carry signal.
第2図は本発明の第2の実施例の加算器を示すブロッ
ク図である。FIG. 2 is a block diagram showing an adder according to the second embodiment of the present invention.
第2図において、本実施例の加算器は、直列接続され
た4個の4ビット桁上げ先見加算器4と、先見桁上げ生
成回路5と、オーバーフロー検出回路6とを含み、構成
される。ここで、オーバーフロー検出回路6は、入力デ
ータ〔A15〜A12〕、〔B15〜B12〕、及び桁上げC11信号
とを入力として、前記真理表のようなオーバーフロー信
号を出力する。In FIG. 2, the adder of the present embodiment is configured to include four 4-bit carry look-ahead adders 4 connected in series, a look-ahead carry generation circuit 5, and an overflow detection circuit 6. Here, the overflow detection circuit 6 inputs the input data [A15 to A12], [B15 to B12], and the carry C11 signal, and outputs an overflow signal like the truth table.
第2図では、4ビットの桁上げ先見加算器で実現した
第2の実施例が示されている。FIG. 2 shows a second embodiment realized by a 4-bit carry look-ahead adder.
第2図の場合、桁上げ先見加算器4、及び先見桁上げ
生成回路5により加算処理の高速化を計っている。この
場合も、第1図の場合と同様に、取り出す桁上げ信号よ
り、上位のビットの加算データである桁上げ先見加算器
4の上位4ビットの入力データにより、オーバーフロー
の発生する条件をオーバーフロー検出回路6により検出
することにより、先見桁上げ生成回路5からの桁上げ出
力7とほぼ同時にオーバーフローの有無を検出すること
ができ、第1図の場合と比較して、オーバーフローの検
出を行う桁上げ信号をビット11からの桁上げによって行
っていること、及び桁上げ先見加算回路5の高速桁上げ
出力7により、さらに高速なオーバーフロー検出が可能
となる。In the case of FIG. 2, the carry look-ahead adder 4 and the look-ahead carry generation circuit 5 are used to speed up the addition process. Also in this case, as in the case of FIG. 1, the overflow occurrence condition is detected by the input data of the upper 4 bits of the carry look-ahead adder 4 which is the addition data of the higher order bits of the carry signal to be extracted. By detecting by the circuit 6, the presence or absence of overflow can be detected almost at the same time as the carry output 7 from the look-ahead carry generating circuit 5. Compared with the case of FIG. The fact that the signal is carried by the carry from bit 11 and the high-speed carry output 7 of the carry look-ahead addition circuit 5 enables the detection of overflow at a higher speed.
以上説明したように、本発明は、入力データの加算処
理と並行してオーバーフローの検出を行うことにより、
加算処理の結果からオーバーフローを求める場合に比較
して、より高速にオーバーフローを検出することがで
き、特に浮動小数点演算のように、オーバーフローの発
生により演算結果の補正を行う必要がある処理を高速に
動作させることが出来る効果がある。As described above, according to the present invention, by performing overflow detection in parallel with the addition processing of input data,
Overflow can be detected faster than when the overflow is calculated from the result of the addition process. In particular, the process that needs to correct the operation result due to the occurrence of overflow, such as floating-point arithmetic, can be performed faster. There is an effect that can be operated.
第1図は本発明の第1の実施例の加算回路を示すブロッ
ク図、第2図は本発明の第2の実施例のブロック図、第
3図は従来の加算回路のブロック図である。 1……全加算器、2……全加算器からの桁上げ信号、3
……全加算器からの桁上げ及び全加算器への入力データ
によるオーバーフロー検出回路、4……4ビット桁上げ
先見加算器、5……先見桁上げ生成回路、6……先見桁
上げ生成回路による桁上げ及び加算データによるオーバ
ーフロー検出回路、7……先見桁上げ生成回路による桁
上げ信号、8……最上位ビットの全加算器からの桁上げ
信号、9……最上位ビットの全加算器への桁上げ信号、
10……排他的論理和回路。FIG. 1 is a block diagram showing an adder circuit of a first embodiment of the present invention, FIG. 2 is a block diagram of a second embodiment of the present invention, and FIG. 3 is a block diagram of a conventional adder circuit. 1 ... Full adder, 2 ... Carry signal from full adder, 3
...... Overflow detection circuit due to carry from full adder and input data to full adder, 4 ... 4-bit carry look-ahead adder, 5 ... look-ahead carry generation circuit, 6 ... look-ahead carry generation circuit Overflow detection circuit by carry and addition data by 7; carry signal by look-ahead carry generation circuit; 8 ... carry signal from full adder of most significant bit; 9 ... full adder of most significant bit Carry signal to,
10 ... Exclusive OR circuit.
Claims (1)
の加算処理を多数の直列接続された全加算器で行う加算
回路に於いて、オーバーフローを前記加算処理と並行し
て検出するように、前記加算処理を行う全加算器の途中
のビットから取り出した桁上げ信号と、前記桁上げ信号
より上位のビットの加算データとを入力とするオーバー
フロー検出回路を設けたことを特徴とする加算回路。1. An adder circuit which performs addition processing of both digital values represented by two's complement by a large number of full adders connected in series so that overflow is detected in parallel with the addition processing. An adder circuit provided with an overflow detection circuit for inputting a carry signal extracted from a bit in the middle of a full adder for performing the addition processing and addition data of bits higher than the carry signal. .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP1197563A JPH087670B2 (en) | 1989-07-28 | 1989-07-28 | Adder circuit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP1197563A JPH087670B2 (en) | 1989-07-28 | 1989-07-28 | Adder circuit |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH0362124A JPH0362124A (en) | 1991-03-18 |
JPH087670B2 true JPH087670B2 (en) | 1996-01-29 |
Family
ID=16376584
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP1197563A Expired - Fee Related JPH087670B2 (en) | 1989-07-28 | 1989-07-28 | Adder circuit |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH087670B2 (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH07168696A (en) * | 1993-10-19 | 1995-07-04 | Mitsubishi Electric Corp | Overflow and underflow processing circuit of binary adder |
JP2789577B2 (en) * | 1995-02-07 | 1998-08-20 | 日本電気株式会社 | Addition overflow detection circuit |
EP1061436B1 (en) * | 1997-10-23 | 2007-12-19 | Advanced Micro Devices, Inc. | Multifunction floating point addition/subtraction pipeline |
FR2772946B1 (en) * | 1997-12-23 | 2004-01-30 | Sgs Thomson Microelectronics | METHOD FOR DETERMINING AN EXCEPTION OF FORMAT OF THE RESULT OF AN ARITHMETIC OPERATION CARRIED OUT ON TWO OPERANDS |
KR20030070408A (en) * | 2002-02-25 | 2003-08-30 | 대한산자공업 주식회사 | Drain board for soft ground |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS59226944A (en) * | 1983-06-09 | 1984-12-20 | Fujitsu Ltd | Addition and subtraction system of floating point data |
JPS6227864A (en) * | 1985-07-29 | 1987-02-05 | Pioneer Electronic Corp | Totalizing circuit |
-
1989
- 1989-07-28 JP JP1197563A patent/JPH087670B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JPH0362124A (en) | 1991-03-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US3993891A (en) | High speed parallel digital adder employing conditional and look-ahead approaches | |
JPH0644225B2 (en) | Floating point rounding normalization circuit | |
JPH0542011B2 (en) | ||
EP0487814A2 (en) | Overflow determination for three-operand alus in a scalable compound instruction set machine | |
JPH087670B2 (en) | Adder circuit | |
JP3012357B2 (en) | Shift amount detection circuit | |
EP1052568B1 (en) | Three input split-adder | |
JPH0690668B2 (en) | Fuzzy computing device | |
JPH09204295A (en) | Sticky bit detecting circuit | |
JP2919386B2 (en) | Floating-point detector and floating-point detector | |
JPH0464091B2 (en) | ||
JPH0511980A (en) | Overflow detecting method and circuit | |
KR100252766B1 (en) | Sticky signal generator operating at high-speed | |
JP2556171B2 (en) | Arithmetic circuit | |
JP2674507B2 (en) | Bit error number calculation circuit | |
JP2653134B2 (en) | Arithmetic processing unit | |
JP2532083B2 (en) | Flag generation circuit | |
KR0175358B1 (en) | Status Flag Detection Circuit of Computer for High Speed | |
JP3106525B2 (en) | Addition method and its circuit | |
JP2901463B2 (en) | Addition device | |
KR950015180B1 (en) | High speed adder | |
JPH0797312B2 (en) | Arithmetic unit | |
JPS61188624A (en) | Fixed point arithmetic unit | |
JP3298119B2 (en) | Zero flag generation adder / subtractor | |
JP2556904B2 (en) | High-speed adder / subtractor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
LAPS | Cancellation because of no payment of annual fees |