What is xnor gate

Last updated: April 1, 2026

Quick Answer: An XNOR gate is a digital logic gate that outputs true when both inputs are identical (both true or both false). It produces the opposite output of an XOR gate, making it an equivalence detector.

Key Facts

Overview

The XNOR gate is a fundamental digital logic component used extensively in microprocessors, digital circuits, and microcontrollers. The name XNOR stands for Exclusive NOR, indicating it represents the logical inverse of the XOR (Exclusive OR) operation. XNOR gates produce high output when both inputs are electrically equivalent.

Truth Table and Operation

The XNOR gate's behavior is straightforward: when both inputs are 0, output is 1; when both inputs are 1, output is 1; when inputs differ (one 0 and one 1), output is 0. This makes XNOR particularly useful for checking whether two binary values are identical, earning it the alternate name "equivalence gate."

Logical Expression and Implementation

The Boolean algebra expression for XNOR is Q = (A·B) + (A'·B'), where · represents AND, + represents OR, and ' represents NOT. This can also be expressed as XNOR(A,B) = NOT(XOR(A,B)). XNOR gates can be implemented from basic logic gates or created as single integrated circuit components in CMOS or TTL technology.

Practical Applications

Comparison with Related Gates

While AND gates output 1 only when both inputs are 1, XNOR outputs 1 when inputs are identical. XOR outputs 1 when inputs differ. This makes XNOR unique for applications requiring equivalence detection rather than simple conjunction or difference detection.

Related Questions

What is the difference between XOR and XNOR gates?

XOR outputs 1 when inputs are different, while XNOR outputs 1 when inputs are identical. They are logical complements, with XNOR producing the inverse of XOR output for any given inputs.

How are XNOR gates used in practical circuits?

XNOR gates are used in equality comparators to detect matching signals, parity checkers for error detection, and control circuits that need to verify data equivalence. They're essential in data validation and transmission verification.

Can XNOR be constructed from other logic gates?

Yes, XNOR can be built using basic gates: (A AND B) OR (NOT A AND NOT B). Most integrated XNOR gates use CMOS implementation combining multiple transistors for efficient operation.

Sources

  1. Wikipedia - XNOR Gate CC-BY-SA-4.0
  2. Electronics Tutorials - XNOR Logic Gate CC-BY-SA