Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

XNOR gate

From Wikipedia, the free encyclopedia
Digital logic gate
icon
This articleneeds additional citations forverification. Please helpimprove this article byadding citations to reliable sources. Unsourced material may be challenged and removed.
Find sources: "XNOR gate" – news ·newspapers ·books ·scholar ·JSTOR
(September 2020) (Learn how and when to remove this message)
"Circled dot operator" redirects here. For matrix algebra, seeHadamard product (matrices).
XNOR gatetruth table
InputOutput
ABA XNOR B
001
010
100
111
Logical connectives
NOT¬A,A,A¯,A{\displaystyle \neg A,-A,{\overline {A}},{\sim }A}
ANDAB,AB,AB,A&B,A&&B{\displaystyle A\land B,A\cdot B,AB,A\mathop {\&} B,A\mathop {\&\&} B}
NANDA¯B,AB,AB,AB¯{\displaystyle A\mathrel {\overline {\land }} B,A\uparrow B,A\mid B,{\overline {A\cdot B}}}
ORAB,A+B,AB,AB{\displaystyle A\lor B,A+B,A\mid B,A\parallel B}
NORA¯B,AB,A+B¯{\displaystyle A\mathrel {\overline {\lor }} B,A\downarrow B,{\overline {A+B}}}
XNORAB,A¯B¯{\displaystyle A\odot B,{\overline {A\mathrel {\overline {\lor }} B}}}
equivalentAB,AB,AB{\displaystyle A\equiv B,A\Leftrightarrow B,A\leftrightharpoons B}
XORA_B,AB{\displaystyle A\mathrel {\underline {\lor }} B,A\oplus B}
└ nonequivalentAB,AB,AB{\displaystyle A\not \equiv B,A\not \Leftrightarrow B,A\nleftrightarrow B}
impliesAB,AB,AB{\displaystyle A\Rightarrow B,A\supset B,A\rightarrow B}
nonimplication (NIMPLY)AB,AB,AB{\displaystyle A\not \Rightarrow B,A\not \supset B,A\nrightarrow B}
converseAB,AB,AB{\displaystyle A\Leftarrow B,A\subset B,A\leftarrow B}
converse nonimplicationAB,AB,AB{\displaystyle A\not \Leftarrow B,A\not \subset B,A\nleftarrow B}
Related concepts
Applications
Category

TheXNOR gate (sometimesENOR,EXNOR,NXOR,XAND and pronounced asexclusive NOR) is a digitallogic gate whose function is thelogical complement of the exclusive OR (XOR) gate.[1] It is equivalent to the logical connective ({\displaystyle \leftrightarrow }) frommathematical logic, also known as thematerial biconditional. The two-input version implementslogical equality, behaving according to the truth table to the right, and hence the gate is sometimes called an "equivalence gate". A high output (1) results if both of the inputs to the gate are the same. If one but not both inputs are high (1), a low output (0) results.

Thealgebraic notation used to represent the XNOR operation isS=AB{\displaystyle S=A\odot B}. The algebraic expressions(A+B¯)(A¯+B){\displaystyle (A+{\overline {B}})\cdot ({\overline {A}}+B)} andAB+A¯B¯{\displaystyle A\cdot B+{\overline {A}}\cdot {\overline {B}}} both represent the XNOR gate with inputsA andB.

Symbols

[edit]

There aretwo symbols for XNOR gates: one with distinctive shape and one with rectangular shape and label. Both symbols for the XNOR gate are that of theXOR gate with an added inversion bubble.

Distinctive symbol
Rectangular symbol

Hardware description

[edit]

XNOR gates are represented in mostTTL andCMOSIC families. The standard4000 series CMOS IC is the 4077, and the TTL IC is the 74266 (although anopen-collector implementation). Both include four independent, two-input, XNOR gates. The (now obsolete) 74S135 implemented four two-input XOR/XNOR gates or two three-input XNOR gates.

Both the TTL74LS implementation, the 74LS266, as well as the CMOS gates (CD4077, 74HC4077 and 74HC266 and so on) are available from most semiconductor manufacturers such asTexas Instruments orNXP, etc.[2] They are usually available in both through-holeDIP andSOIC formats (SOIC-14, SOC-14 or TSSOP-14).

Datasheets are readily available in mostdatasheet databases and suppliers.

Implementation

[edit]

AND-OR-invert logic

[edit]

An XNOR gate can be implemented using a NAND gate and anOR-AND-invert gate, as shown in the following picture.[3]This is based on the identity

ab¯(a¯b)¯(ab){\displaystyle {\overline {a\veebar b}}\iff \left(a{\overline {\land }}b\right){\overline {\land }}\left(a\lor b\right)}

An alternative, which is useful when inverted inputs are also available (for example from aflip-flop), uses a 2-2AND-OR-invert gate, shown on below on the right.

  • XNOR implementation using a NAND and an OAI gate
    XNOR implementation using a NAND and an OAI gate
  • XNOR implementation using a 2-2-AOI gate with normal and inverted inputs
    XNOR implementation using a 2-2-AOI gate with normal and inverted inputs

CMOS

[edit]

CMOS implementations based on the OAI logic above can be realized with 10transistors, as shown below. The implementation which uses both normal and inverted inputs uses 8 transistors, or 12 if inverters have to be used.

  • An XNOR-gate in CMOS using a NAND and an OR-AND-invert gate
    An XNOR-gate in CMOS using a NAND and an OR-AND-invert gate
  • An XNOR gate in CMOS using both normal and inverted inputs
    An XNOR gate in CMOS using both normal and inverted inputs
  • Pinout diagram of the 74HC266N, 74LS266 and CD4077 quad XNOR plastic dual in-line package 14-pin package (PDIP-14) ICs.
    Pinout diagram of the 74HC266N, 74LS266 and CD4077 quad XNOR plasticdual in-line package 14-pin package (PDIP-14)ICs.

Alternatives

[edit]
XNOR gate circuit using three mixed gates

If a specific type of gate is not available, a circuit that implements the same function can be constructed from other available gates. A circuit implementing an XNOR function can be trivially constructed from an XOR gate followed by a NOT gate. If we consider the expression(A+B¯)(A¯+B){\displaystyle (A+{\overline {B}})\cdot ({\overline {A}}+B)}, we can construct an XNOR gate circuit directly using AND, OR and NOT gates. However, this approach requires five gates of three different kinds.

As alternative, if different gates are available we can applyBoolean algebra to transform(A+B¯)(A¯+B)(AB)+(A¯B¯){\displaystyle (A+{\overline {B}})\cdot ({\overline {A}}+B)\equiv (A\cdot B)+({\overline {A}}\cdot {\overline {B}})} as stated above, and applyde Morgan's Law to the last term to get(AB)+(A+B)¯{\displaystyle (A\cdot B)+{\overline {(A+B)}}} which can be implemented using only three gates as shown on the right.

An XNOR gate circuit can be made from four NOR gates. In fact, both NAND and NOR gates are so-called "universal gates" and any logical function can be constructed from eitherNAND logic orNOR logic alone. If the four NOR gates are replaced by NAND gates, this results in an XOR gate, which can be converted to an XNOR gate by inverting the output or one of the inputs (e.g. with a fifth NAND gate).

Desired gateNAND constructionNOR construction

An alternative arrangement is of five NAND gates in a topology that emphasizes the construction of the function from(AB)+(A¯B¯){\displaystyle (A\cdot B)+({\overline {A}}\cdot {\overline {B}})}, noting fromde Morgan's Law that a NAND gate is an inverted-input OR gate. Another alternative arrangement is of five NOR gates in a topology that emphasizes the construction of the function from(A+B¯)(A¯+B){\displaystyle (A+{\overline {B}})\cdot ({\overline {A}}+B)}, noting fromde Morgan's Law that a NOR gate is an inverted-input AND gate.

Desired gateNAND constructionNOR construction

For the NAND constructions, the lower arrangement offers the advantage of a shorter propagation delay (the time delay between an input changing and the output changing). For the NOR constructions, the upper arrangement requires fewer gates.

From the opposite perspective, constructing other gates using only XNOR gates is possible though XNOR is not a fullyuniversal logic gate. NOT and XOR gates can be constructed this way.

More than two inputs

[edit]

Although other gates (OR, NOR, AND, NAND) are available from manufacturers with three or more inputs per gate, this is not strictly true with XOR and XNOR gates. However, extending the concept of thebinary logical operation to three inputs, the SN74S135 with two shared "C" and four independent "A" and "B" inputs for its four outputs, was a device that followed the truth table:

InputOutput
ABCQ
0001
0010
0100
0111
1000
1011
1101
1110

This is effectively Q = NOT ((A XOR B) XOR C). Another way to interpret this is that the output is true if an even number of inputs are true. It does not implement a logical "equivalence" function, unlike two-input XNOR gates.

See also

[edit]
Wikimedia Commons has media related toXNOR gates.

References

[edit]
  1. ^"Exclusive-NOR Gate Tutorial". 22 August 2013. Retrieved6 May 2018.
  2. ^"XNOR Logic Gates". Retrieved6 May 2018.
  3. ^Fischer, P."Aussagenlogik und Gatter"(PDF). University of Heidelberg. Retrieved2024-01-21.

External links

[edit]
Retrieved from "https://en.wikipedia.org/w/index.php?title=XNOR_gate&oldid=1322653196"
Category:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp