A truth table is a mathematical table that helps us analyse statements or arguments to determine whether they are logical or true. It displays the logical operations or input signals in the form of a table. These operations can be boolean operations or boolean functions. The truth table identifies all the possible combinations of input and output. It has a row for every combination or prescribes the value of the function, either 0 or 1. The output we will get will be based on the input. Examples of binary operations are NOR and OR operations, NAND and AND operations, and conditional and biconditional truth tables.
A truth table for binary operations:
These include two variables that we must put as an input value. The output will be dependent on the input values that can be either true or false. Some of the major binary operations are
NOR and OR operation
NAND and AND operation
Conditional and Biconditional
XOR.
The input value will be mentioned as X and Y, here, T is for true, whereas F stands for false.
X | Y | AND | OR | NAND | NOR | XOR | CONDITIONAL | BICONDITIONAL |
T | T | T | T | F | F | F | T | T |
T | F | F | T | T | F | T | F | F |
F | T | F | T | T | F | T | F | F |
F | F | F | F | T | T | F | T | T |
NOR and OR operation:
NOR and OR operations are opposite of each other. However, For OR operations, if any of the two input values are true. The output will always be true; if one of the inputs is true, the output is considered true. The output will always be false if one of the inputs is false.
NOR operations, it is completely contradictory to OR operations. This operation will be the opposite of that of the OR operation. If the output is true for OR, it will be False for NOR.
NAND and AND operation:
For AND operations, the output will only be true if both the input values are true else false.
For NAND operations, the output is the opposite of AND. This means if the output of AND is true, the output for NAND will be false.
XOR operation:
The output of XOR operations is only true if one of the inputs is true. The output is false if both the input values are true or false.
Conditional operation:
A conditional operation is a logical statement; in this, a statement p is called antecedent will imply a statement q, which is called the consequent.
A conditional operational statement is written as p → q, translated to if p then q.
p | q | p → q |
T | T | T |
T | F | F |
F | T | T |
F | F | T |
II ROW: For the second row, if we say p implies q, and p is true, but q is false, then the statement p implies q will naturally be false as q did not follow up with p.
III ROW: If we say it’s sunny, I will wear my sunglasses’ this implies If p is false, then q is true meaning even if it is not sunny I wore my sunglasses. This is not validating the current Statement as they might just be like sunglasses, so if p is false, but q is true, it is reasonable to say that p implies q meaning true. So the output is q.
IV ROW: If we follow up with the same example of sunglasses if it is not sunny and the person is not wearing sunglasses. But this will not validate the statement mentioned above that ‘it is sunny, I will wear my sunglasses. So if p is false, but q is true, it will simply mean that the output will be true.
Biconditional Operation:
These work on if and only if statements which are generally called as iff. This simply means p and q are interchangeable statements. If one is true, you will automatically know the other one is true. If one is false, the other must also be false.
P | Q | P⇔Q |
T | T | T |
T | F | F |
F | T | F |
F | F | T |
It can be seen that if the two statements have the same truth value, the biconditional is true, and even if one of the input values is contradictory, the output will be false.
Conclusion:
A truth table is a mathematical table used to determine truth values for logical propositions. The truth table consists of rows and columns. It has inputs and outputs, and the output value depends on the input proposition variables. Each row contains possible consideration of truth values. Each statement of the truth table is represented as different variables, and they have their list of possible truth values. When executed on the input values, the output we will observe will result from unary or binary operations. Examples of binary operations are NOR and OR operation, NAND and AND operation, XOR operation, and Conditional and biconditional truth tables.