Skip to main content
The new Teacher Workspace is here. Your first 3 assignments are free. Try it →

XNOR Gate

An XNOR gate is a digital logic gate that outputs 1 only when its inputs are the same, either both 0 or both 1. In Intro to Electrical Engineering, it shows up in logic analysis, circuit design, and parity checking.

Last updated July 2026

What is XNOR Gate?

An XNOR gate is a two-input logic gate in Intro to Electrical Engineering that gives a 1 when the inputs match. If both inputs are 0, the output is 1. If both inputs are 1, the output is also 1. If the inputs are different, the output drops to 0.

That makes XNOR the opposite of XOR. XOR says, “give me a 1 when the inputs differ,” while XNOR says, “give me a 1 when the inputs are equal.” A lot of students remember XNOR as the equality gate because that is exactly what it checks.

For two inputs A and B, the Boolean expression is the complement of XOR. One common form is (A AND B) OR (NOT A AND NOT B). That expression shows the two ways to get a 1: both inputs are high, or both inputs are low. In a truth table, those are the only two rows that produce a 1.

In circuit work, XNOR is usually not treated as just a memorization item. You may need to read its symbol in a logic diagram, build it from other gates, or simplify an expression that behaves like XNOR. Since the course also covers universal gates, it is useful to know that XNOR can be built from NAND or NOR combinations even if it is not itself a universal gate.

A good mental model is a comparator for two bits. If the bits match, XNOR outputs 1. That is why it shows up in parity checks and comparison logic, where the circuit is asking whether two signals agree rather than whether one is simply on or off.

Why XNOR Gate matters in Intro to Electrical Engineering

XNOR matters because it is one of the cleanest examples of a gate that does a specific comparison job instead of a simple on or off operation. In digital circuits, you are often not just asking whether a signal is present. You are asking whether two signals match, and XNOR answers that directly.

That shows up in logic design, error detection, and small comparison circuits. For example, if a receiver wants to check whether a received bit matches an expected bit, XNOR gives a high output only when the pair agrees. In parity checking, that same idea helps a circuit decide whether a data word has the right even or odd pattern.

XNOR also deepens your understanding of how Boolean algebra maps to hardware. The expression (A AND B) OR (NOT A AND NOT B) is a nice reminder that a gate can be described either by a truth table, by a symbol, or by an equation, and all three views should say the same thing. If you can move between those views, you are doing real digital logic work, not just memorizing names.

It also connects naturally to the rest of the chapter on basic logic gates and universal gates. Once you know how XNOR behaves, you can compare it to AND, OR, NOT, XOR, NAND, and NOR, then trace how larger computational circuits are built from smaller blocks.

Keep studying Intro to Electrical Engineering Unit 14

Official unit cheatsheet

open one-pager

How XNOR Gate connects across the course

xor gate

XOR and XNOR are complements, so they are often taught together. XOR outputs 1 when inputs differ, while XNOR outputs 1 when inputs match. If you know one truth table, you can usually get the other by flipping the output rows.

Truth Table

A truth table is the fastest way to verify what XNOR does. You list every input combination, then check which rows produce 1. For XNOR, the matching pairs, 0 0 and 1 1, are the rows that stay high.

Logic Gate

XNOR is one member of the logic gate family, so it fits into the bigger system of digital decision-making. Like other gates, it takes binary inputs and produces a binary output, but its rule is equality instead of conjunction or disjunction.

Universal Gate

XNOR is not a universal gate, but it is still useful to compare it with NAND and NOR. Universal gates can build any other gate by themselves, so knowing how XNOR is built from combinations of simpler gates helps you see the logic behind digital design.

Is XNOR Gate on the Intro to Electrical Engineering exam?

A quiz problem might show you a truth table, a logic symbol, or a Boolean expression and ask you to identify XNOR or trace its output. The move is simple: check whether the inputs are equal. If they are both 0 or both 1, the output is 1, and if they differ, the output is 0.

In a circuit question, you may need to rewrite XNOR as a combination of AND, OR, and NOT, or explain how it compares to XOR. In lab work or problem sets, you might use XNOR to build a small comparator or to check parity in a binary data stream. The main skill is translating between the symbol, the truth table, and the Boolean expression without mixing it up with XOR.

XNOR Gate vs xor gate

These two are easy to mix up because they look like opposites, and they are. XOR gives 1 when inputs are different, while XNOR gives 1 when inputs are the same. A quick check is this: if you see equal inputs producing a high output, it is XNOR, not XOR.

Key things to remember about XNOR Gate

  • XNOR is the equality gate, so it outputs 1 only when its inputs match.

  • For two inputs, the matching cases are 0 0 and 1 1, and those are the only rows that produce a 1 in the truth table.

  • XNOR is the complement of XOR, so the two gates have opposite output patterns.

  • You can write XNOR with Boolean logic as (A AND B) OR (NOT A AND NOT B).

  • In Intro to Electrical Engineering, XNOR shows up in comparison logic, parity checking, and circuit analysis.

Frequently asked questions about XNOR Gate

What is an XNOR gate in Intro to Electrical Engineering?

An XNOR gate is a logic gate that outputs 1 when its inputs are equal. With two inputs, that means 0 0 gives 1 and 1 1 gives 1. If the inputs differ, the output is 0.

How is XNOR different from XOR?

XOR and XNOR are opposites. XOR outputs 1 when inputs differ, while XNOR outputs 1 when inputs match. If you are stuck, check whether the question is asking about difference or equality.

What is the truth table for an XNOR gate?

For two inputs, the XNOR truth table gives 1 for 0 0 and 1 1, and 0 for 0 1 and 1 0. That pattern is what makes it an equality checker. It is one of the easiest gates to verify from a table.

Where do you use XNOR in electrical engineering?

XNOR shows up in comparison circuits and parity checking because it tells you whether two bits agree. In design problems, you may also build it from other gates or identify it inside a larger logic diagram.

XNOR Gate | Intro to Electrical Engineering | Fiveable