Truth table

From testwiki
Revision as of 02:29, 9 March 2020 by imported>DannyS712 (Remove non-existent category)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Template:Font 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 f:𝔸k𝔸, where k is a non-negative integer and 𝔸 is the domain of logical values {false,true}. The names of the logical values, or truth values, are commonly abbreviated in accord with the equations F=false and T=true.

In many applications it is usual to represent a truth function by a boolean function, that is, a function of the form f:𝔹k𝔹, where k is a non-negative integer and 𝔹 is the boolean domain {0,1}. In most applications false is represented by 0 and true is represented by 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 F=0 and T=1 for granted.

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 NOTp, also written ¬p, appears below:


Logical Negation
p ¬p
F T
T F


The negation of a proposition p may be found notated in various ways in various contexts of application, often merely for typographical convenience. Among these variants are the following:


Variant Notations
Notation Vocalization
p¯ p bar
p~ p tilde
p p prime
p complement
!p bang p


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 of its operands are true.

The truth table of pANDq, also written pq or pq, appears below:


Logical Conjunction
p q pq
F F F
F T F
T F F
T T T


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 of its operands are false.

The truth table of pORq, also written pq, appears below:


Logical Disjunction
p q pq
F F F
F T T
T F T
T T T


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 pEQq, also written p=q, pq, or pq, appears below:


Logical Equality
p q p=q
F F T
F T F
T F F
T T T


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 pXORq, also written p+q or pq, appears below:


Exclusive Disjunction
p q pXORq
F F F
F T T
T F T
T T F


The following equivalents may then be deduced:

p+q=(p¬q)(¬pq)=(pq)(¬p¬q)=(pq)¬(pq)

Logical implication

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 ifpthenq, symbolized pq, and the logical implication pimpliesq, symbolized pq, appears below:


Logical Implication
p q pq
F F T
F T T
T F F
T T T


Logical NAND

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 pNANDq, also written pq or pq, appears below:


Logical NAND
p q pq
F F T
F T T
T F T
T T F


Logical NNOR

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 pNNORq, also written pq, appears below:


Logical NNOR
p q pq
F F T
F T F
T F F
T T F


Translations

Syllabus

Focal nodes

Peer nodes

Logical operators

Template:Col-begin Template:Col-break

Template:Col-break

Template:Col-end

Template:Col-begin Template:Col-break

Template:Col-break

Template:Col-break

Template:Col-end

Relational concepts

Template:Col-begin Template:Col-break

Template:Col-break

Template:Col-break

Template:Col-end

Information, Inquiry

Template:Col-begin Template:Col-break

Template:Col-break

Template:Col-break

Template:Col-break

Template:Col-end

Template:Col-begin Template:Col-break

Template:Col-break

Template:Col-break

Template:Col-end

Document history

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.