☞ This page belongs to resource collections on Logic and Inquiry.
A truth table is a tabular array that illustrates the computation of a logical function, that is, a function of the form {\displaystyle f:\mathbb {A} ^{k}\to \mathbb {A} ,} where {\displaystyle k\!} is a non-negative integer and {\displaystyle \mathbb {A} } is the domain of logical values {\displaystyle \{\operatorname {false} ,\operatorname {true} \}.} The names of the logical values, or truth values, are commonly abbreviated in accord with the equations {\displaystyle \operatorname {F} =\operatorname {false} } and {\displaystyle \operatorname {T} =\operatorname {true} .}
In many applications it is usual to represent a truth function by a boolean function, that is, a function of the form {\displaystyle f:\mathbb {B} ^{k}\to \mathbb {B} ,} where {\displaystyle k\!} is a non-negative integer and {\displaystyle \mathbb {B} } is the boolean domain{\displaystyle \{0,1\}.\!} In most applications {\displaystyle \operatorname {false} } is represented by {\displaystyle 0\!} and {\displaystyle \operatorname {true} } is represented by {\displaystyle 1\!} but the opposite representation is also possible, depending on the overall representation of truth functions as boolean functions. The remainder of this article assumes the usual representation, taking the equations {\displaystyle \operatorname {F} =0} and {\displaystyle \operatorname {T} =1} for granted.
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 {\displaystyle \operatorname {NOT} ~p,} also written {\displaystyle \lnot p,\!} appears below:
The negation of a proposition {\displaystyle p\!} may be found notated in various ways in various contexts of application, often merely for typographical convenience. Among these variants are the following:
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 of its operands are true.
The truth table of {\displaystyle p~\operatorname {AND} ~q,} also written {\displaystyle p\land q\!} or {\displaystyle p\cdot q,\!} appears below:
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 of its operands are false.
The truth table of {\displaystyle p~\operatorname {OR} ~q,} also written {\displaystyle p\lor q,\!} appears below:
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 {\displaystyle p~\operatorname {EQ} ~q,} also written {\displaystyle p=q,\!}{\displaystyle p\Leftrightarrow q,\!} or {\displaystyle p\equiv q,\!} appears below:
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 {\displaystyle p~\operatorname {XOR} ~q,} also written {\displaystyle p+q\!} or {\displaystyle p\neq q,\!} appears below:
The logical implication relation and the material conditional function 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 {\displaystyle {\text{if}}~p~{\text{then}}~q,\!} symbolized {\displaystyle p\rightarrow q,\!} and the logical implication {\displaystyle p~{\text{implies}}~q,\!} symbolized {\displaystyle p\Rightarrow q,\!} appears below:
The logical NAND is an operation on two logical values, typically the values of two propositions, that produces a value of false if and only if both of its operands are true. In other words, it produces a value of true if and only if at least one of its operands is false.
The truth table of {\displaystyle p~\operatorname {NAND} ~q,} also written {\displaystyle p{\stackrel {\circ }{\curlywedge }}q\!} or {\displaystyle p\barwedge q,\!} appears below:
The logical NNOR (“Neither Nor”) is an 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 {\displaystyle p~\operatorname {NNOR} ~q,} also written {\displaystyle p\curlywedge q,\!} appears below:
Portions of the above article were adapted from the following sources under the GNU Free Documentation License, under other applicable licenses, or by permission of the copyright holders.