Definition:Truth Table

A truth table is a tabular array that represents the computation of a boolean function, that is, a function of the form $$f : \mathbb{B}^k \to \mathbb{B},$$ where $$k\!$$ is a non-negative integer and where $$\mathbb{B}$$ is the boolean domain $$\{ 0, 1 \}.\!$$

Logical negation
Logical negation is an operation on one logical value, typically the value of a proposition, that produces a value of true when its operand is false and a value of false when its operand is true.

The truth table of $$\texttt{NOT}\ p$$ (also written $$\lnot p$$ or ~$$p\!$$) is as follows:

The logical negation of a proposition $$p\!$$ is notated in different ways in various contexts of discussion and fields of application. Among these variants are the following:

Logical conjunction
Logical conjunction is an operation on two logical values, typically the values of two propositions, that produces a value of true if and only if both its operands are true.

The truth table of $$p\ \texttt{AND}\ q$$ (also written $$p \land q,$$ $$p\!$$&$$q,\!$$ or $$p \cdot q$$) is as follows:

Logical disjunction
Logical disjunction, also called logical alternation, is an operation on two logical values, typically the values of two propositions, that produces a value of false if and only if both its operands are false.

The truth table of $$p\ \texttt{OR}\ q$$ (also written $$p \lor q$$) is as follows:

Logical equality
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\ \texttt{EQ}\ q$$ (also written $$p = q,\!$$ $$p \Leftrightarrow q,$$ or $$p \equiv q$$) is as follows:

Exclusive disjunction
Exclusive disjunction, also known as logical inequality or symmetric difference, is an operation on two logical values, typically the values of two propositions, that produces a value of true just in case exactly one of its operands is true.

The truth table of $$p\ \texttt{XOR}\ q$$ (also written $$p + q,\!$$ $$p \oplus q,$$ or $$p \neq q$$) is as follows:

The following equivalents can then be deduced:


 * $$\begin{matrix}

p + q & = & (p \land \lnot q) & \lor & (\lnot p \land q) \\ \\     & = & (p \lor q) & \land & (\lnot p \lor \lnot q) \\ \\     & = & (p \lor q) & \land & \lnot (p \land q) \end{matrix}$$

Logical implication
The logical implication and the material conditional are both associated with an operation on two logical values, typically the values of two propositions, that produces a value of false if and only if the first operand is true and the second operand is false.

The truth table associated with the material conditional $$\operatorname{if}\ p\ \operatorname{then}\ q$$ (symbolized as $$p \rightarrow q$$) and the logical implication $$p\ \operatorname{implies}\ q$$ (symbolized as $$p \Rightarrow q$$) is as follows:

Logical NAND
The logical NAND is a logical operation on two logical values, typically the values of two propositions, that produces a value of true if and only if at least one of its operands is false. In other words, it produces a value of false if and only if both of its operands are true.

The truth table of $$p\ \texttt{NAND}\ q$$ (also written $$p~|~q,$$ $$p \uparrow q,$$ or $$p \bar\curlywedge q$$) is as follows:

Logical NOR
The logical NOR is a logical operation on two logical values, typically the values of two propositions, that produces a value of true if and only if both of its operands are false. In other words, it produces a value of false if and only if at least one of its operands is true.

The truth table of $$p\ \texttt{NOR}\ q$$ (also written $$p \curlywedge q$$ or $$p \downarrow q$$) is as follows: