HOME

TheInfoList



OR:

The XNOR gate (sometimes ENOR, EXNOR, NXOR, XAND and pronounced as exclusive NOR) is a digital
logic gate A logic gate is a device that performs a Boolean function, a logical operation performed on one or more binary inputs that produces a single binary output. Depending on the context, the term may refer to an ideal logic gate, one that has, for ...
whose function is the
logical complement In logic, negation, also called the logical not or logical complement, is an operation that takes a proposition P to another proposition "not P", written \neg P, \mathord P, P^\prime or \overline. It is interpreted intuitively as being true ...
of the exclusive OR ( XOR) gate. It is equivalent to the logical connective (\leftrightarrow) from
mathematical logic Mathematical logic is the study of Logic#Formal logic, formal logic within mathematics. Major subareas include model theory, proof theory, set theory, and recursion theory (also known as computability theory). Research in mathematical logic com ...
, 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 \odot B. The algebraic expressions (A + \overline) \cdot (\overline + B) and 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 XOR gate (sometimes EOR, or EXOR and pronounced as Exclusive OR) is a digital logic gate that gives a true (1 or HIGH) output when the number of true inputs is odd. An XOR gate implements an exclusive disjunction, exclusive or (\nleftrightarrow) ...
with an added inversion bubble.


Hardware description

XNOR gates are represented in most TTL and
CMOS Complementary metal–oxide–semiconductor (CMOS, pronounced "sea-moss ", , ) is a type of MOSFET, metal–oxide–semiconductor field-effect transistor (MOSFET) semiconductor device fabrication, fabrication process that uses complementary an ...
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 Texas Instruments Incorporated (TI) is an American multinational semiconductor company headquartered in Dallas, Texas. It is one of the top 10 semiconductor companies worldwide based on sales volume. The company's focus is on developing analog ...
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 OR-AND-invert gates, or OAI-gates, are logic gates comprising OR gates followed by a NAND gate. They can be efficiently implemented in logic families like CMOS and Transistor–transistor logic, TTL. They are Duality_(mathematics)#Duality_in_logic_a ...
gate, as shown in the following picture. This is based on the identity \overline \iff \left(a \overline b\right) \overline \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 AND-OR-invert (AOI) logic and AOI gates are two-level compound (or complex) logic functions constructed from the combination of one or more AND gates followed by a NOR gate (equivalent to an OR gate through an Inverter gate, which is the "OI" part ...
gate, shown on below on the right. XNOR OAI gates.svg, XNOR implemention using a NAND and an OAI gate XNOR AOI inverted inputs gates.svg, XNOR implementation using a 2-2-AOI gate with normal and inverted inputs


CMOS

CMOS implementations based on the OAI logic above can be realized with 10
transistors A transistor is a semiconductor device used to Electronic amplifier, amplify or electronic switch, switch electrical signals and electric power, power. It is one of the basic building blocks of modern electronics. It is composed of semicondu ...
, as shown below. The implementation which uses both normal and inverted inputs uses 8 transistors, or 12 if inverters have to be used. XNOR OAI CMOS.svg, An XNOR-gate in CMOS using a NAND and an OR-AND-invert gate XNOR AOI CMOS inverted inputs.svg, An XNOR gate in CMOS using both normal and inverted inputs


Pinout

Both the 4077 and 74x266 devices (SN74LS266, 74HC266, 74266, etc.) have the same pinout diagram, as follows:


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 + \overline) \cdot (\overline + 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 In mathematics and mathematical logic, Boolean algebra is a branch of algebra. It differs from elementary algebra in two ways. First, the values of the variable (mathematics), variables are the truth values ''true'' and ''false'', usually denot ...
to transform (A + \overline) \cdot (\overline + B) \equiv (A \cdot B) + ( \overline A \cdot \overline B ) as stated above, and apply
de Morgan's Law In propositional logic and Boolean algebra, De Morgan's laws, also known as De Morgan's theorem, are a pair of transformation rules that are both valid rules of inference. They are named after Augustus De Morgan, a 19th-century British mathemat ...
to the last term to get (A \cdot B) + \overline 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). An alternative arrangement is of five NAND gates in a topology that emphasizes the construction of the function from (A \cdot B) + (\overline \cdot \overline), noting from
de Morgan's Law In propositional logic and Boolean algebra, De Morgan's laws, also known as De Morgan's theorem, are a pair of transformation rules that are both valid rules of inference. They are named after Augustus De Morgan, a 19th-century British mathemat ...
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 + \overline) \cdot (\overline + B), noting from
de Morgan's Law In propositional logic and Boolean algebra, De Morgan's laws, also known as De Morgan's theorem, are a pair of transformation rules that are both valid rules of inference. They are named after Augustus De Morgan, a 19th-century British mathemat ...
that a NOR gate is an inverted-input AND gate. 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 fully universal logic gate. NOT and XOR gates can be constructed this way.


More than two inputs

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 the binary 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: 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

*
AND gate The AND gate is a basic digital logic gate that implements the logical conjunction (∧) from mathematical logic AND gates behave according to their truth table. A HIGH output (1) results only if all the inputs to the AND gate are HIGH (1). If a ...
*
OR gate The OR gate is a digital logic gate that implements logical disjunction. The OR gate outputs "true" if any of its inputs is "true"; otherwise it outputs "false". The input and output states are normally represented by different voltage levels. ...
*
NOT gate Not or NOT may also refer to: Language * Not, the general declarative form of "no", indicating a negation of a related statement that usually precedes * ... Not!, a grammatical construction used as a contradiction, popularized in the early 1990 ...
*
NAND gate In digital electronics, a NAND (NOT AND) gate is a logic gate which produces an output which is false only if all its inputs are true; thus its output is complement to that of an AND gate. A LOW (0) output results only if all the inputs to the ...
*
NOR gate The NOR (NOT OR) gate is a digital logic gate that implements logical NOR - it behaves according to the truth table to the right. A HIGH output (1) results if both the inputs to the gate are LOW (0); if one or both input is HIGH (1), a LOW o ...
*
XOR gate XOR gate (sometimes EOR, or EXOR and pronounced as Exclusive OR) is a digital logic gate that gives a true (1 or HIGH) output when the number of true inputs is odd. An XOR gate implements an exclusive disjunction, exclusive or (\nleftrightarrow) ...
* Kronecker delta function *
Logical biconditional In logic and mathematics, the logical biconditional, also known as material biconditional or equivalence or bidirectional implication or biimplication or bientailment, is the logical connective used to conjoin two statements P and Q to form th ...
*
If and only if In logic and related fields such as mathematics and philosophy, "if and only if" (often shortened as "iff") is paraphrased by the biconditional, a logical connective between statements. The biconditional is true in two cases, where either bo ...


References


External links


Texas Instruments© CD4077 Datasheet
{{DEFAULTSORT:Xnor Gate Logic gates it:Algebra di Boole#XNOR