# Logical equality

Logical equality
EQ, XNOR
Definition${\displaystyle x=y}$
Truth table${\displaystyle (1001)}$
Logic gate
Normal forms
Disjunctive${\displaystyle x\cdot y+{\overline {x}}\cdot {\overline {y}}}$
Conjunctive${\displaystyle ({\overline {x}}+y)\cdot (x+{\overline {y}})}$
Zhegalkin polynomial${\displaystyle 1\oplus x\oplus y}$
Post's lattices
0-preservingno
1-preservingyes
Monotoneno
Affineyes
Self-dualno

Logical equality is a

Boolean algebra and to the logical biconditional in propositional calculus
.

It is customary practice in various applications, if not always technically precise, to indicate the operation of logical equality on the logical operands x and y by any of the following forms:

{\displaystyle {\begin{aligned}x&\leftrightarrow y&x&\Leftrightarrow y&\mathrm {E} xy\\x&\mathrm {~EQ~} y&x&=y\end{aligned}}}

## Definition

Logical equality is an

logical values, typically the values of two propositions
, that produces a value of true if and only if both operands are false or both operands are true.

The truth table of p EQ q (also written as p = q, p ↔ q, Epq, p ≡ q, or p == q) is as follows:

Logical equality
p q p = q
0 0 1
0 1 0
1 0 0
1 1 1

## Alternative descriptions

The form (x = y) is equivalent to the form (xy) ∨ (¬x ∧ ¬y).

${\displaystyle (x=y)=\lnot (x\oplus y)=\lnot x\oplus y=x\oplus \lnot y=(x\land y)\lor (\lnot x\land \lnot y)=(\lnot x\lor y)\land (x\lor \lnot y)}$

For the operands x and y, the truth table of the logical equality operator is as follows:

${\displaystyle x\leftrightarrow y}$ y
T F
x T T F
F F T

## Inequality

In

exclusive disjunction
signified by "XOR" or "⊕". Naturally, these variations in usage have caused some failures to communicate between mathematicians and switching engineers over the years. At any rate, one has the following array of corresponding forms for the symbols associated with logical inequality:

{\displaystyle {\begin{aligned}x&+y&x&\not \equiv y&Jxy\\x&\mathrm {~XOR~} y&x&\neq y\end{aligned}}}

This explains why "EQ" is often called "

XOR operation; "NXOR" is a less commonly used alternative.[1]
Another rationalization of the admittedly circuitous name "XNOR" is that one begins with the "both false" operator NOR and then adds the eXception "or both true".