Truth table (logic)
Truth table (logic)
A truth table is a tabular display used to analyze logical arguments and determine the validity of an argument. A truth table has one column for each statement, a sentence that is either true or false. The truth table is then used to determine whether a compound statement about the statements is true or false.
![Three-valued logic (3VL) truth table. By SqlPac [Public domain], via Wikimedia Commons 87998541-107353.jpg](https://imageserver.ebscohost.com/img/embimages/ers/sp/embedded/87998541-107353.jpg?ephost1=dGJyMNHX8kSepq84xNvgOLCmsE2epq5Srqa4SK6WxWXS)
![Multigrade operator NXNOR. Negated biconditionals of the arguments in the parentheses to the left of the matrix Red squares stand for binary ones, respectively for true. 120 of 256 squares are red. By Watchduck (Tilman Piesk) [Public domain], via Wikimedia Commons 87998541-107354.jpg](https://imageserver.ebscohost.com/img/embimages/ers/sp/embedded/87998541-107354.jpg?ephost1=dGJyMNHX8kSepq84xNvgOLCmsE2epq5Srqa4SK6WxWXS)
Each statement is represented by a variable. The value of each variable can have only one of two values: true or false.
Boolean Algebra
George Boole was an English mathematician who studied logic. Boole showed that it is possible to represent logical thought processes using binary variables: true and false, or 1 and 0. Gottfried W. Leibniz created the basic rules of binary arithmetic. However, it was not until Boole's work that the genuine theory for this type of algebra was born.
Boolean algebra involves operations performed on binary variables, which can have only two values. Truth tables are used to find the output value of Boolean functions, functions in which the inputs and the output all have one of two values: true or false.
Boolean operators are words, such as NOT. The operators AND, OR, and NOT are the three basic operators in Boolean algebra. They are the building blocks that define all other Boolean operations.
Creating a Truth Table
A truth table has one column for each statement. Each statement is assigned a variable and that variable appears at the top of the column for that statement. Below each statement are all of the possible values for the statement.
A statement is a sentence that is either true or false. For example, a truth table can be created for the statement "The light switch is up." The variable A is assigned to the statement. Every variable in Boolean algebra has two possible values: true or false. Here is the truth table for this statement.
Next, a Boolean operator is used to perform an operation on the values in the first column. A second column will be added to the table to show the result of the operation. An example of a simple Boolean operator is NOT.
NOT
NOT is a unary operator, an operator that performs an operation on one variable. The operator NOT returns the opposite value for a variable. To indicate the operation NOT, a bar is put over the variable. For example, NOT A is written Ā.
The truth table below shows the result of the function NOT A.
The first column is the input for the Boolean function, and the second column is the output. The second row shows that if A is true, then NOT A is the opposite value of true: false. This is a very simple example, but NOT is a fundamental building block of Boolean algebra.
AND
AND is a binary operator, an operator that works with two variables. The value of the function A AND B is true if statements A and B are both true. The symbol for AND is ⋂. If A and B are both true, the value of A ⋂ B is true. If A and B are not both true, the value of A ⋂ B is false.
A truth table for two statements has a column for each statement. For example, statement A is "The light switch is up," and statement B is "The circuit breaker is on." A column for each statement is created. Then, every possible combination of inputs is listed. Statement A can be true, while statement B can be either true or false. Also, statement A can be false, while statement B can be either true or false. There are four possible combinations.
The third column in the table is associated with the Boolean operation being performed. In this case, the operation is AND. The truth table below shows the output for the function A ⋂ B. The value of A ⋂ B is only true if A and B are both true.
The value of A ⋂ B is only true in one of the four situations. The two statements were "The light switch is up." and "The circuit breaker is on." When the value of A ⋂ B is true, the light turns on, because only when the light switch is up and the circuit breaker is on will the light turn on. When the value of A ⋂ B is false, the light does not turn on.
OR
OR is also a binary operator. The value of the function A OR B is true if statement A is true, or statement B is true, or both statements are true. The symbol for OR is ⋃.
For the OR function, statement A is "The light is turned on." and statement B is "It is daytime." The truth table below shows the output for the function A ⋃ B. The value of A ⋃ B is true if A is true, or B is true, or both are true.
The value of A ⋃ B is true in three of the four situations. The two statements were "The light is turned on." and "It is daytime." When the value of A ⋃ B is true, it is light in the room; it is light in the room if either the light is turned on or if it is daytime. When the value of A ⋃ B is false, it is not light in the room. Only when the light is off and it is nighttime that it is not light in the room.
Bibliography
Christopher Thomas. “Boolean Algebra.” AccessScience, 2022, doi.org/10.1036/1097-8542.090600. Accessed 1 Dec. 2024.
De Meur, Gisèle. "Boolean Algebra." International Encyclopedia of Political Science, edited by Bertrand Badie, et al., vol. 1, SAGE Reference, 2011, pp. 155–58.
Duşa, Adrian. Comparative Analysis Using Boolean Algebra. SAGE Publications Ltd., 2020.
Naris, Brigham, editor. World of Mathematics. Gale, 2001.
"Truth Table Generator." Stanford University, web.stanford.edu/class/cs103/tools/truth-table-tool. Accessed 1 Dec. 2024.
"Truth Tables, Tautologies, and Logical Equivalences." Millersville University, 2019, sites.millersville.edu/bikenaga/math-proof/truth-tables/truth-tables.html. Accessed 1 Dec. 2024.