JPS62118436A - Adder - Google Patents

Adder

Info

Publication number
JPS62118436A
JPS62118436A JP60259953A JP25995385A JPS62118436A JP S62118436 A JPS62118436 A JP S62118436A JP 60259953 A JP60259953 A JP 60259953A JP 25995385 A JP25995385 A JP 25995385A JP S62118436 A JPS62118436 A JP S62118436A
Authority
JP
Japan
Prior art keywords
bit
carry
outputted
adder
bits
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.)
Granted
Application number
JP60259953A
Other languages
Japanese (ja)
Other versions
JPH0566618B2 (en
Inventor
Yoshio Kachi
加地 善男
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
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 filed Critical NEC Corp
Priority to JP60259953A priority Critical patent/JPS62118436A/en
Publication of JPS62118436A publication Critical patent/JPS62118436A/en
Publication of JPH0566618B2 publication Critical patent/JPH0566618B2/ja
Granted legal-status Critical Current

Links

Abstract

PURPOSE:To shorten the adding time by executing a prescribed pretreatment to the bit of the remainder of long digits in the binary addition in which two complements of 2 having the number of the different digit are displayed. CONSTITUTION:Xn-, X show the augend and Yj-, Y show the addend (i>j). A bit Xs is found out in which the propagation of the carry outputted from a (j) bit full adder by the positive and the negative of an addend Yn as the pretreatment in Xi-, Xj+1 is stopped. With the bit Xs as the border, the augend is divided into two parts Xi-Xs+1 and Xs-Xj+1. Concerning Xi-Xs+1, the normal rotation output is outputted and concerning Xs-Xj+1, the inverting output is outputted. Next, when the carry is executed by the selector, the result obtained by the pretreatment is outputted, and when the carry is not executed, by outputting the Xi-Xj+1 as it is, the adding result is obtained. Thus, the adding time can be shortened.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は桁数が異なる2つの2の補数表示された2進数
の加算器に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to an adder for binary numbers expressed in two's complement numbers having different numbers of digits.

〔従来の技術〕[Conventional technology]

従来、加算器においては、桁数の異なる2つの2進数で
あっても、下位ビットからキャリへの伝搬があるためフ
ルアダーの数は長い方の桁数に合わせられていた。つま
り桁数iの加数Yn (%=Oj1、−、 i ) ト
桁数ノ°ノ被加数Xn (s = 0.1. ”・、 
/ )(i>′J)の加算の場合、第4図に示すように
アダー数は1個必要であった。()内のビットは2の補
数表示をした場合の符号ビットの拡張を表わしている。
Conventionally, in an adder, even if two binary numbers have different numbers of digits, the number of full adders is adjusted to the longer number of digits because there is propagation from the lower bits to the carry. In other words, the addend Yn of the number of digits i (%=Oj1, -, i) the summand of the number of digits Xn (s = 0.1. ”・,
/ ) (i>'J), one adder is required as shown in FIG. The bits in parentheses represent the extension of the sign bit in two's complement representation.

5iE3i−t・・・・・・S、 S、は加算結果を示
す。
5iE3i-t...S, S indicates the addition result.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

上述した従来の加算器は、加数と被加数のビット数が異
っているにもかかわらすフルアダーの数は多い方の桁数
に合わされており、しかもその余分の(j−j)ピッ)
においても、一般の加算と同様にキャリーが伝搬する必
要があるため、加電時間も等ビット長同志の加算に要す
るのと同じだけかかるという欠点がある。
In the conventional adder described above, even though the number of bits of the addand and the summand are different, the number of full adders is matched to the number of digits of the larger one, and the extra (j-j) bits are )
Also, since the carry needs to be propagated in the same way as in general addition, there is a drawback that the application time is the same as that required for addition of equal bit lengths.

〔問題点を解決するだめの手段〕[Failure to solve the problem]

本発明の加算器は、桁数が互いに異なる2つの2の補数
表示された2進数Xル(%= 0.1.2.・・・、i
)。
The adder of the present invention has two binary numbers X expressed as two's complement numbers having different numbers of digits (%= 0.1.2..., i
).

Y%(ルー0.1.2.・・・、)°)(ただし、t〉
)″)の加算器であって、X1Xi−t・・・Xl−j
の下のピットXi−ノ から順にYsが正の数のときは
最初@0”が現われるビットX#を、Ysが負の数のと
きは最初に“1″が現われるビットxIを検出する手段
と、前述の最初の@0”または″1mが現われたビット
Xsの1つ上位ビットから上のビットXi…X#+1に
ついてはY%をそのまま加算結果として出力する手段と
、Xsから下位のピッ) Xl Xl−1…Xjについ
ては、ノ°ビット目以下の加算結果によるキャリーの有
無によってXnを反転または正転させて出力する手段を
有する。
Y% (ru 0.1.2...,)°) (however, t>
)''), which is an adder for X1Xi-t...Xl-j
Starting from the bottom pit Xi-no, when Ys is a positive number, the bit X# where "@0" appears first is detected, and when Ys is a negative number, the bit xI where "1" appears first. , means for directly outputting Y% as the addition result for the bits Xi... As for Xl, Xl-1, . . .

本発明は、2進数Xsの(j+1)ピット目からiビッ
ト目までの各ビットのうち下のビットから見て最初に@
01が表われたビットX#でキャリーの伝搬が止ること
に着目し、Xa+*からXiまではY%をそのまま加算
結果とし、XjからXaまでは下位ビットからのキャリ
ーの有無によって反転または正転して加算結果とするこ
とにより、フルアダーの数と加算時間の減少を図ったも
のである。
In the present invention, among the bits from the (j+1)th pit to the i-th bit of the binary number
Focusing on the fact that carry propagation stops at bit X# where 01 appears, from Xa+* to Xi, Y% is used as the addition result, and from Xj to Xa, it is inverted or normal depending on whether there is a carry from the lower bit. By using this as the addition result, the number of full adders and the addition time are reduced.

第2図は本発明の加算器の処理フローを示す流れ図であ
る。まず、加数Ysの正負によって、正の時には被加数
Xnのノ′+1ビット目から上位ビットに向って順に最
初に@0”が現われるビットXsを捜す。一方、これと
平行してノ゛ビット目以下の加算を実行し、キャリーの
有無を判定する。これは実際に加算を実行しなくても、
キャリーの有無を判定するキャリールックアヘッド機能
で十分である。次にXlを境にしてキャリーが無い時に
は被加数X%をそのまま加算結果として出力し、キャリ
ーがある時はノ°+1ビット目からSビット目まで(X
s 、・・・、 Xj+* )を反転し、Xt、・・・
Xl+1を正転させて加算結果として出力する。Ynが
負の場合にはXJFは最初に@1”が現われるビットで
あり、キャリーは@Omのと餘有、11”のとき無いと
読み変えることによって、Y%が正の時と同じよ5に処
理することができる。
FIG. 2 is a flowchart showing the processing flow of the adder of the present invention. First, depending on the sign of the addend Ys, when it is positive, the bit Xs where @0'' appears first is searched for from the +1 bit of the summand Xn toward the higher bits. Executes addition below the bit and determines whether there is a carry.This can be done without actually performing addition.
A carry lookahead function that determines the presence or absence of carry is sufficient. Next, if there is no carry after Xl, the summand
s,..., Xj+*) is inverted and Xt,...
Xl+1 is rotated in the normal direction and output as the addition result. When Yn is negative, XJF is the bit in which @1" appears first, and the carry is the same as @Om and 11" is read as absent, which is the same as when Y% is positive. can be processed.

〔実 施 例〕〔Example〕

次に、本発明の実施例について図面を参照して説明する
Next, embodiments of the present invention will be described with reference to the drawings.

第1図は本発明の加算器の一実施例な示すブロック図で
ある。
FIG. 1 is a block diagram showing one embodiment of an adder according to the present invention.

η、・・・l Xは被加数、 Y/−・・、Yは加数を
表わ、している(i>)°)。Xi、・・・、 Xi+
tにおいては前処理として加数Ysの正負によってjビ
ット目のフルアダーから出力されるキャリーの伝搬がス
トップするビット(XJ)を見つけ出し、 そのビット
を境にして被加数を2つの部分Xi、・・・、 Xl+
1とx#I・・・、 Xj+*に分けjビット目からの
キャリーが有った時にxi、・・・、 Xz+sを正転
、x#、・・・、 X/を反転させて出力するための準
備をする。つまり、Xi = Xl+1については正転
出力、Xa・・・Xl+1については反転出力を出力す
る。次にセレクターによりてキャリーが有った時には前
処理で求めた結果を出力し、中ヤリ−がない時はXi・
・・Xi’sをそのまま出力することによって加算結果
を得る。
η,...l X is the summand, Y/-..., Y is the addend (i>)°). Xi,..., Xi+
At t, as preprocessing, we find the bit (XJ) where the propagation of the carry output from the j-th full adder stops depending on the sign of the addend Ys, and divide the summand into two parts Xi, ・..., Xl+
1 and x#I..., Xj+*, and when there is a carry from the jth bit, xi,..., Xz+s are rotated forward, x#,..., X/ are inverted and output. prepare for. That is, for Xi=Xl+1, a normal output is output, and for Xa...Xl+1, an inverted output is output. Next, when there is a carry by the selector, the result obtained in the preprocessing is output, and when there is no carry, the Xi
... Obtain the addition result by outputting Xi's as is.

第3図は9ピツトの被加数XQ 、X9と3ビツトの・
加数YO〜Y2の加算回路例を示している。下3ビット
の加算にはマンチェスタ一連鎖型キャリー伝搬回路を使
っている。本回路を見て分るように加数と被加数が決っ
てから3ビツト目のフルアダーからキャリーが出力され
るまでの時間と上で述べた前処理に要する時間はほとん
ど等しくなる。従ってキャリーが出力されてからは一つ
の処理(セレクト)で4ビツト目から上位ビットの出力
が得られ従来の方法と比べると著しく高速化が図られる
Figure 3 shows the 9-bit summand XQ, X9 and the 3-bit summand
An example of an addition circuit for addends YO to Y2 is shown. A Manchester single-chain carry propagation circuit is used to add the lower three bits. As can be seen from this circuit, the time from when the addend and summand are determined until the carry is output from the third bit full adder is almost equal to the time required for the preprocessing described above. Therefore, after the carry is output, the output of the upper bits from the 4th bit can be obtained by one process (select), and the speed is significantly increased compared to the conventional method.

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

以上説明したように本発明は、桁数の異なる2つの2進
数の加算において、長い桁数の余りのビットに対して前
処理をはとこし、下位ビットからの桁上げ信号によつて
一つの処理で余りのビットに対応する加算結果が得られ
、着しく加算時間を短かくできる効果がある。
As explained above, in the addition of two binary numbers with different numbers of digits, the present invention performs preprocessing on the remaining bits of the long number of digits, and uses a carry signal from the lower bits to add one binary number. An addition result corresponding to the remaining bits can be obtained through processing, which has the effect of significantly shortening the addition time.

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

第1図は本発明の加算回路の一実施例を示す構成図、第
2図は本発明の加算回路の処理の流れ図、第3図は本発
明の加算回路の一実施例を示す回路図、第4図は従来例
の構成図である。
FIG. 1 is a block diagram showing an embodiment of the adding circuit of the present invention, FIG. 2 is a flowchart of processing of the adding circuit of the present invention, and FIG. 3 is a circuit diagram showing an embodiment of the adding circuit of the present invention. FIG. 4 is a configuration diagram of a conventional example.

Claims (1)

【特許請求の範囲】 桁数が互いに異る2つの2の補数表示された2進数X_
n(n=0、1、2、…、i)、Y_n(n=0、1、
2、…、j)(ただしi>j)の加算器であって、X_
iX_i_−_1…X_i_−_jの下のビットX_i
_−_jから順にY_nが正の数のときは最初に“0”
が現われるビットX_sを、Y_nが負の数のときは最
初に“1”が現われるビットX_sを検出する手段と、 前述の最初に“0”または“1”が現われたビットX_
sの1つ上位ビットから上のビットX_i…X_s_−
_1についてはX_nをそのまま加算結果として出力す
る手段と、 X_sから下位のビットX_sX_s_−_1…X_j
についてはjビット目以下の加算結果によるキャリーの
有無によってX_nを反転または正転させて出力する手
段を有する加算器。
[Claims] Two binary numbers X expressed as two's complement numbers with different numbers of digits
n (n=0, 1, 2, ..., i), Y_n (n=0, 1,
2,...,j) (where i>j),
iX_i_−_1…X_i_−_j lower bit X_i
Starting from ____j, if Y_n is a positive number, first “0”
means for detecting the bit X_s where "1" appears first when Y_n is a negative number, and the bit X_s where "0" or "1" appears first.
Bits from the most significant bit of s X_i...X_s_-
For _1, there is a means for outputting X_n as it is as an addition result, and a means for outputting X_s to the lower bits X_sX_s_-_1...X_j
The adder has means for inverting or normal rotating X_n and outputting it depending on whether there is a carry or not due to the addition result of the j-th bit and below.
JP60259953A 1985-11-19 1985-11-19 Adder Granted JPS62118436A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60259953A JPS62118436A (en) 1985-11-19 1985-11-19 Adder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60259953A JPS62118436A (en) 1985-11-19 1985-11-19 Adder

Publications (2)

Publication Number Publication Date
JPS62118436A true JPS62118436A (en) 1987-05-29
JPH0566618B2 JPH0566618B2 (en) 1993-09-22

Family

ID=17341211

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60259953A Granted JPS62118436A (en) 1985-11-19 1985-11-19 Adder

Country Status (1)

Country Link
JP (1) JPS62118436A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01163827A (en) * 1987-12-21 1989-06-28 Hitachi Ltd Adder-subtracter
JPH03255525A (en) * 1990-03-05 1991-11-14 Fujitsu Ltd Three-input adding circuit
JPH05216624A (en) * 1992-02-03 1993-08-27 Mitsubishi Electric Corp Arithmetic unit

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01163827A (en) * 1987-12-21 1989-06-28 Hitachi Ltd Adder-subtracter
JPH03255525A (en) * 1990-03-05 1991-11-14 Fujitsu Ltd Three-input adding circuit
JPH05216624A (en) * 1992-02-03 1993-08-27 Mitsubishi Electric Corp Arithmetic unit

Also Published As

Publication number Publication date
JPH0566618B2 (en) 1993-09-22

Similar Documents

Publication Publication Date Title
US4953115A (en) Absolute value calculating circuit having a single adder
JPH0479013B2 (en)
JPS5932817B2 (en) Device for performing binary-modulo M conversion of binary numbers
FI862883A (en) KRETS FOER KOMPLEMENTERING AV BINAERA TAL.
JPS62118436A (en) Adder
WO1995005633A3 (en) Carry-look-ahead adder with reduces number of stages
US6282557B1 (en) Low latency fused multiply-adder
JPH04350724A (en) Shift extent detecting circuit
JPS58225437A (en) Carry look-ahead adder
SU1603377A1 (en) Binary serial adder
JPH0736149B2 (en) Shift flag generation circuit
JPH02238522A (en) Arithmetic circuit for absolute value
JP3106525B2 (en) Addition method and its circuit
SU1608647A1 (en) Device for dividing golden proportion parallel codes by two
JP2685466B2 (en) Address calculator
SU572785A1 (en) Adder for adding two m-digit numbers
JPH02304621A (en) Detecting circuit for equivalence of logical value
SU1275429A1 (en) Adder
JPH08123662A (en) Adding method and adder
JPS6148038A (en) Zero detection of adder
JPS61285540A (en) Information processor
JP3370688B2 (en) Flag generation circuit of adder
SU1411769A1 (en) Device for computing system of boolean functions
JP3110072B2 (en) Pre-normalization circuit
JPS6137088Y2 (en)