The XNOR gate (sometimes ENOR, EXNOR, NXOR, XAND and pronounced as exclusive NOR) is a digital logic gate whose function is the logical complement of the exclusive OR (XOR) gate. It is equivalent to the logical connective ( ↔ {\displaystyle \leftrightarrow } ) from mathematical logic, also known as the material biconditional. The two-input version implements logical 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. The algebraic notation used to represent the XNOR operation is S = A ⊙ B {\displaystyle S=A\odot B} . The algebraic expressions ( A + B ¯ ) ⋅ ( A ¯ + B ) {\displaystyle (A+{\overline {B}})\cdot ({\overline {A}}+B)} and A ⋅ B + A ¯ ⋅ B ¯ {\displaystyle A\cdot B+{\overline {A}}\cdot {\overline {B}}} both represent the XNOR gate with inputs A and B.
Symbols There are two symbols for XNOR gates: one with distinctive shape and one with rectangular shape and label. Both symbols for the XNOR gate are that of the XOR gate with an added inversion bubble.
Hardware description XNOR gates are represented in most TTL and CMOS IC families. The standard 4000 series CMOS IC is the 4077, and the TTL IC is the 74266 (although an open-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 TTL 74LS implementation, the 74LS266, as well as the CMOS gates (CD4077, 74HC4077 and 74HC266 and so on) are available from most semiconductor manufacturers such as Texas Instruments or NXP, etc. They are usually available in both through-hole DIP and SOIC formats (SOIC-14, SOC-14 or TSSOP-14). Datasheets are readily available in most datasheet databases and suppliers.
Implementation
AND-OR-invert logic An XNOR gate can be implemented using a NAND gate and an OR-AND-invert gate, as shown in the following picture. This is based on the identity
a ⊻ b ¯ ⟺ ( a ∧ ¯ b ) ∧ ¯ ( a ∨ b ) {\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 a flip-flop), uses a 2-2 AND-OR-invert gate, shown on below on the right.
CMOS CMOS implementations based on the OAI logic above can be realized with 10 transistors, as shown below. The implementation which uses both normal and inverted inputs uses 8 transistors, or 12 if inverters have to be used.
Alternatives
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 apply Boolean algebra to transform ( A + B ¯ ) ⋅ ( A ¯ + B ) ≡ ( A ⋅ B ) + ( A ¯ ⋅ B ¯ ) {\displaystyle (A+{\overline {B}})\cdot ({\overline {A}}+B)\equiv (A\cdot B)+({\overline {A}}\cdot {\overline {B}})} as stated above, and apply de Morgan's Law to the last term to get ( A ⋅ B ) + ( 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 either NAND logic or NOR 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).
… excerpt ends here. Continue reading the full article.






