Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP3335653B2 - Zero detection circuit - Google Patents
[go: Go Back, main page]

JP3335653B2 - Zero detection circuit - Google Patents

Zero detection circuit

Info

Publication number
JP3335653B2
JP3335653B2 JP34590591A JP34590591A JP3335653B2 JP 3335653 B2 JP3335653 B2 JP 3335653B2 JP 34590591 A JP34590591 A JP 34590591A JP 34590591 A JP34590591 A JP 34590591A JP 3335653 B2 JP3335653 B2 JP 3335653B2
Authority
JP
Japan
Prior art keywords
signal
carry
zero
bit
numbers
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 - Lifetime
Application number
JP34590591A
Other languages
Japanese (ja)
Other versions
JPH05181643A (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
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 JP34590591A priority Critical patent/JP3335653B2/en
Publication of JPH05181643A publication Critical patent/JPH05181643A/en
Application granted granted Critical
Publication of JP3335653B2 publication Critical patent/JP3335653B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明はディジタル型の加減算器
の加減算結果の零検出回路に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a circuit for detecting a zero of an addition / subtraction result of a digital adder / subtracter.

【0002】[0002]

【従来の技術】従来、加減算等の演算結果が零であるか
否かは、演算を行った結果全てのビットの反転論理和を
とった結果として得ることができる。
2. Description of the Related Art Conventionally, whether or not the result of an operation such as addition and subtraction is zero can be obtained as a result of calculating the inverted OR of all the bits as a result of the operation.

【0003】図8はこの従来方法を説明するための、零
検出回路の構成図である。この演算器31はnビットの
2数A,Bを入力し、nビットの出力をする。反転論理
和回路32によって演算器31の出力の全てのビットの
反転論理和をとっている。これによって演算結果が零な
らば零信号Zは1となり、結果が零で無ければ零信号Z
は0となる。
FIG. 8 is a block diagram of a zero detecting circuit for explaining this conventional method. The arithmetic unit 31 receives n-bit binary numbers A and B and outputs n-bit data. The inverted OR circuit 32 takes the inverted OR of all the bits of the output of the arithmetic unit 31. Thus, if the operation result is zero, the zero signal Z becomes 1, and if the result is not zero, the zero signal Z
Becomes 0.

【0004】[0004]

【発明が解決しようとする課題】しかしながら従来の零
検出回路では、演算結果を求めた後、零の検出を行うた
め、零信号を得るのは演算結果が得られてからとなり、
結果を得るのに時間がかかる欠点があった。特に加減算
は、桁上げの伝搬が生じるため演算時間がかかり、さら
に零検出の時間が加わるため、全体としての演算時間が
増加してしまう。
However, in the conventional zero detection circuit, since the zero is detected after the operation result is obtained, the zero signal is obtained only after the operation result is obtained.
There was a disadvantage that it took time to obtain a result. In addition, addition and subtraction, in particular, takes a long calculation time due to propagation of carry, and further adds zero detection time, thereby increasing the total calculation time.

【0005】減算の場合は2数が等しい場合に結果が零
となるため、2数の各ビット毎の排他的論理和が零であ
るか否かを調べることで代用できる。しかし、加算の場
合は2数が2の補数の関係である場合に結果が零となる
が、2の補数の関係であるのを調べる手段が必要にな
る。
In the case of subtraction, if the two numbers are equal, the result is zero. Therefore, it can be substituted by checking whether or not the exclusive OR of each bit of the two numbers is zero. However, in the case of addition, when the two numbers have a two's complement relationship, the result is zero. However, means for examining the two's complement relationship is required.

【0006】本発明の目的は、2数の加減算の結果が零
であるか否かを示す零検出信号を2数から直接求める回
路を提供することにある。
An object of the present invention is to provide a circuit for directly obtaining a zero detection signal indicating whether the result of addition / subtraction of two numbers is zero from two numbers.

【0007】[0007]

【課題を解決するための手段】第1の発明は、任意ビッ
トの2数の加減算結果が零か否かを検出する零検出回路
において、前記2数を上位部分と下位部分に分割し、
記上位部分において、前記下位部分からの桁上げがない
場合の、加減算の結果が零か否かを示す零信号(第1零
信号)と桁上げの有無を示す桁上げ信号(第1桁上げ信
号)、および、桁上げがある場合の、零信号(第2零信
号)と桁上げ信号(第2桁上げ信号)を求め、前記下位
部分において、さらに下位からの桁上げがない場合の、
零信号(第3零信号)と桁上げ信号(第3桁上げ信
号)、および、桁上げがある場合の、零信号(第4零信
号)と桁上げ信号(第4桁上げ信号)を求め、前記下位
部分の下位からの桁上げ信号のない場合の桁上げ信号が
ない(第3桁上げ信号=0)場合は、前記上位部分の下
位からの桁上げがない場合の零信号(第1零信号)
下位部分の下位からの桁上げ信号がない場合の零信号
(第3零信号)の論理積を前記2数の加減算結果の下位
からの桁上げがない場合の零信号(第5零信号)とし、
前記上位部分前記下位部分からの桁上げがない場合の
桁上げ信号(第1桁上げ信号)を前記2数の加減算結果
さらに下位から桁上げ信号がない場合の桁上げ信号
(第5桁上げ信号)とし、前記下位部分の下位からの桁
上げ信号がある場合の桁上げ信号がない(第4桁上げ信
号=0)場合は、前記上位部分の下位からの桁上げがな
い場合の零信号(第1零信号)前記下位部分の下位か
らの桁上げ信号がある場合の零信号(第4零信号)の論
理積を前記2数の加減算結果の下位からの桁上げがある
場合の零信号(第6零信号)とし、前記上位部分前記
下位部分からの桁上げがない場合の桁上げ信号(第1桁
上げ信号)を前記2数の加減算結果のさらに下位から
桁上げ信号がある場合の桁上げ信号(第6桁上げ信号)
とし、前記下位部分の下位からの桁上げ信号がない場合
の桁上げ信号がある(第3桁上げ信号=1)場合は、前
記上位部分の下位からの桁上げがある場合の零信号(第
2零信号)と前記下位部分の下位から桁上げ信号がな
い場合の零信号(第3零信号)の論理積を前記2数の加
減算結果の下位から桁上げがない場合の零信号(第5
零信号)とし、前記上位部分前記下位部分からの桁上
げがある場合の桁上げ信号(第2桁上げ信号)を前記2
数の加減算結果のさらに下位からの桁上げ信号がない場
合の桁上げ信号(第5桁上げ信号)とし、前記下位部分
の下位からの桁上げ信号がある場合の桁上げ信号がある
(第4桁上げ信号=1)場合は、前記上位部分の下位か
らの桁上げがある場合の零信号(第2零信号)と前記下
部分の下位から桁上げ信号がある場合の零信号(第
4零信号)の論理積を前記2数の加減算結果の下位から
桁上げがある場合の零信号(第6零信号)とし、前記
上位部分前記下位部分からの桁上げがある場合の桁上
げ信号(第1桁上げ信号)を前記2数の加減算結果の
らに下位からの桁上げ信号がある場合の桁上げ信号(第
6桁上げ信号)とすることを特徴としている。
SUMMARY OF THE INVENTION The first invention is a zero detection circuit 2 number of addition and subtraction result of any bit is detected whether zero or divides the number 2 to the upper part and lower part, before
In the upper part, there is no carry from the lower part
In this case , a zero signal (first zero) indicating whether the result of addition / subtraction is zero or not.
Signal) and carry signal (1st carry signal)
Signal, and a zero signal (second zero signal) when there is a carry.
No.) and obtains a carry signal (second carry-signal), the lower
When there is no carry from the lower part in the part,
Zero signal (third zero signal) and carry signal (third carry signal)
Signal) and a zero signal (the fourth zero signal) when there is a carry.
Signal and carry signal (fourth carry signal).
If there is no carry signal when there is no carry signal from the lower part of the part (third carry signal = 0) , a zero signal (first zero signal) when there is no carry from the lower part of the upper part And before
Zero signal in the case where there is no carry signal from the lower of the serial sub-parts
The logical product of the (third zero signal) is defined as a zero signal (fifth zero signal) when there is no carry from the lower part of the result of addition / subtraction of the two numbers,
Carry signal in the absence of the carry signal of the carry signal in the absence of carry (the first carry-signal) from the further lower of the two numbers of addition and subtraction result from the lower portion of the upper portion
(Fifth carry signal) and there is no carry signal when there is a carry signal from the lower part of the lower part (fourth carry signal).
No. = 0), zero signal (fourth zero signal when there is a carry signal from the lower zero signal (first zero signal) and the lower portion in the absence of a carry from the lower of the upper portion the logical product of) a zero signal when there is a carry from the lower of the two numbers addition and subtraction result (sixth zero signal), in the absence of a carry from the <br/> lower portion of the upper portion Carry signal (first digit
Carry signal) when there is a carry signal from the lower order of the result of addition / subtraction of the two numbers (sixth carry signal).
When there is a carry signal when there is no carry signal from the lower part of the lower part (third carry signal = 1) , a zero signal when there is a carry from the lower part of the upper part (No.
2 zero signal) and the zero signal in the case where there is no carry signal from the lower of the lower portion (third zero signal) zero signal in the absence of a carry a logical product from the lower of the two numbers addition and subtraction result of ( Fifth
A zero signal), the carry signals when there is a carry from the lower portion of the upper portion (second carry-signal) 2
A carry signal (fifth carry signal) when there is no carry signal from the lower part of the result of addition / subtraction of a number is a carry signal when there is a carry signal from the lower part of the lower part. is there
(Fourth carry-signal = 1) case, zero signal when there is a carry signal from the lower zero signal (second zero signal) and the lower part of the case where there is a carry from the lower of the upper portion (No.
The logical product of 4 zero signals is calculated from the lower order of the result of addition and subtraction of the two numbers
Zero signal when there is a carry (Sixth zero signal), and the upper portion of the carry signal (first carry-signal) when there is a carry from the lower portion of the 2 number of addition and subtraction result Sa
The carry signal in the case of La there is a carry signal from the lower (the
(6 digit carry signal) .

【0008】第2の発明は、任意ビットの2数の加減算
結果が零か否かを検出する零検出回路において、前記2
数を上位部分と下位部分に分割し、前記上位部分におい
て、前記下位部分からの桁上げがない場合の、加減算の
結果が零か否かを示す零信号(第1零信号)と桁上げの
有無を示す桁上げ信号(第1桁上げ信号)、および、桁
上げがある場合の、零信号(第2零信号)を求め、前記
下位部分において、さらに下位からの桁上げがない場合
の、零信号(第3零信号)と桁上げ信号(第3桁上げ信
号)、および、桁上げがある場合の、零信号(第4零信
号)を求め、前記下位部分の下位からの桁上げ信号のな
い場合の桁上げ信号がない(第3桁上げ信号=0)場合
は、前記上位部分の下位からの桁上げがない場合の零信
(第1零信号)前記下位部分の下位からの桁上げ信
号がない場合の零信号(第3零信号)の論理積を前記2
数の加減算結果の下位からの桁上げがない場合の零信号
(第5零信号)とし、前記上位部分前記下位部分から
の桁上げがない場合の桁上げ信号(第1桁上げ信号)
前記2数の加減算結果のさらに下位から桁上げ信号が
ない場合の桁上げ信号(第5桁上げ信号)とし、前記下
部分の下位からの桁上げ信号がない場合の桁上げ信号
がある(第3桁上げ信号=1)場合は、前記上位部分
下位からの桁上げがある場合の零信号(第2零信号)
前記下位部分の下位から桁上げ信号がない場合の零信
(第3零信号)の論理積を前記2数の加減算結果の下
位から桁上げがない場合の零信号(第5零信号)
し、前記2数の加減算結果の下位からの桁上げ信号がな
い場合の桁上げ信号(第5桁上げ信号)を論理1とし、
前記下位部分の下位からの桁上げ信号がある場合におい
は、前記上位部分の下位からの桁上げがある場合の零
信号(第2零信号)と前記下位部分の下位から桁上げ
信号がある場合の零信号(第4零信号)の論理積を前記
2数の加減算結果の下位から桁上げがある場合の零信
(第6零信号)とすることを特徴としている。
According to a second aspect of the present invention, there is provided a zero detecting circuit for detecting whether or not a result of addition and subtraction of two arbitrary bits is zero.
Dividing the number in the upper portion and lower portion, said upper portion smell
A zero signal (first zero signal) indicating whether the result of addition / subtraction is zero, a carry signal (first carry signal) indicating the presence or absence of a carry, when there is no carry from the lower part ; And digits
When there is up, obtains a zero signal (second zero signal), the
When there is no carry from the lower part in the lower part
Signal (third zero signal) and carry signal (third carry signal)
Signal) and a zero signal (the fourth zero signal) when there is a carry.
), And if there is no carry signal when there is no carry signal from the lower part of the lower part (third carry signal = 0) , zero if there is no carry from the lower part of the upper part. signal wherein a logical product of (first zero signal) and the zero signal in the absence of a carry signal from the lower of the lower portion (third zero signal) 2
Zero signal when there is no carry from the bottom of the result of adding or subtracting numbers
(Fifth zero signal), and there is no carry signal from the further lower the upper portion of the case there is no carry from the lower part carry signal (first carry-signal) the 2 number of addition and subtraction result If the carry signal from the lower part of the lower part does not exist (third carry signal = 1) , the lower part of the upper part is used as the carry signal (fifth carry signal). zero signal when there is a carry from the (second zero signal) and the zero signal (third zero signal) when there is no carry signal from the lower sub-portions ANDing the two numbers addition and subtraction result of a zero signal in the case where there is no carry from the lower (5 zero signal), the carry signal in the case where there is no carry signal from the lower of the two numbers of addition and subtraction results (fifth carry-signal) and a logic 1 ,
Smell if there is a carry signal from the lower of the lower part
Te is the logical product of the zero signal when there is a carry from the lower of the upper portion (second zero signal) and the zero signal in the case where there is a carry signal from the lower of the lower portion (fourth zero signal) Is a zero signal (sixth zero signal) when there is a carry from the lower part of the result of addition and subtraction of the two numbers.

【0009】第3の発明の零検出回路は、第1の発明ま
たは第2の発明において、任意ビットの2数を上位と下
位に分割したそれぞれの零信号を求めることを特徴とし
ている。
A zero detection circuit according to a third invention is characterized in that, in the first invention or the second invention, two zero signals obtained by dividing two arbitrary bits into upper and lower bits are obtained.

【0010】第4の発明の零検出回路は、1ビットの2
数の排他的反転論理和を下位からの桁上げがない場合の
零信号とし、前記2数の排他的論理和を下位からの桁上
げがある場合の零信号とし、前記2数の一方を桁上げ信
号とすることにより、1ビットの加減算の結果が零か否
かを検出することを特徴としている。
[0010] A zero detection circuit according to a fourth aspect of the present invention comprises a 1-bit 2
The exclusive OR of the numbers is a zero signal when there is no carry from the lower order, the exclusive OR of the two numbers is a zero signal when there is a carry from the lower order, and one of the two numbers is a digit. It is characterized by detecting whether or not the result of 1-bit addition / subtraction is zero by using an up signal.

【0011】第5の発明は、1ビットの2数の加減算の
結果が零か否かを検出する零検出回路において、加算の
時は前記2数の排他的反転論理和を下位からの桁上げが
ない場合の零信号とし、前記2数の排他的論理和を下位
からの桁上げがある場合の零信号とし、前記2数の一方
を桁上げ信号とし、減算の時は前記2数の排他的反転論
理和を零信号とし、桁上げ信号を桁上げ無しとすること
を特徴としている。
According to a fifth aspect of the present invention, there is provided a zero detection circuit for detecting whether or not the result of addition and subtraction of two 1-bit numbers is zero. , The exclusive-OR of the two numbers is used as the zero signal when there is a carry from the bottom, one of the two numbers is used as the carry signal, and the subtraction of the two numbers is used in subtraction. It is characterized in that the logical inversion logical sum is set to a zero signal and the carry signal is set to no carry.

【0012】[0012]

【作用】nビットの2数の加減算結果が零であるか否か
を検出するためには、演算中に桁上げ信号が最悪の場合
には最下位ビットから最上位ビットまで伝播するため、
演算時間が長くなる。nビットより短い2数では、桁上
げ信号の伝播段数が短くなるため、演算時間を少なくす
ることができる。そこで、nビットをその上位nhビッ
トと下位nlビットに分割し、それぞれの加減算結果が
零であるか否かを検出する。nhビット,nlビットは
ともにnビットより短いので、nビットの加減算結果の
零信号よりも、短時間で検出することができる。
In order to detect whether or not the result of addition / subtraction of two n-bit numbers is zero, the carry signal propagates from the least significant bit to the most significant bit in the worst case during the operation.
The calculation time becomes longer. With two numbers shorter than n bits, the number of propagation stages of the carry signal becomes shorter, so that the calculation time can be reduced. Therefore, the n bits are divided into the upper nh bits and the lower nl bits, and it is detected whether or not the respective addition / subtraction results are zero. Since both the nh bit and the nl bit are shorter than n bits, the detection can be performed in a shorter time than the zero signal resulting from the n-bit addition / subtraction.

【0013】次に、分割したそれぞれの零信号から、n
ビット全体の零信号を求める。それには、上位nhビッ
トの零信号は下位からの桁上げ信号がある場合とない場
合の2通り用意しておく必要がある。また、下位nlビ
ットの加減算において桁上げするか否かを示す桁上げ信
号も必要である。下位の桁上げ信号がない場合は、上位
の2通りの零信号の内、下位からの桁上げがないときの
零信号を選択し、下位の零信号とともにlであるなら
ば、全体のnビットの加減算での零信号もlとすれば良
い。下位の桁上げ信号がある場合は、上位の零信号とし
て下位からの桁上げがあるときの零信号を選択し、下位
の零信号とともにlであるならば全体nビットの加減算
での零信号もlとすれば良い。そのほかの場合は全体の
零信号は0である。
Next, from each of the divided zero signals, n
Find the zero signal for all bits. For that purpose, it is necessary to prepare two types of zero signals of the upper nh bits, with and without a carry signal from the lower order. Also, a carry signal indicating whether or not to carry in addition and subtraction of the lower nl bits is required. If there is no lower carry signal, a zero signal without a carry from the lower one is selected from the upper two kinds of zero signals. It is sufficient that the zero signal in the addition / subtraction of is also 1. If there is a lower carry signal, select the zero signal when there is a carry from the lower side as the upper zero signal. It is sufficient to set it to l. Otherwise, the overall zero signal is zero.

【0014】分割したnhビットとnlビットの加減算
の結果が零であることを検出するため、さらに短いビッ
トに分割し、同じ方法によって零信号を求めることがで
きる。これを繰り返していくと最終的には、全てを1ビ
ットに分割することができる。1ビットの加算の場合
は、下位からの桁上げがない場合、2数ともに0または
1の時に結果が0となり、下位からの桁上げがある場
合、2数の一方が1もう一方が0であるときに結果が0
となる。よって簡単な論理ゲートで求めることができ
る。これらの結果を2ビットずつまとめ、2ビットの加
減算の零信号を求め、さらに2つ結合していくことで任
意のビットの零検出を行う。
In order to detect that the result of addition / subtraction of the divided nh bits and nl bits is zero, the signal is further divided into shorter bits, and a zero signal can be obtained by the same method. By repeating this, eventually, everything can be divided into one bit. In the case of 1-bit addition, if there is no carry from the low order, the result is 0 when both numbers are 0 or 1, and if there is a carry from the low order, one of the two numbers is 1 and the other is 0. Sometimes the result is 0
Becomes Therefore, it can be obtained with a simple logic gate. These results are combined two bits at a time, a zero signal for addition and subtraction of two bits is obtained, and further two are combined to perform zero detection of an arbitrary bit.

【0015】先に述べたように、結合するためには、加
減算結果の零信号だけでなく、桁上げ信号が必要であ
る。1ビットの加減算の場合、下位からの桁上げが0の
場合、2数がともに1または0の時零であるので、桁上
げ信号は2数がともに1の時には1、ともに0の時は0
とすれば良い。2数が1と0である場合は、零信号が0
となるため、上位の零信号がどんな場合でも結合したと
きに0になるから、桁上げ信号は正しくなくてもかまわ
ない。よって、2数の内一方をそのまま桁上げ信号とす
れば十分である。下位からの桁上げがある場合は、2数
が1と0の時零信号が1となるので、下位の桁上げを加
えるとこのビットからも桁上げ信号が発生することにな
る。2数がともに1または0の時は零信号が0となる
が、桁上げ信号がない場合と同様に、正しい桁上げ信号
を求める必要がない。よってこの場合の桁上げ信号は常
に1とすれば良い。これらのことを式にまとめると、以
下のようになる。入力する2数をa,b、零信号をZ
0,Z1、桁上げ信号をC0,C1とする。最後の文字
が0のものは、下位からの桁上げが0の時の値、最後の
文字が1のものは下位からの桁上げが1の時の値であ
る。^は排他的論理和を〜はビットの反転を表す演算子
とすると、 Z0=〜(a^b) (1) Z1=a^b (2) C0=a(またはb) (3) C1=1 (4) となる。
As described above, in order to combine, not only a zero signal as a result of addition and subtraction but also a carry signal is required. In the case of 1-bit addition / subtraction, when the carry from the lower order is 0, the two numbers are zero when both are 1 or 0. Therefore, the carry signal is 1 when both 2 are 1 and 0 when both are 0.
It is good. If the numbers are 1 and 0, the zero signal is 0
Since the upper zero signal becomes 0 when combined in any case, the carry signal does not have to be correct. Therefore, it is sufficient to use one of the two numbers as the carry signal. If there is a carry from the lower part, the zero signal becomes 1 when the two numbers are 1 and 0. Therefore, if the lower carry is added, a carry signal is also generated from this bit. When the two numbers are both 1 or 0, the zero signal becomes 0, but there is no need to find the correct carry signal as in the case where there is no carry signal. Therefore, the carry signal in this case should always be 1. These can be summarized as follows. The input two numbers are a and b, and the zero signal is Z
0, Z1 and carry signals C0, C1. When the last character is 0, the value when the carry from the lower bit is 0 is the value, and when the last character is 1, the value when the carry from the lower bit is 1 is the value. ^ is an exclusive OR and 〜 is an operator representing bit inversion. Z0 = 〜 (a ^ b) (1) Z1 = a ^ b (2) C0 = a (or b) (3) C1 = 1 (4).

【0016】結合を繰り返し行う場合は、結合後の零信
号と桁上げ信号を生成しなくてはならない。結合後の零
信号に下位からの桁上げの有無を考慮するためには、結
合する下位の零信号についても、下位からの桁上げがあ
る場合とない場合の2通りの信号を用意して使い分ける
ことで対応できる。これを式にまとめると以下のように
なる。下位の零信号をZL0(第3零信号),ZL1
(第4零信号)、下位の桁上げ信号をCL0(第3桁上
げ信号),CL1(第4桁上げ信号)、上位の零信号を
ZH0(第1零信号),ZH1(第2零信号)、上位の
桁上げ信号をCH0(第1桁上げ信号),CH1(第2
桁上げ信号)、結合後の零信号をZ0(第5零信号)
Z1(第6零信号)、桁上げ信号をC0(第5桁上げ信
号),C1(第6桁上げ信号)とする。但し、最後の文
字が0のものは、その下位からの桁上げ信号が0の時の
値、1のものはその下位からの桁上げ信号は1の時の値
である。また、&は論理積、|は論理和、〜はビットの
反転を表す演算子とする。
When the combination is repeatedly performed, a zero signal and a carry signal after the combination must be generated. In order to consider the presence / absence of a carry from the lower part of the combined zero signal, two kinds of signals with and without the carry from the lower part are prepared and used for the combined lower zero signal. That can be dealt with. This can be summarized as follows. ZL0 (third zero signal) , ZL1
(4th zero signal) , lower carry signal CL0 (3rd digit upper
Signal , CL1 (fourth carry signal) , upper zero signal ZH0 (first zero signal) , ZH1 (second zero signal) , higher carry signal CH0 (first carry signal) , CH1 (Second
Carry signal) , the combined zero signal as Z0 (fifth zero signal) ,
Z1 (6th zero signal) , carry signal C0 (5th carry signal)
) , C1 (sixth carry signal) . However, when the last character is 0, the value when the carry signal from the lower order is 0, and when it is 1, the value when the carry signal from the lower order is 1 is the value. & Is a logical product, | is a logical sum, and ~ are operators representing bit inversion.

【0017】 Z0=ZL0&((〜CL0&ZH0)|(CL0&ZH1)) (5) Z1=ZL1&((〜CL1&ZH0)|(CL1&ZH1)) (6) C0=(〜CL0&CH0)|(CL0&CH1) (7) C1=(〜CL1&CH0)|(CL1&CH1) (8) (5),(6)式は下位からの桁上げ信号がないときに
は上位の零信号の内下位からの桁上げがないときのもの
を、下位からの桁上げ信号があるときには上位の零信号
の内、下位からの桁上げがないときのものを選択し、下
位の零信号との論理積をとることを意味している。ここ
で用いる下位の零信号と桁上げ信号を、その下位からの
桁上げがない場合の値を用いたのが(5)式で、桁上げ
がある場合の値を用いたのが(6)式である。桁上げ信
号についても、下位からの桁上げ信号がない場合は上位
の桁上げ信号の内、下位からの桁上げがない場合のもの
を、下位からの桁上げ信号がある場合は上位の桁上げ信
号の内、下位からの桁上げがある場合のものを選択す
る。下位からの桁上げ信号は、その下位からの桁上げが
ない場合の値を用いたのが(7)式で、桁上げがある場
合の値を用いたのが(8)式である。これらの4つの式
によって結合子のブロックでの零信号と桁上げ信号を生
成することができる。
Z0 = ZL0 & ((& CL0 & ZH0) │ (CL0 & ZH1)) (5) Z1 = ZL1 & ((〜CL1 & ZH0) │ (CL1 & ZH1)) (6) C0 = (〜CL0 & CH0) │ (CL0 & CH1) (7) C1 = (~ CL1 & CH0) | (CL1 & CH1) (8) Equations (5) and (6) are used when there is no carry signal from the lower part and when there is no carry from the lower part of the upper zero signal, This means that when there is a carry signal, the signal with no carry from the lower order is selected from the upper zero signals and the logical product with the lower zero signal is taken. The lower zero signal and the carry signal used here are the values in the case where there is no carry from the lower order, and the expression (5) is used, and the values in the case where the carry is used are (6). It is an expression. Regarding the carry signal, if there is no carry signal from the lower position, among the upper carry signals, the signal without the carry from the lower position, and if there is the carry signal from the lower position, the upper carry signal. Select the signal with a carry from the bottom among the signals. Equation (7) uses a value when there is no carry from the low order, and Equation (8) uses a value when there is a carry. These four equations allow the generation of the zero signal and the carry signal in the connector block.

【0018】(4)式からわかるように、C1の値は必
ず1となるため、その後の選択器は必ず桁上げありの時
に固定されている。これを考慮して(6),(8)式を
書き直すと、 Z1=ZL1&CL1 (6’) C1=CH1=1 (8’) となる。このように、下位からの桁上げが1の時の桁上
げ信号は1となるため、結合するときにこの信号は必要
ない。
As can be seen from equation (4), the value of C1 is always 1, so that the subsequent selector is always fixed when there is a carry. When the equations (6) and (8) are rewritten in consideration of this, Z1 = ZL1 & CL1 (6 ′) C1 = CH1 = 1 (8 ′) As described above, when the carry from the lower order is 1, the carry signal is 1, and therefore this signal is not necessary at the time of coupling.

【0019】[0019]

【実施例】次に、本発明の実施例を図1から図7を用い
て説明する。
Next, an embodiment of the present invention will be described with reference to FIGS.

【0020】図1は本発明の一実施例を示したものであ
る。nビットの2数A,Bを上位nhビットのAH,B
Hと下位nlビットのAL,BLに分割する。AH,B
Hをnhビットの零検出回路2に入力し零信号ZH0,
ZH1と桁上げ信号CH0,CH1を生成する。同時に
nlビット零検出回路3を用いて、AL,BLから零信
号ZL0,ZL1と桁上げ信号CL0,CL1を生成す
る。これらの信号を用いて、(5)から(8)式を実現
した回路である零検出信号合成回路1によって結合後の
零信号Z0,Z1と桁上げ信号C0,C1を生成する。
ここで、Z0はA+Bの零信号、Z1はA+B+1の零
信号となる。減算はBをビット毎反転して〜Bとし、A
+(〜B)+1で求められるので、Z1を零信号とすれ
ば良い。
FIG. 1 shows an embodiment of the present invention. The two bits A and B of n bits are converted to AH and B of upper nh bits.
It is divided into H and lower nl bits AL and BL. AH, B
H is input to the nh-bit zero detection circuit 2 and the zero signal ZH0,
ZH1 and carry signals CH0 and CH1 are generated. At the same time, the nl-bit zero detection circuit 3 is used to generate zero signals ZL0 and ZL1 and carry signals CL0 and CL1 from AL and BL. Using these signals, the combined zero signals Z0, Z1 and carry signals C0, C1 are generated by a zero detection signal combining circuit 1 which is a circuit that realizes the equations (5) to (8).
Here, Z0 is a zero signal of A + B, and Z1 is a zero signal of A + B + 1. The subtraction is performed by inverting B bit by bit to ~ B,
+ (ら れ る B) +1, so that Z1 may be a zero signal.

【0021】図2は零検出信号合成回路1の一構成例を
示す図である。選択器回路21と論理積回路25によっ
て(5)式の処理を、選択器回路23と論理積回路26
によって(6)式の処理を、また選択器回路22によっ
て(7)式の処理を、選択器回路24によって(8)式
の処理を行う。
FIG. 2 is a diagram showing an example of the configuration of the zero detection signal synthesizing circuit 1. The processing of the expression (5) is performed by the selector circuit 21 and the AND circuit 25, and the selector circuit 23 and the AND circuit 26 are processed.
Performs the processing of equation (6), the processing of equation (7) by the selector circuit 22, and the processing of equation (8) by the selector circuit 24.

【0022】図3は本発明の別の実施例である、1ビッ
トの零検出回路を示した図である。1ビットの2数a,
bを入力して、下位からの桁上げがないときの零信号Z
0をa,bの排他的反転論理和回路11から求め、下位
からの桁上げがあるときの零信号Z1をa,bの排他的
論理和回路12から求める。C0は(3)式に示した通
りaをそのまま出力している。また(4)式に示した通
り、論理1出力回路13を用いてC1を1としている。
FIG. 3 is a diagram showing a one-bit zero detection circuit according to another embodiment of the present invention. 1-bit two numbers a,
b, zero signal Z when there is no carry from the bottom
The value 0 is obtained from the exclusive OR circuit 11 of a and b, and the zero signal Z1 when there is a carry from the lower order is obtained from the exclusive OR circuit 12 of a and b. C0 outputs a as it is as shown in equation (3). Further, as shown in the equation (4), C1 is set to 1 by using the logic 1 output circuit 13.

【0023】図4は本発明のさらに別の実施例を示した
ものである。(6’),(8’)式によれば、下位から
の桁上げ信号がある場合の桁上げ信号は必ず1であるた
め、その信号によって制御される選択器回路23と24
は値が固定されてしまい、不要である。また、この桁上
げ信号も不要である。よって図1のように4本の信号を
必要とせず、2本の零信号と1本の桁上げ信号の計3本
の信号でよい。そこで図4は、3本の信号で処理を行う
ような零検出信号合成回路4とnhビット零検出回路5
と、nlビット零検出回路6からなる零検出回路であ
る。
FIG. 4 shows still another embodiment of the present invention. According to the equations (6 ') and (8'), the carry signal is always 1 when there is a carry signal from the lower order, so that the selector circuits 23 and 24 controlled by the signal are carried out.
Is fixed and its value is unnecessary. Also, this carry signal is unnecessary. Therefore, as shown in FIG. 1, four signals are not required, and a total of three signals of two zero signals and one carry signal may be used. Therefore, FIG. 4 shows a zero detection signal synthesizing circuit 4 and an nh bit zero detection circuit 5 which perform processing with three signals.
And an nl-bit zero detection circuit 6.

【0024】図5は零検出信号合成回路4の一構成例を
示す図である。選択器回路21と論理積回路25で
(5)式の処理を、論理積回路26で(6’)式の処理
を、選択器回路22で(7)式の処理を行っている。下
位からの桁上げ信号が1の時の桁上げ信号は不要なので
(8)式の処理に当たる部分はない。また、分割したブ
ロックからの桁上げ信号CH1がないため、論理1出力
回路27でその代わりをしている。
FIG. 5 is a diagram showing an example of the configuration of the zero detection signal synthesizing circuit 4. The selector circuit 21 and the AND circuit 25 perform the processing of the expression (5), the AND circuit 26 performs the processing of the expression (6 ′), and the selector circuit 22 performs the processing of the expression (7). Since the carry signal when the carry signal from the lower order is 1 is unnecessary, there is no portion corresponding to the processing of equation (8). Further, since there is no carry signal CH1 from the divided block, the logic 1 output circuit 27 is used instead.

【0025】図6にさらに別の一実施例を示す。下位か
らの桁上げがある場合の桁上げ信号が不要であるため、
図3に比べてC1の出力が削除されている。
FIG. 6 shows still another embodiment. Since there is no need for a carry signal when there is a carry from the bottom,
The output of C1 is deleted as compared with FIG.

【0026】図7にさらに別の実施例を示す。入力とし
て、1ビットの2数a,bの他に、制御信号としてoが
加えられている。桁上げ信号を生成するときに、加算の
時はaをそのまま出力とすればよく、減算の時はa,b
が一致しているか否かを検出すれば良いため、そのとき
1となるZ0の信号を選択するようにすれば良い。そこ
で、桁上げ信号を0に固定して、必ずZ0が選択される
ようにする。入力oには加算の時1を減算の時0を与え
れば、以上の処理が行える。この零信号検出器を用いれ
ば、加算と減算の両方に対応する零検出回路が作れる。
FIG. 7 shows still another embodiment. As an input, o is added as a control signal in addition to 1-bit two numbers a and b. When generating a carry signal, a may be output as it is for addition, and a and b may be used for subtraction.
Since it is sufficient to detect whether or not the signals match, the signal of Z0 which becomes 1 at that time may be selected. Therefore, the carry signal is fixed to 0 so that Z0 is always selected. The above processing can be performed by giving 1 to the input o and 0 to the subtraction. If this zero signal detector is used, a zero detection circuit corresponding to both addition and subtraction can be made.

【0027】[0027]

【発明の効果】本発明の零検出回路を使用すれば、加減
算の結果が零であるか否かを示す零信号を、与えられた
2数から直接求めることができるため、この零検出回路
を演算器と並列に設けることにより、演算器と並列に零
検出が行える。そのため演算器全体としての高速化が図
れる。また、2のべき乗のビット数の場合、ちょうど半
分に次々と分割できるため同じ回路が複数使えるため、
設計が楽である。
According to the zero detection circuit of the present invention, a zero signal indicating whether or not the result of addition / subtraction is zero can be directly obtained from the given two numbers. By providing in parallel with the arithmetic unit, zero detection can be performed in parallel with the arithmetic unit. Therefore, the speed of the entire arithmetic unit can be increased. In addition, in the case of the number of bits of a power of 2, since the same circuit can be used more than once because it can be divided exactly into half,
Design is easy.

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

【図1】本発明の零検出回路の実施例を示す図である。FIG. 1 is a diagram showing an embodiment of a zero detection circuit of the present invention.

【図2】零検出信号合成回路を示す図である。FIG. 2 is a diagram illustrating a zero detection signal synthesis circuit.

【図3】本発明の1ビット零検出回路の実施例を示す図
である。
FIG. 3 is a diagram showing an embodiment of a 1-bit zero detection circuit of the present invention.

【図4】本発明の零検出回路の別の実施例を示す図であ
る。
FIG. 4 is a diagram showing another embodiment of the zero detection circuit of the present invention.

【図5】別の零検出信号合成回路を示す図である。FIG. 5 is a diagram illustrating another zero detection signal synthesis circuit.

【図6】本発明の別の1ビット零検出回路の実施例を示
す図である。
FIG. 6 is a diagram showing another embodiment of the one-bit zero detection circuit of the present invention.

【図7】本発明の別の1ビット零検出回路の実施例を示
す図である。
FIG. 7 is a diagram showing an embodiment of another 1-bit zero detection circuit of the present invention.

【図8】従来の零検出回路の一例を示す図である。FIG. 8 is a diagram illustrating an example of a conventional zero detection circuit.

【符号の説明】[Explanation of symbols]

1 零検出信号合成回路 2 nhビット零検出回路 3 nlビット零検出回路 4 零検出信号合成回路 5 nhビット零検出回路 6 nlビット零検出回路 11 排他的反転論理和回路 12 排他的論理和回路 13 論理1出力回路 14 論理和回路 21 選択器 22 選択器 23 選択器 24 選択器 25 論理積回路 26 論理積回路 27 論理1出力回路 31 演算器 32 反転論理和回路 REFERENCE SIGNS LIST 1 zero detection signal synthesis circuit 2 nh bit zero detection circuit 3 nl bit zero detection circuit 4 zero detection signal synthesis circuit 5 nh bit zero detection circuit 6 nl bit zero detection circuit 11 exclusive inverted OR circuit 12 exclusive OR circuit 13 Logical 1 output circuit 14 Logical OR circuit 21 Selector 22 Selector 23 Selector 24 Selector 25 Logical product circuit 26 Logical product circuit 27 Logical 1 output circuit 31 Operation unit 32 Inverted logical OR circuit

Claims (3)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 任意ビットの2数の加減算結果が零か否
かを検出する零検出回路において、前記2数を構成する
各ビットのうちの各2ビットを抜き出し、上位ビットと
下位ビットに分割し、 前記2数の各々の前記上位ビットが入力され、 前記上位ビットにおいて、前記下位ビットからの桁上げ
がない場合の、加減算の結果が零か否かを示す零信号
(第1零信号)と桁上げの有無を示す桁上げ信号(第1
桁上げ信号)、および、桁上げがある場合の、零信号
(第2零信号)と桁上げ信号(第2桁上げ信号)を求め
る上位ビット零検出回路と、 前記2数の各々の前記下位ビットが入力され、 前記下位ビットにおいて、さらに下位からの桁上げがな
い場合の、零信号(第3零信号)と桁上げ信号(第3桁
上げ信号)、および、桁上げがある場合の、零信号(第
4零信号)と桁上げ信号(第4桁上げ信号)を求める下
位ビット零検出回路とを有し、 前記上位ビット零検出回路からの、 前記上位ビットにおいて、前記下位ビットからの桁上げ
がない場合の、加減算の結果が零か否かを示す前記零信
号(第1零信号)と桁上げの有無を示す前記桁上げ信号
(第1桁上げ信号)、および、桁上げがある場合の、前
記零信号(第2零信号)と前記桁上げ信号(第2桁上げ
信号)と、 前記下位ビット零検出回路からの、 前記下位ビットにおいて、さらに下位からの桁上げがな
い場合の、前記零信号(第3零信号)と前記桁上げ信号
(第3桁上げ信号)、および、桁上げがある場合の、前
記零信号(第4零信号)と前記桁上げ信号(第4桁上げ
信号)とが入力され、 前記下位部分の下位からの桁上げ信号のない場合の前記
桁上げ信号がない(第3桁上げ信号=0)場合は、前記
上位部分の下位からの桁上げがない場合の前記零信号
(第1零信号)と前記下位部分の下位からの桁上げ信号
がない場合の前記零信号(第3零信号)の論理積を、前
記2数の加減算結果の下位からの桁上げがない場合の前
記零信号(第5零信号)とし、 前記上位部分の前記下位部分からの桁上げがない場合の
桁上げ信号(第1桁上げ信号)を前記2数の加減算結果
のさらに下位からの桁上げ信号がない場合の桁上げ信号
(第5桁上げ信号)とし、 前記下位部分の下位からの桁上げ信号がある場合の桁上
げ信号がない(第4桁上げ信号=0)場合は、前記上位
部分の下位からの桁上げがない場合の零信号(第1零信
号)と前記下位部分の下位からの桁上げ信号がある場合
の零信号(第4零信号)の論理積を前記2数の加減算結
果の下位からの桁上げがある場合の零信号(第6零信
号)とし、 前記上位部分の前記下位部分からの桁上げがない場合の
桁上げ信号(第1桁上げ信号)を前記2数の加減算結果
のさらに下位からの桁上げ信号がある場合の桁上げ信号
(第6桁上げ信号)とし、 下位部分の下位からの桁上げ信号がない場合の桁上げ信
号がある(第3桁上げ信号=1)場合は、前記上位部分
の下位からの桁上げがある場合の零信号(第2零信号)
と前記下位部分の下位からの桁上げ信号がない場合の零
信号(第3零信号)の論理積を前記2数の加減算結果の
下位からの桁上げがない場合の零信号(第5零信号)と
し、 前記上位部分の前記下位部分からの桁上げがある場合の
桁上げ信号(第2桁上げ信号)を前記2数の加減算結果
のさらに下位からの桁上げ信号がない場合の桁上げ信号
(第5桁上げ信号)とし、 前記下位部分の下位からの桁上げ信号がある場合の桁上
げ信号がある(第4桁上げ信号=1)場合は、前記上位
部分の下位からの桁上げがある場合の零信号(第2零信
号)と前記下位部分の下位からの桁上げ信号がある場合
の零信号(第4零信号)の論理積を前記2数の加減算結
果の下位からの桁上げがある場合の零信号(第6零信
号)とし、 前記上位部分の前記下位部分からの桁上げがある場合の
桁上げ信号(第2桁上げ信号)を前記2数の加減算結果
のさらに下位からの桁上げ信号がある場合の桁上げ信号
(第6桁上げ信号)とする零検出信号合成回路を有する
ことを特徴とする零検出回路。
1. A zero detection circuit for detecting whether a result of addition / subtraction of two numbers of an arbitrary bit is zero is to extract two bits of each bit constituting the two numbers and divide them into upper bits and lower bits. A zero signal (first zero signal) indicating whether or not the result of addition / subtraction is zero when the upper bits of each of the two numbers are input and there is no carry from the lower bit in the upper bits And a carry signal indicating the presence or absence of a carry (first
A carry signal), an upper bit zero detection circuit for obtaining a zero signal (second zero signal) and a carry signal (second carry signal) when there is carry, and the lower bit of each of the two numbers A zero signal (third zero signal) and a carry signal (third carry signal) when there is no carry from the lower bits in the lower bits, and A lower bit zero detection circuit for obtaining a zero signal (fourth zero signal) and a carry signal (fourth carry signal); and When there is no carry, the zero signal (first zero signal) indicating whether the result of addition and subtraction is zero, the carry signal (first carry signal) indicating the presence / absence of carry, and the carry In some cases, the zero signal (second zero signal) and the carry signal (The second carry signal) and the zero signal (third zero signal) and the carry signal (the third carry signal) when there is no carry from the lower bit in the lower bits from the lower bit zero detection circuit. A third carry signal) and the zero signal (fourth zero signal) and the carry signal (fourth carry signal) when there is carry, and carry from the lower part of the lower part When there is no carry signal in the absence of a signal (third carry signal = 0), the zero signal (first zero signal) in the absence of carry from the lower part of the upper part and the lower part of the lower part The logical product of the zero signal (third zero signal) when there is no carry signal from the lower part is the zero signal (fifth zero signal) when there is no carry from the lower part of the result of addition and subtraction of the two numbers. A carry signal (no. 1 carry signal) as a carry signal (fifth carry signal) when there is no carry signal from the lower part of the result of addition and subtraction of the two numbers, and when there is a carry signal from the lower part of the lower part. When there is no carry signal (fourth carry signal = 0), the zero signal (first zero signal) when there is no carry from the lower part of the upper part and the carry signal from the lower part of the lower part are two. The logical product of the zero signal (fourth zero signal) in a certain case is defined as a zero signal (sixth zero signal) when there is a carry from the lower part of the result of addition and subtraction of the two numbers, and The carry signal when there is no carry (first carry signal) is the carry signal when there is a carry signal from the lower order of the result of addition and subtraction of the two numbers (sixth carry signal). There is a carry signal when there is no carry signal from the lower part (third carry signal) = 1) case, zero signal (second zero signal when there is a carry from the lower of the upper portion)
The logical product of the zero signal (third zero signal) when there is no carry signal from the lower part of the lower part and the zero signal (fifth zero signal) when there is no carry from the lower part of the addition / subtraction result of the two numbers ), A carry signal (a second carry signal) when there is a carry from the lower part of the upper part, and a carry signal when there is no carry signal from the lower part of the result of addition and subtraction of the two numbers. (Fifth carry signal), and if there is a carry signal when there is a carry signal from the lower part of the lower part (fourth carry signal = 1), the carry from the lower part of the upper part is The logical product of a zero signal (second zero signal) in a certain case and a zero signal (fourth zero signal) in the presence of a carry signal from the lower part of the lower part is carried from the lower part of the result of addition and subtraction of the two numbers. If there is a zero signal (sixth zero signal), the lower part of the upper part Zero to carry signal when there is a carry carry signal when a (second digit on up signal) is carry signal from the further lower of the two numbers of addition and subtraction result (sixth carry-signal) A zero detection circuit comprising a detection signal synthesis circuit.
【請求項2】 任意ビットの2数の加減算結果が零か否
かを検出する零検出回路において、 前記2数を構成する各ビットのうちの各2ビットを抜き
出し、上位ビットと下位ビットに分割し、 前記2数の各々の前記上位ビットが入力され、 前記上位ビットにおいて、前記下位ビットからの桁上げ
がない場合の、加減算の結果が零か否かを示す零信号
(第1零信号)と桁上げの有無を示す桁上げ信号(第1
桁上げ信号)、および、桁上げがある場合の、零信号
(第2零信号)を求める上位ビット零検出回路と、 前記2数の各々の前記下位ビットが入力され、 前記下位ビットにおいて、さらに下位からの桁上げがな
い場合の、前記零信号(第3零信号)と前記桁上げ信号
第3桁上げ信号)、および、桁上げがある場合の、零
信号(第4零信号)を求める下位ビット零検出回路と、 前記上位ビット零検出回路からの、 前記上位ビットにおいて、前記下位ビットからの桁上げ
がない場合の、加減算の結果が零か否かを示す前記零信
号(第1零信号)と桁上げの有無を示す前記桁上げ信号
(第1桁上げ信号)、および、桁上げがある場合の、前
記零信号(第2零信号)と、 前記下位ビット零検出回路からの、 前記下位ビットにおいて、さらに下位からの桁上げがな
い場合の、前記零信号(第3零信号)と前記桁上げ信号
第3桁上げ信号)、および、桁上げがある場合の、前
記零信号(第4零信号)とが入力され、 前記下位部分の下位からの桁上げ信号のない場合の桁上
げ信号がない(第3桁上げ信号=0)場合は、前記上位
部分の下位からの桁上げがない場合の零信号(第1零信
号)と前記下位部分の下位からの桁上げ信号がない場合
の零信号(第3零信号)の論理積を前記2数の加減算結
果の下位からの桁上げがない場合の零信号(第5零信
号)とし、前記上位部分の前記下位部分からの桁上げが
ない場合の桁上げ信号(第1桁上げ信号)を前記2数の
加減算結果のさらに下位からの桁上げ信号がない場合の
桁上げ信号(第5桁上げ信号)とし、 前記下位部分の下位からの桁上げ信号がない場合の桁上
げ信号がある(第3桁上げ信号=1)場合は、前記上位
部分の下位からの桁上げがある場合の零信号(第2零信
号)と前記下位部分の下位からの桁上げ信号がない場合
の零信号(第3零信号)の論理積を前記2数の加減算結
果の下位からの桁上げがない場合の零信号(第5零信
号)とし、前記2数の加減算結果の下位からの桁上げ信
号がない場合の桁上げ信号(第5桁上げ信号)を論理1
とし、 前記下位部分の下位からの桁上げ信号がある場合におい
ては、前記上位部分の下位からの桁上げがある場合の零
信号(第2零信号)と前記下位部分の下位からの桁上げ
信号がある場合の零信号(第4零信号)の論理積を前記
2数の加減算結果の下位からの桁上げがある場合の零信
号(第6零信号)とする零検出信号合成回路を有するこ
とを特徴とする零検出回路。
2. A zero detection circuit for detecting whether a result of addition / subtraction of two numbers of an arbitrary bit is zero, extracting two bits of each bit constituting the two numbers, and dividing the bits into upper bits and lower bits A zero signal (first zero signal) indicating whether or not the result of addition / subtraction is zero when the upper bits of each of the two numbers are input and there is no carry from the lower bit in the upper bits And a carry signal indicating the presence or absence of a carry (first
A carry signal) and an upper bit zero detection circuit for obtaining a zero signal (second zero signal) when there is a carry; and the lower bits of each of the two numbers are input. The zero signal (third zero signal) and the carry signal ( third carry signal) when there is no carry from the lower order, and the zero signal (fourth zero signal) when there is a carry. A lower bit zero detection circuit to be obtained; and a zero signal (first signal) indicating whether or not the result of addition and subtraction is zero in the upper bits from the upper bit zero detection circuit when there is no carry from the lower bit. Zero signal) and the carry signal (first carry signal) indicating the presence or absence of carry, and the zero signal (second zero signal) when there is carry, and the lower bit zero detection circuit. In the lower bits, In the absence of a carry, the zero signal (third zero signal) and the carry signal (third carry signal), and, when there is a carry, the zero signal (fourth zero signal) but When there is no carry signal when there is no carry signal from the lower part of the lower part (third carry signal = 0), a zero signal when there is no carry from the lower part of the upper part ( The logical product of the first zero signal) and the zero signal (third zero signal) when there is no carry signal from the lower part of the lower part is the zero signal when there is no carry from the lower part of the result of addition and subtraction of the two numbers. (Fifth zero signal), and the carry signal (first carry signal) when there is no carry from the lower part of the upper part is no carry signal from the lower part of the result of addition / subtraction of the two numbers. Carry signal (fifth carry signal), and the carry signal from the lower part of the lower part If there is a carry signal when there is no (third carry signal = 1), a zero signal (second zero signal) when there is a carry from the lower part of the upper part and a lower signal from the lower part of the lower part The logical product of the zero signal (third zero signal) when there is no carry signal is defined as the zero signal (fifth zero signal) when there is no carry from the lower part of the result of addition and subtraction of the two numbers, and the addition and subtraction of the two numbers is performed. The carry signal (fifth carry signal) when there is no carry signal from the lower part of the result is logic 1
When there is a carry signal from the lower part of the lower part, a zero signal (second zero signal) when there is a carry from the lower part of the upper part and a carry signal from the lower part of the lower part A zero detection signal combining circuit which sets the logical product of the zero signal (fourth zero signal) in the case where there is a carry from the lower part of the result of addition and subtraction of the two numbers to the zero signal (sixth zero signal) A zero detection circuit.
【請求項3】 2nのビット数からなる任意の2数の加
減算が零か否かを検出する零検出回路において、 前記2数を2n-1個の2ビットに分離し、該2ビットを
各上位ビットと下位ビットとに分離し、前記上位ビット
は上位ビット零検出回路に入力し、前記下位ビットは前
記下位ビット零検出回路に入力し、 前記上位ビット零検出回路から出力される、上位ビット
零信号と上位ビット桁上げ信号と、 前記下位ビット零検出回路から出力される、下位ビット
零信号と下位ビット桁上げ信号とを入力信号とし、 零信号と桁上げ信号とを出力する2n-2個の第1段目の
零信号合成回路を有し、 前記2n-2個の前記第1段目
の零信号合成回路の前記2数の上位ビットに対応する前
記第1段目の零信号合成回路から出力される、上位ビッ
ト零信号と上位ビット桁上げ信号と、 前記2n-2個の零信号合成回路の前記2数の下位ビット
に対応する前記零信号合成回路から出力される、下位ビ
ット零信号と下位ビット桁上げ信号とを入力信号とし、 零信号と桁上げ信号とを出力する2n-3個の第2段目の
零信号合成回路とを有し、 第N段目(N>2)の零信号合成回路は、2n-N個の零
信号合成回路からなり、 2n-N-1個の第N−1段目の零信号合成回路の前記2数
の上位ビットに対応する前記第N−1段目の零信号合成
回路から出力される、上位ビット零信号と上位ビット桁
上げ信号と、 前記2n-N-1個の第N−1段目の零信号合成回路の前記
2数の下位ビットに対応する零信号合成回路から出力さ
れる、下位ビット零信号と下位ビット桁上げ信号とを入
力信号とし、 零信号と桁上げ信号とを出力し、 1個の零検出信号からなる第M段目の零信号合成回路の
零信号と桁上げ信号とから零を検出することを特徴とす
る請求項1又は2に記載の零検出回路。
3. A zero detection circuit for detecting whether addition or subtraction of an arbitrary two numbers consisting of 2 n bits is zero or not, wherein said two numbers are separated into 2 n-1 two bits, Into upper bits and lower bits, the upper bits are input to an upper bit zero detection circuit, the lower bits are input to the lower bit zero detection circuit, and output from the upper bit zero detection circuit, An upper bit zero signal, an upper bit carry signal, and a lower bit zero signal and a lower bit carry signal output from the lower bit zero detection circuit are input signals, and a zero signal and a carry signal are output. n-2 first-stage zero-signal combining circuits, wherein the second stage corresponding to the 2 higher-order bits of the 2 n-2 first-stage zero-signal combining circuits The upper bit zero signal and the upper bit output from the zero signal Input and preparative carry signal, the output from the zero-signal combining circuit corresponding to lower bits of the two numbers 2 n-2 pieces of zero signal combining circuit, and a low-order bit zero signal and a lower bit carry signal And 2 n−3 second-stage zero-signal combining circuits that output a zero signal and a carry signal. The N-th (N> 2) zero-signal combining circuit has 2 It consists nN number of zero signal combining circuit, from 2 nN-1 or zero signal combining circuit of the first N-1 stage corresponding to the upper bits of the two numbers of the N-1 stage of the zero signal combining circuit The high-order bit zero signal and the high-order bit carry signal output from the zero signal synthesizing circuits corresponding to the two lower bits of the ( 2nN-1 ) N-1st zero signal synthesizing circuits. Input the low-order bit zero signal and the low-order carry signal, and output a zero signal and a carry signal. 3. The zero detection circuit according to claim 1, wherein zero is detected from a zero signal of the M-th stage zero signal synthesis circuit including the zero detection signal and a carry signal.
JP34590591A 1991-12-27 1991-12-27 Zero detection circuit Expired - Lifetime JP3335653B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP34590591A JP3335653B2 (en) 1991-12-27 1991-12-27 Zero detection circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP34590591A JP3335653B2 (en) 1991-12-27 1991-12-27 Zero detection circuit

Publications (2)

Publication Number Publication Date
JPH05181643A JPH05181643A (en) 1993-07-23
JP3335653B2 true JP3335653B2 (en) 2002-10-21

Family

ID=18379791

Family Applications (1)

Application Number Title Priority Date Filing Date
JP34590591A Expired - Lifetime JP3335653B2 (en) 1991-12-27 1991-12-27 Zero detection circuit

Country Status (1)

Country Link
JP (1) JP3335653B2 (en)

Also Published As

Publication number Publication date
JPH05181643A (en) 1993-07-23

Similar Documents

Publication Publication Date Title
US3983382A (en) Adder with fast detection of sum equal to zeroes or radix minus one
US6366943B1 (en) Adder circuit with the ability to detect zero when rounding
KR100254913B1 (en) Zero detect for binary difference
US4371951A (en) Apparatus for converting serial input sparse vector format to parallel unpacked format for input to tandem arithmetic logic units
US4617641A (en) Operation unit for floating point data having a variable length exponent part
JPH0544686B2 (en)
CN108897523B (en) Divider and operation method thereof and electronic equipment
KR970006408B1 (en) Method and apparatus for automatically designing logic circuitand multiplier
US5103419A (en) Circuit for calculating the sum of products of data
JPS63123125A (en) Floating point adder
JP3335653B2 (en) Zero detection circuit
JP2000330764A (en) Adder and integrated circuit
US6157939A (en) Methods and apparatus for generating multiplicative inverse product
JPH09114641A (en) Apparatus and method for determining the most significant digit
US5798958A (en) Zero detect for binary sum
JPH056263A (en) Adder and absolute value calculation circuit using the adder
KR100241071B1 (en) Adder for generating sum and sum plus one in parallel
US7444366B2 (en) Faster shift value calculation using modified carry-lookahead adder
JPH09171455A (en) Normalization circuit device for floating point arithmetic unit
JPH0661871A (en) Parallel serial data conversion circuit
KR100265358B1 (en) Speedy shift apparatus
KR19980023995A (en) Method for computing the selected sign three expressions in a single instruction cycle
KR950015180B1 (en) High speed adder
KR0182169B1 (en) Log value calculation circuit
KR0175358B1 (en) Status Flag Detection Circuit of Computer for High Speed

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20070802

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080802

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080802

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090802

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090802

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100802

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110802

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110802

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120802

Year of fee payment: 10

EXPY Cancellation because of completion of term
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120802

Year of fee payment: 10