What does xnor gate do

Content on WhatAnswers is provided "as is" for informational purposes. While we strive for accuracy, we make no guarantees. Content is AI-assisted and should not be used as professional advice.

Last updated: April 4, 2026

Quick Answer: An XNOR gate, also known as an equivalence gate, outputs a high signal (1) only when both of its inputs are the same. If the inputs differ, it outputs a low signal (0). It essentially checks for equality between two binary inputs.

Key Facts

What is an XNOR Gate?

The XNOR gate, formally known as the "exclusive NOR" gate, is a fundamental digital logic gate. It performs a logical operation that results in a high output (represented as '1' or TRUE) only when its inputs are identical. Conversely, if the inputs are different, the output will be low (represented as '0' or FALSE). This behavior makes it particularly useful for tasks involving comparison and equality detection.

Understanding the Logic

At its core, the XNOR gate is defined by its truth table. For a gate with two inputs, let's call them A and B, the truth table looks like this:

Input AInput BOutput (A XNOR B)
001
010
100
111

As you can see, the output is '1' only when both A and B are '0' or when both A and B are '1'. In all other cases where the inputs differ, the output is '0'.

Relationship to Other Logic Gates

The XNOR gate is closely related to the XOR (exclusive OR) gate. An XOR gate outputs a '1' when its inputs are different and a '0' when they are the same. The XNOR gate is essentially the logical inverse of the XOR gate. This means that the output of an XNOR gate is the same as the output of an XOR gate with its output inverted by a NOT gate.

Mathematically, the XNOR operation can be represented as:

A XNOR B = (A AND B) OR (NOT A AND NOT B)

This expression highlights that the output is '1' if both inputs are '1' (A AND B) OR if both inputs are '0' (NOT A AND NOT B).

How XNOR Gates are Implemented

While XNOR gates are available as integrated circuits (ICs), they can also be constructed using combinations of other basic logic gates such as AND, OR, and NOT gates. The Boolean expression mentioned above directly translates into such an implementation. For instance, one common way to build an XNOR gate is using two XOR gates and one NOT gate, or by combining AND, OR, and NOT gates in a specific configuration.

Applications of XNOR Gates

The primary application of XNOR gates stems from their ability to detect equality. This makes them invaluable in various digital systems:

In Summary

The XNOR gate is a fundamental logic component that outputs a high signal when its inputs match and a low signal when they differ. Its role as an equivalence detector makes it a crucial element in the design of digital circuits, enabling tasks ranging from simple comparisons to complex error detection and cryptographic functions.

Sources

  1. XNOR gate - WikipediaCC-BY-SA-4.0
  2. Exclusive-NOR (XNOR) Gate - Electronics Tutorialsfair-use

Missing an answer?

Suggest a question and we'll generate an answer for it.