[go: up one dir, main page]

JPH06131159A - Zero flag detection circuit - Google Patents

Zero flag detection circuit

Info

Publication number
JPH06131159A
JPH06131159A JP27637192A JP27637192A JPH06131159A JP H06131159 A JPH06131159 A JP H06131159A JP 27637192 A JP27637192 A JP 27637192A JP 27637192 A JP27637192 A JP 27637192A JP H06131159 A JPH06131159 A JP H06131159A
Authority
JP
Japan
Prior art keywords
zero flag
bit
detection circuit
flag detection
zero
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
JP27637192A
Other languages
Japanese (ja)
Inventor
Hiroo Matsuda
宏朗 松田
Toshihiro Minami
俊宏 南
Takao Kaneko
孝夫 金子
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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone 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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP27637192A priority Critical patent/JPH06131159A/en
Publication of JPH06131159A publication Critical patent/JPH06131159A/en
Pending legal-status Critical Current

Links

Abstract

(57)【要約】 【目的】 ハードウェア量が少なく、高速動作が可能な
零フラグ検出回路を提供する。 【構成】 2の補数表現による2進数A=ann-1…a
k…a21(kは1≦k≦nなる任意の自然数)及びB
=bnn-1…bk…b21の加算結果が零か否かを表す
零フラグZRを検出する際、零フラグ検出途中で発生す
るkビットからk+1ビットへの零フラグ検出用桁上げ
信号ck+1をakおよびbkの論理和で生成させるように
した。
(57) [Abstract] [Purpose] To provide a zero flag detection circuit which has a small amount of hardware and can operate at high speed. [Structure] Binary number A = a n a n-1 ...
k ... a 2 a 1 (k is an arbitrary natural number satisfying 1 ≦ k ≦ n) and B
= B n b n-1 ... b k ... b 2 b 1 When detecting the zero flag ZR indicating whether or not the addition result is zero, the detection of the zero flag from k bits to k + 1 bits that occurs during the detection of the zero flag The carry signal c k + 1 is generated by the logical sum of a k and b k .

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、加減算器の演算結果が
零であるか否かを示す零フラグを計算する零フラグ検出
回路に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a zero flag detecting circuit for calculating a zero flag indicating whether or not the result of calculation by an adder / subtractor is zero.

【0002】[0002]

【従来の技術】図7は、従来の桁上げ選択方式により桁
上げ伝搬を並列化した零フラグ検出回路の概念を示して
いる。零フラグ検出回路のn(=nh+nl)ビットから
なる入力データAおよびBの各々を上位nhビットおよ
び下位nlビットに分割し、各々上位ブロック、下位ブ
ロックとする。図中、下位零フラグ検出回路3により下
位ブロックの零フラグzlと上位ブロックへの桁上げ信
号clを、上位零フラグ検出回路2により下位ブロック
からの桁上げ信号が0の場合の零フラグzho、及びより
上位への桁上げchoを、そして、上位零フラグ検出回路
1により下位ブロックからの桁上げ信号が1の場合の零
フラグzhl、及び上位への桁上げchlを並列に求める。
2. Description of the Related Art FIG. 7 shows a concept of a zero flag detection circuit in which carry propagation is parallelized by a conventional carry selection method. Each of the input data A and B consisting of n (= n h + n l ) bits of the zero flag detection circuit is divided into an upper n h bit and a lower n l bit to form an upper block and a lower block, respectively. In the figure, the lower zero flag detecting circuit 3 the carry signal c l to zero flag z l and the upper block of the lower block, zero flag when the carry signal from the lower block by a higher zero flag detecting circuit 2 is 0 z ho and the carry c ho to the higher order, and the zero flag z hl when the carry signal from the lower block is 1 by the higher zero flag detection circuit 1 and the carry c h l to the higher order Ask for.

【0003】そして、上位ブロックの零フラグzhを、
lの値に応じてzho、zhlのうちから上位零フラグ選
択器5により選択して求め、zhとzlの論理積をAND
ゲート6によって求め、全体の零フラグZRとして出力
する。また、上位nhからより上位への桁上げchをcl
の値に応じて、cho、chlのうちから4の上位桁上げ選
択器で選択して求める。
Then, the zero flag z h of the upper block is
According to the value of c l, one of z ho and z hl is selected and obtained by the upper zero flag selector 5, and the logical product of z h and z l is ANDed.
Obtained by the gate 6 and output as the entire zero flag ZR. In addition, the carry c h to the higher level from the upper n h c l
In accordance with the value of, the higher carry selector of 4 selects from c ho and c hl .

【0004】図8は、kビット目における1ビット加算
の零フラグ検出回路の真理値表である。zkはkビット
目の零フラグであり、ZR=∧(i=1〜n)zkであ
る。ここで∧(i=1〜n)は、添字kが1,…,nの
いずれかである全てのzkの論理積を示している。
FIG. 8 is a truth table of a zero flag detection circuit for 1-bit addition at the k-th bit. z k is a zero flag of the kth bit, and ZR = ∧ (i = 1 to n) z k . Here, ∧ (i = 1 to n) represents the logical product of all z k whose subscript k is 1, ..., N.

【0005】ck=0の場合、zk=NOT(XOR(a
k,bk))であり、zk=1となるのはak=bk=0ま
たは、ak=bk=1のときであり、その時kビット目か
らk+1ビット目への桁上げck+1出力はak(またはb
k)である。ここで、XOR(ak,bk)はak,bk
排他的論理和を示す。また、NOT(XOR(ak
k))はXOR(ak,bk)の否定であり、ak,bk
の排他的論理積と呼ぶ。以下の説明においても同様の意
味で用いる。
When c k = 0, z k = NOT (XOR (a
k , b k )), and z k = 1 when a k = b k = 0 or a k = b k = 1 and at that time, carry from the k-th bit to the k + 1-th bit c k + 1 output is a k (or b
k ). Here, XOR (a k , b k ) represents an exclusive OR of a k and b k . Further, NOT (XOR (a k ,
b k )) is the negation of XOR (a k , b k ), and a k , b k
Is called the exclusive logical product of. The same meaning is used in the following description.

【0006】また、zk=0の時を考えると、あるkに
対してzk=0ならば、k<i≦nなる任意の自然数i
に対するziがいかなる値であっても、全体の零フラグ
ZRは0となる。このため、zk=0の場合、kビット
目からk+1ビット目への桁上げck+1を0または1の
どちらかの論理値としても差し支えはない。上記の理由
から、zk=0となるak≠bkの場合におけるck+1出力
も、zk=1となる場合と同様、ak(またはbk)とす
る。
[0006] In addition, z k = Given the time of 0, if z k = 0 for some k, k <i ≦ n made any natural number i
The overall zero flag ZR is 0, whatever the value of z i for. Therefore, when z k = 0, the carry c k + 1 from the k-th bit to the k + 1-th bit may be a logical value of 0 or 1. For the above reason, the c k + 1 output in the case of a k ≠ b k where z k = 0 is also set to a k (or b k ) as in the case where z k = 1.

【0007】一方、ck=1の場合は、zk=XOR(a
k,bk)であり、ak≠bkならばzk=1となり、ck+1
出力は1である。ck=1の場合もck=0の場合と同じ
理由で、zk=0となる入力条件ak=bkにおけるck+1
出力を1とする。
On the other hand, if c k = 1 then z k = XOR (a
k , b k ), and if a k ≠ b k, then z k = 1 and c k + 1
The output is 1. For the same reason in the case of c k = 1 as in the case of c k = 0, c k + 1 in the input condition a k = b k where z k = 0
The output is 1.

【0008】上記の考え方により、ck入力によってc
k+1を決定する回路であって、ck=0ならばck+1=ak
(またはbk)、ck=1ならばck+1=1とする桁上げ
生成回路を含む1ビット加算零フラグ検出回路を構成す
る。
According to the above idea, c k input causes c
A circuit for determining the k + 1, c k = 0 if c k + 1 = a k
(Or b k ), if c k = 1 then a 1-bit addition / zero flag detection circuit including a carry generation circuit that sets c k + 1 = 1 is configured.

【0009】上記従来の零フラグ検出回路構成法によ
り、桁上げ伝搬の並列化を行ない選択器<logn>段
の遅延で桁上げ伝搬を行なう零フラグ検出回路が構成で
きる。ここで、<x>は、x以上の整数のうちで最小の
ものを表し、以下の説明でも同様の意味で用いる。
By the conventional method for constructing the zero flag detection circuit described above, it is possible to construct a zero flag detection circuit which carries out carry propagation in parallel and carries the carry propagation with delay of the selector <logn> stages. Here, <x> represents the smallest integer of x or more, and is used in the same meaning in the following description.

【0010】[0010]

【発明が解決しようとする課題】上記従来の零フラグ検
出回路では、cK+1がckの値に依存して決定されること
に起因する、最高nビットの桁上げ伝搬が発生する。こ
のため、従来の零フラグ検出回路では桁上げ選択方式に
よる桁上げ伝搬の並列化を行なっているが、選択器<l
ogn>段の桁上げ伝搬遅延を要する。また、桁上げ選
択による桁上げ伝搬の並列化を実施するため、桁上げが
0の場合と1の場合の零フラグ検出回路、およびそれら
の出力の選択器が必要となり、多くのハードウェア量を
要する。
In the above-described conventional zero flag detection circuit, carry propagation of up to n bits occurs due to c K + 1 being determined depending on the value of c k . Therefore, in the conventional zero flag detection circuit, carry propagation is parallelized by the carry selection method.
A carry propagation delay of gn> stage is required. In addition, since carry propagation is parallelized by carry selection, a zero flag detection circuit when the carry is 0 and a carry is required, and a selector for those outputs is required. It costs.

【0011】この発明は上述した事情に鑑みてなされた
ものであり、少ないハードウェア量による回路であっ
て、高速動作が可能な零フラグ検出回路を提供すること
を目的とする。
The present invention has been made in view of the above circumstances, and an object of the present invention is to provide a zero flag detection circuit which is a circuit with a small amount of hardware and which can operate at high speed.

【0012】[0012]

【課題を解決するための手段】本発明は、零フラグの検
出に関してzk=0の場合のck+1は、ck入力の値に関
わらず、0、1どちらかの論理値をとっても差し支えな
いことに着目し、ck+1をakとbkの論理和で与え、零
フラグ検出の過程のおける桁上げ伝搬を高々1ビットと
することを要旨とする零フラグ検出回路である。
Means for Solving the Problems The present invention, c k + 1 in the case of z k = 0 with respect to the detection of the zero flag, regardless of the value of c k inputs, take a 0,1 either logic value Paying attention to the fact that it does not matter, the zero flag detection circuit is characterized in that c k + 1 is given by the logical sum of a k and b k and the carry propagation in the process of zero flag detection is at most 1 bit.

【0013】[0013]

【作用】本発明では、零フラグ検出回路における零フラ
グzK検出途中で発生する桁上げck+1をaKとbkの論理
和で与え、桁上げ伝搬に要する遅延をnによらずORゲ
ート1段分の遅延とし、全てのビットの1ビット加算の
零フラグを、少ない遅延時間で同時に求めることを可能
とした。また、従来法に比較してハードウェア量を大幅
に削減することを可能とした。
In the present invention, the carry c k + 1 generated during the detection of the zero flag z K in the zero flag detection circuit is given by the logical sum of a K and b k , and the delay required for carry propagation is independent of n. With a delay of one stage of the OR gate, the zero flag for 1-bit addition of all bits can be simultaneously obtained with a small delay time. In addition, it is possible to significantly reduce the amount of hardware compared to the conventional method.

【0014】[0014]

【実施例】以下、本発明を具体的な回路による実施例に
基づいて詳細に説明する。なお実施例は一つの例示であ
って、本発明の精神を逸脱しない範囲で種々の変更ある
いは改良を行ない得ることは言うまでもない。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention will be described in detail below based on embodiments of concrete circuits. Needless to say, the embodiment is merely an example, and various modifications and improvements can be made without departing from the spirit of the present invention.

【0015】<実施例1>図1は本発明における、kビ
ット目の1ビット加算の真理値表である。kは1≦k≦
nの任意の自然数である。nビットの2の補数表現によ
る2進数AとBの加算において、その各桁の1ビット加
算の零フラグが、z1=…zk-1=1であり、kビット目
でzkが0となる場合を例に、本発明における零フラグ
検出の正当性を説明する。
<Embodiment 1> FIG. 1 is a truth table of 1-bit addition of the k-th bit in the present invention. k is 1 ≦ k ≦
It is an arbitrary natural number of n. In the addition of the binary numbers A and B by the n-bit two's complement representation, the zero flag of the 1-bit addition of each digit is z 1 = ... z k-1 = 1 and z k is 0 at the k-th bit. By taking the case as follows as an example, the validity of the zero flag detection in the present invention will be described.

【0016】図1におけるzk=1の場合の桁上げ信号
k+1は、被加数および加数としてakとbK、桁上げと
してckを、全加算器に入力した場合の上位ビットへの
桁上げ信号と同一である。このため、1ビット目から
k-1ビット目までの1ビット加算の零フラグ検出回路
は、正しい論理値の零フラグ(ここでは1)を出力す
る。
The carry signal c k + 1 in the case of z k = 1 in FIG. 1 is the high-order signal when ak and b K as the augends and addends and c k as the carry are input to the full adder. It is the same as the carry signal to the bit. Therefore, from the first bit
The 1-bit addition zero flag detection circuit up to the ( k-1) th bit outputs a zero flag (here, 1) having a correct logical value.

【0017】kビット目におけるckは、k−1ビット
目の1ビット加算の零フラグ検出回路の出力であり、加
算器におけるk−1ビット目からkビット目への桁上げ
と同一の論理値である。このため、kビット目の1ビッ
ト加算零フラグ検出回路は、kビット目の1ビット加算
の零フラグの正しい論理値(ここでは0)をzkとして
出力する。
[0017] c in the k-th bit k is the output of the zero flag detection circuit 1 bit addition of k-1 th bit, carry the same logic to the k-th bit from k-1 th bit in the adder It is a value. Therefore, the k-th bit 1-bit addition zero flag detection circuit outputs the correct logical value (0 in this case) of the k-th bit 1-bit addition zero flag as z k .

【0018】全体の零フラグZRは、各ビットの1ビッ
ト加算の零フラグ全ての論理積であるので、zk=0な
らばzk+1,…,znの論理値のいかんによらずZR=0
となる。このため、zk=0ならばcK+1の論理値を0、
1のどちらとしてもZRの値には影響を与えない。
The overall zero flag ZR is because zero flag all logical product of 1-bit addition of the bits, z k = 0 if z k + 1, ..., regardless of the transfer of the logical value of z n ZR = 0
Becomes Therefore, if z k = 0, the logical value of c K + 1 is 0,
Either value of 1 does not affect the value of ZR.

【0019】本発明では、ck=0で、zk=0となるa
k≠bkの場合において、ck+1=1とし、ck=1で、z
k=0となるak=bkの場合において、ak=bk=0に
おけるck+1を1とする。上記の方法によれば、ck+1
k+1=ak∨bkとなる論理式で与えられ、ckの値に依
存しない。ここで、演算子∨は論理和を表す。
In the present invention, when k k = 0 and z k = 0, a
In the case of k ≠ b k , c k + 1 = 1 and c k = 1 and z
In the case of the k = 0 a k = b k , and 1 c k + 1 in a k = b k = 0. According to the above method, c k + 1 is given by a logical expression comprising a c k + 1 = a k ∨b k, does not depend on the value of c k. Here, the operator ∨ represents a logical sum.

【0020】本来演算器の入力ビット数は任意のnビッ
トであるが、以下、説明を簡単にするため、4ビット加
算の零フラグ検出回路を例として説明を行なう。図2
は、本発明における零フラグ検出回路の構成を示してい
る。本発明における零フラグ検出回路は、1ビット目の
1ビット半加算の零フラグ検出回路7と、2ビット目か
ら4ビット目までの1ビット全加算の零フラグ検出回路
8と、その出力の論理積をとるANDゲート9からな
る。
Originally, the number of input bits of the arithmetic unit is arbitrary n bits, but in order to simplify the description, the zero flag detection circuit for 4-bit addition will be described below as an example. Figure 2
Shows the configuration of the zero flag detection circuit in the present invention. The zero flag detection circuit according to the present invention is a zero flag detection circuit 7 for 1-bit half addition of the first bit, a zero flag detection circuit 8 for 1-bit full addition from the second bit to the fourth bit, and the logic of its output. It consists of an AND gate 9 that takes the product.

【0021】図3は、図2における本発明における1ビ
ット半加算の零フラグ検出回路7の例を示している。図
の排他的論理積のゲート10はz1の値を算出する。図
のORゲート11は、a1とb1の論理和をとることによ
り、2ビット目への桁上げc2を算出する。
FIG. 3 shows an example of the 1-bit half addition zero flag detection circuit 7 in FIG. 2 according to the present invention. The exclusive-AND gate 10 in the figure calculates the value of z 1 . OR gate 11 in FIG, by taking the logical sum of a 1 and b 1, and calculates a carry c2 to the second bit.

【0022】図4は、本発明におけるk(2≦k≦4な
る自然数)ビット目の1ビット全加算の零フラグ検出回
路を示している。図の排他的論理積のゲート10は、c
k=0の場合のzkの値を算出する。図中、排他的論理和
のゲート12は、ck=0のときは、排他的論理積ゲー
トの出力をそのままzkとし、ck=1のときは、排他的
論理積ゲートの出力の反転をzkとして出力する。図
中、ORゲート11は、akとbkの論理和をとることに
より、k+1ビット目への桁上げck+1を算出する。
FIG. 4 shows a zero flag detection circuit for the 1-bit full addition of the k-th (natural number 2 ≦ k ≦ 4) bit in the present invention. The gate 10 of the exclusive logical product in the figure is c
The value of z k when k = 0 is calculated. In the figure, the gate 12 of the exclusive-OR gates the output of the exclusive-OR gate as z k when c k = 0, and the inversion of the output of the exclusive-AND gate when c k = 1. Is output as z k . In the figure, the OR gate 11 calculates the carry c k + 1 to the k + 1 th bit by taking the logical sum of a k and b k .

【0023】以上に述べた零フラグ検出回路の構成によ
り、4個の排他的論理和ゲート、3個の排他的論理和ゲ
ート、ORゲート、および1個の4入力ANDゲートに
より零フラグ検出回路が構成でき、texnorを入力排対
的論理積ゲート1段の遅延、texnorを入力排他的論理
和ゲート1段の遅延、torをck+1算出に用いるORゲ
ートの遅延、tandをANDゲートの遅延とすると、t
exnor>torではtexnor+texor+tandの遅延で、t
exor≦torではtor+tandの遅延で全体の零フラグを
検出する。
With the configuration of the zero flag detection circuit described above, the zero flag detection circuit is composed of four exclusive OR gates, three exclusive OR gates, an OR gate, and one 4-input AND gate. Can be configured, t exnor is a delay of one stage of an input exclusionary AND gate, t exnor is a delay of one stage of an input exclusive OR gate, t or is a delay of an OR gate used for calculating ck + 1 , and If the AND gate delay is t
When exnor > t or , the delay is t exnor + t exor + t and ,
When exor ≤t or , the entire zero flag is detected with the delay of t or + t and .

【0024】<実施例2>本来演算器の入力ビット数は
任意のnビットであるが、以下、説明を簡単にするた
め、4ビット加算の零フラグ検出回路を例として説明を
行なう。図5は、4ビット加減算器における零フラグ検
出回路の構成を示している。図中、補数発生器13は、
kと制御信号入力Sを入力し、S=0の場合は出力信
号bbkとしてbkを、S=1の場合はbbkとしてbk
論理反転した値を出力する。1ビット目の1ビット全加
算の零フラグ検出回路の桁上げ入力c1には、Sを入力
する。
<Embodiment 2> The number of input bits of the arithmetic unit is originally arbitrary n bits, but in order to simplify the description, a zero flag detection circuit for 4-bit addition will be described below as an example. FIG. 5 shows the configuration of the zero flag detection circuit in the 4-bit adder / subtractor. In the figure, the complement generator 13 is
When b k and the control signal input S are input, b k is outputted as an output signal bb k when S = 0, and a value obtained by logically inverting b k is outputted as bb k when S = 1. S is input to the carry input c 1 of the zero flag detection circuit for the 1-bit full addition of the first bit.

【0025】図5における1ビット全加算の零フラグ検
出回路の例は、図4の1ビット全加算の零フラグ検出回
路と同一である。図6は補数発生器の回路例である。b
kと制御回路の排他的論理和をとることによりbbkを出
力し、1ビット加算の零フラグ検出回路の入力とする。
各ビットの補数発生器は、並列に動作するため、加算の
零フラグ発生回路の遅延に補数発生器の遅延を加えた遅
延で、加減算器の零フラグを検出する。
An example of the 1-bit full addition zero flag detection circuit in FIG. 5 is the same as the 1-bit full addition zero flag detection circuit in FIG. FIG. 6 is a circuit example of the complement generator. b
By taking the exclusive OR of k and the control circuit, bb k is output and used as the input of the zero flag detection circuit for 1-bit addition.
Since the complement generator of each bit operates in parallel, the zero flag of the adder / subtractor is detected with a delay obtained by adding the delay of the complement zero generator to the delay of the addition zero flag generator.

【0026】[0026]

【発明の効果】以上説明した通り、1ビット加算の零フ
ラグ検出回路により得られた各ビットの零フラグの全て
についての論理積をとることにより、nビットの2の補
数表示の2進数加算の零フラグを検出する零フラグ検出
回路において、従来の技術では、桁上げ信号がm段の選
択器を伝搬し、桁上げ選択方式をとるため、膨大な量の
ハードウェアを必要としていた。これに対し、本発明
は、上記の同一の条件で、桁上げ信号の伝搬が高々1ビ
ットとなり、nビット全ての1ビット加算の零フラグが
並列に求められるので、高速に零フラグが検出でき、な
おかつ零フラグ検出に必要なハードウェア量が大幅に削
減される。パイプライン計算機等において、加算器の零
フラグの値により次段のパイプラインの動作を制御する
場合があり、従来の零フラグ検出回路に比べ本発明で
は、零フラグを早期に決定できる。このため次段のパイ
プラインの動作条件を早期に設定でき、パイプラインサ
イクルを短縮することが可能となる。また、零フラグ検
出回路は、加算器と並列に設置するためハード量の少な
い回路構成が不可欠である。本発明は、従来の技術に比
べ極めて少ないハードウェア量で零フラグ検出回路を構
成できる。
As described above, the logical product of all the zero flags of each bit obtained by the one-bit addition zero flag detection circuit is used to obtain the n-bit two's complement binary addition. In the zero flag detection circuit for detecting the zero flag, the conventional technique requires a huge amount of hardware because the carry signal propagates through the m-stage selector and adopts the carry selection method. On the other hand, according to the present invention, under the same conditions described above, the propagation of the carry signal is at most 1 bit, and the zero flags for all 1-bit addition of n bits are obtained in parallel, so that the zero flag can be detected at high speed. Moreover, the amount of hardware required for detecting the zero flag is significantly reduced. In a pipeline computer or the like, the operation of the pipeline in the next stage may be controlled by the value of the zero flag of the adder, and the present invention can determine the zero flag earlier than the conventional zero flag detection circuit. Therefore, the operating condition of the pipeline of the next stage can be set early, and the pipeline cycle can be shortened. Further, since the zero flag detection circuit is installed in parallel with the adder, a circuit configuration with a small amount of hardware is essential. According to the present invention, the zero flag detection circuit can be configured with a significantly small amount of hardware as compared with the conventional technique.

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

【図1】本発明における1ビット加算の零フラグ検出回
路の真理値表を表している。
FIG. 1 shows a truth table of a 1-bit addition zero flag detection circuit according to the present invention.

【図2】本発明における加算器の零フラグ検出回路の構
成を表している。
FIG. 2 shows a configuration of a zero flag detection circuit of an adder according to the present invention.

【図3】本発明における1ビット半加算の零フラグ検出
回路を表している。
FIG. 3 illustrates a 1-bit half addition zero flag detection circuit according to the present invention.

【図4】本発明における1ビット全加算の零フラグ検出
回路を表している。
FIG. 4 shows a zero flag detection circuit for 1-bit full addition according to the present invention.

【図5】本発明における加減算器の零フラグ検出回路の
構成を表している。
FIG. 5 shows a configuration of a zero flag detection circuit of an adder / subtractor according to the present invention.

【図6】本発明における補数発生器の回路例を表してい
る。
FIG. 6 shows a circuit example of a complement generator according to the present invention.

【図7】従来の桁上げ選択方式による零フラグ検出回路
の概念を表している。
FIG. 7 shows the concept of a zero flag detection circuit according to a conventional carry selection method.

【図8】従来の1ビット加算の零フラグ検出回路の真理
値表を表している。
FIG. 8 shows a truth table of a conventional one-bit addition zero flag detection circuit.

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

1 上位零フラグ検出回路 2 上位零フラグ検出回路 3 下位零フラグ検出回路 4 上位桁上げ選択器 5 上位零フラグ選択器 6 ANDゲート 7 1ビット半加算の零フラグ検出回路 8 1ビット全加算の零フラグ検出回路 9 ANDゲート 10 排他的論理積ゲート 11 ORゲート 12 排他的論理和ゲート 13 補数発生器 1 Upper Zero Flag Detection Circuit 2 Upper Zero Flag Detection Circuit 3 Lower Zero Flag Detection Circuit 4 Upper Carry Selector 5 Upper Zero Flag Selector 6 AND Gate 7 1 Bit Half Addition Zero Flag Detection Circuit 8 1 Bit Full Addition Zero Flag detection circuit 9 AND gate 10 Exclusive logical product gate 11 OR gate 12 Exclusive logical sum gate 13 Complement generator

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 n(nは任意の自然数)ビットの2の補
数表現による2進数A=ann-1…ak…a21(kは
1≦k≦nなる任意の自然数)及びB=bnn-1…bk
…b21を入力し、その2数の加算を行なうとき、演算
結果が零の場合は零フラグZRとして1を出力し、非零
の場合は零フラグZRとして0を出力する零フラグ検出
回路において、 零フラグ検出途中で発生するkビットからk+1ビット
への零フラグ検出用桁上げ信号ck+1をakおよびbk
論理和で生成させることを特徴とする零フラグ検出回
路。
1. A binary number represented by a two's complement representation of n (n is an arbitrary natural number) A = a n a n-1 ... A k ... A 2 a 1 (k is an arbitrary natural number satisfying 1 ≦ k ≦ n). ) And B = b n b n-1 ... b k
When inputting b 2 b 1 and adding the two numbers, 1 is output as the zero flag ZR when the operation result is zero, and 0 is output as the zero flag ZR when the operation result is non-zero. Zero flag detection In the circuit, a zero flag detection circuit is characterized in that a carry signal c k + 1 for detecting a zero flag from k bits to k + 1 bits generated during the detection of a zero flag is generated by a logical sum of a k and b k .
【請求項2】 n(nは任意の自然数)ビットの2の補
数表現による2進数A=ann-1…ak…a21(kは
1≦k≦nなる任意の自然数)及びB=bnn-1…bk
…b21において、Aと、Bの各ビットを反転させたB
Bを入力とし、最下位ビットへの桁上げckを1とし
て、A−Bの減算を行なうとき、零フラグ検出途中で発
生するkビットからk+1ビットへの零フラグ検出用桁
上げ信号ck+1を、akおよびbkの論理和で生成させる
ことを特徴とする零フラグ検出回路。
2. A binary number A = a n a n-1 ... a k ... a 2 a 1 (k is an arbitrary natural number satisfying 1 ≦ k ≦ n) in which n (n is an arbitrary natural number) bit is represented by two's complement. ) And B = b n b n-1 ... b k
... B in which each bit of A and B is inverted in b 2 b 1 .
When B is an input and the carry c k to the least significant bit is 1, and AB is subtracted, a carry signal c k + for detecting a zero flag from k bits to k + 1 generated during the zero flag detection. A zero flag detection circuit, wherein 1 is generated by a logical sum of a k and b k .
JP27637192A 1992-10-14 1992-10-14 Zero flag detection circuit Pending JPH06131159A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP27637192A JPH06131159A (en) 1992-10-14 1992-10-14 Zero flag detection circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP27637192A JPH06131159A (en) 1992-10-14 1992-10-14 Zero flag detection circuit

Publications (1)

Publication Number Publication Date
JPH06131159A true JPH06131159A (en) 1994-05-13

Family

ID=17568500

Family Applications (1)

Application Number Title Priority Date Filing Date
JP27637192A Pending JPH06131159A (en) 1992-10-14 1992-10-14 Zero flag detection circuit

Country Status (1)

Country Link
JP (1) JPH06131159A (en)

Similar Documents

Publication Publication Date Title
US9146707B2 (en) Generating a fast 3x multiplicand term for radix-8 booth multiplication
US5122982A (en) Carry generation method and apparatus
Timarchi et al. Arithmetic circuits of redundant SUT-RNS
JP2585649B2 (en) Division circuit
JPS62256034A (en) Pipeline computing unit
US4224680A (en) Parity prediction circuit for adder/counter
JPH09222991A (en) Adding method and adder
JPH09114641A (en) Apparatus and method for determining the most significant digit
JPH06131159A (en) Zero flag detection circuit
KR100254914B1 (en) Zero detection for binary sum
CN116149605A (en) Modulus Multiplication Circuit and Method for Calculating Modulus Multiplication
US6343303B1 (en) Method of determining a scaling factor
JPH0661871A (en) Parallel serial data conversion circuit
JP2606331B2 (en) Absolute value addition / subtraction method and apparatus
KR950015180B1 (en) High speed adder
RU2823911C1 (en) Pipeline adder-accumulator by arbitrary modules
Bashagha et al. A new digit-serial divider architecture
Lutz et al. Comparison of two's complement numbers
Parimaladevi et al. Analysis of Power Efficient Modulo 2n+ 1 Adder Architectures
San et al. Development and Result Verification of a Multi-Bit Binary Parallel-Prefix Adder-Subtractor
JPH06314186A (en) Adder chain and addition method
JP2705162B2 (en) Arithmetic processing unit
JP2681968B2 (en) Arithmetic processing unit
JP3106525B2 (en) Addition method and its circuit
KR100196520B1 (en) Two&#39;s complement converter for area improvement