Logical equality explained

Logical equality
Other Titles:EQ, XNOR
Venn Diagram:Venn1001.svg
Definition:

x=y

Truth Table:

(1001)

Logic Gate:XNOR_ANSI.svg
Dnf:

xy+\overline{x}\overline{y}

Cnf:

(\overline{x}+y)(x+\overline{y})

Zhegalkin:

1xy

0-Preserving:no
1-Preserving:yes
Monotone:no
Affine:yes
Self-Dual:no

Logical equality is a logical operator that compares two truth values, or more generally, two formulas, such that it gives the value True if both arguments have the same truth value, and False if they are different. In the case where formulas have free variables, we say two formulas are equal when their truth values are equal for all possible resolutions of free variables. It corresponds to equality in 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:

\begin{align} x&\leftrightarrowy&x&\Leftrightarrowy&Exy\\ x&~EQ~y&x&=y \end{align}

Some logicians, however, draw a firm distinction between a functional form, like those in the left column, which they interpret as an application of a function to a pair of arguments — and thus a mere indication that the value of the compound expression depends on the values of the component expressions — and an equational form, like those in the right column, which they interpret as an assertion that the arguments have equal values, in other words, that the functional value of the compound expression is true.

Definition

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:

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).

(x=y)=lnot(xy)=lnotxy=xlnoty=(x\landy)\lor(lnotx\landlnoty)=(lnotx\lory)\land(x\lorlnoty)

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

x\leftrightarrowy

y
T F
x TTF
FFT

Inequality

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:

\begin{align} x&+y&x&\not\equivy&Jxy\\ x&~XOR~y&x&\ney \end{align}

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".

See also

External links

Notes and References

  1. .