Truth table

Mathematical table used in logic / From Wikipedia, the free encyclopedia

Dear Wikiwand AI, let's keep it short by simply answering these key questions:

Can you list the top facts and stats about Truth table?

Summarize this article for a 10 years old


A truth table is a mathematical table used in logic—specifically in connection with Boolean algebra, boolean functions, and propositional calculus—which sets out the functional values of logical expressions on each of their functional arguments, that is, for each combination of values taken by their logical variables.[1] In particular, truth tables can be used to show whether a propositional expression is true for all legitimate input values, that is, logically valid.

A truth table has one column for each input variable (for example, A and B), and one final column showing all of the possible results of the logical operation that the table represents (for example, A XOR B). Each row of the truth table contains one possible configuration of the input variables (for instance, A=true, B=false), and the result of the operation for those values.

A truth table is a structured representation that presents all possible combinations of truth values for the input variables of a Boolean function and their corresponding output values. A function f from A to F is a special relation, a subset of A×F, which simply means that f can be listed as a list of input-output pairs. Clearly, for the Boolean functions, the output belongs to a binary set, i.e. F = {0, 1}. For an n-ary Boolean function, the inputs come from a domain that is itself a Cartesian product of binary sets corresponding to the input Boolean variables. For example for a binary function, f(A, B), the domain of f is A×B, which can be listed as: A×B = {(A = 0, B = 0), (A = 0, B = 1), (A = 1, B = 0), (A = 1, B = 1)}. Each element in the domain represents a combination of input values for the variables A and B. These combinations now can be combined with the output of the function corresponding to that combination, thus forming the set of input-output pairs as a special relation that is subset of A×F. For a relation to be a function, the special requirement is that each element of the domain of the function must be mapped to one and only one member of the codomain. Thus, the function f itself can be listed as: f = {((0, 0), f0), ((0, 1), f1), ((1, 0), f2), ((1, 1), f3)}, where f0, f1, f2, and f3 are each Boolean, 0 or 1, values as members of the codomain {0, 1}, as the outputs corresponding to the member of the domain, respectively. Rather than a list (set) given above, the truth table then presents these input-output pairs in a tabular format, in which each row corresponds to a member of the domain paired with its corresponding output value, 0 or 1. Of course, for the Boolean functions, we do not have to list all the members of the domain with their images in the codomain; we can simply list the mappings that map the member to “1”, because all the others will have to be mapped to “0” automatically (that leads us to the minterms idea).

Ludwig Wittgenstein is generally credited with inventing and popularizing the truth table in his Tractatus Logico-Philosophicus, which was completed in 1918 and published in 1921.[2] Such a system was also independently proposed in 1921 by Emil Leon Post.[3]