Logical equality is an operation on two 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:
The form (x = y) is equivalent to the form (x ∧ y) ∨ (¬x ∧ ¬y).
( x = y ) = ¬ ( x ⊕ y ) = ¬ x ⊕ y = x ⊕ ¬ y = ( x ∧ y ) ∨ ( ¬ x ∧ ¬ y ) = ( ¬ x ∨ y ) ∧ ( 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:
In mathematics, the plus sign "+" almost invariably indicates an operation that satisfies the axioms assigned to addition in the type of algebraic structure that is known as a field. For Boolean algebra, this means that the logical operation signified by "+" is not the same as the inclusive disjunction signified by "∨" but is actually equivalent to the logical inequality operator signified by "≠", or what amounts to the same thing, the 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:
This explains why "EQ" is often called "XNOR" in the combinational logic of circuit engineers, since it is the negation of the 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".
Keeton, Brian; Cavaness, Chuck; Friesen, Geoff (2001), Using Java 2, Que Publishing, p. 112, ISBN 9780789724687. 9780789724687 ↩