Truth Table is used to perform logical operations in Maths. These operations comprise boolean algebra or boolean functions. It is basically used to check whether the propositional expression is true or false, as per the input values. It consists of columns for one or more input values, say, P and Q and one assigned column for the output results. The output which we get here is the result of the unary or binary operation performed on the given input values. Some of the examples of binary operations are AND, OR, NOR, XOR, XNOR, etc. We will learn all the operations here with their respective truth-table.
Also, read:
Truth Table For Unary Operation
Unary consist of a single input, which is either True or False. For these inputs, there are four unary operations, which we are going to perform here. They are:
- Logical True (Only True)
- Logical False (Only False)
- Logical Identity
- Logical Negotiation
Logical True
In this operation, the output is always true, despite any input value. Suppose P denotes the input values and Q denotes the output, then we can write the table as;
P |
Qâ†’T |
T |
T |
F |
T |
Where T=True and F=False
Logical False
Unlike the logical true, the output values for logical false are always false. It is also said to be unary falsum. Let us create a truth table for this operation.
P |
Qâ†’F |
T |
F |
F |
F |
Where T=True and F=False
Logical Identity
In this operation, the output value remains the same or equal to the input value. Let us find out with the help of the table.
P |
Qâ†’P |
T |
T |
F |
F |
So, here you can see that even after the operation is performed on the input value, its value remains unchanged.
Logical Negation
When we perform the logical negotiation operation on a single logical value or propositional value, we get the opposite value of the input value, as an output. Let us see the truth-table for this:
P |
Qâ†’~P |
T |
F |
F |
T |
The symbol â€˜~â€™ denotes the negation of the value.
Truth Table for Binary Operations
The binary operation consists of two variables for input values. Here also, the output result will be based on the operation performed on the input or proposition values and it can be either True or False value. The major binary operations are;
- AND
- OR
- NAND
- NOR
- XOR
- Conditional or â€˜If-Thenâ€™
- Biconditional
Let us draw a consolidated truth table for all the binary operations, taking the input values as P and Q.
P |
Q |
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 |
T |
F |
F |
F |
F |
F |
T |
T |
F |
T |
T |
Where T stands for True and F stands for False.
Now let us discuss each binary operation here one by one;
AND & NAND Operation
From the table, you can see, for AND operation, the output is True only if both the input values are true, else the output will be false. The AND operator is denoted by the symbol (âˆ§).
Whereas the negation of AND operation gives the output result for NAND and is indicated as (~âˆ§).
OR and NOR Operation
OR statement states that if any of the two input values are True, the output result is TRUE always. It is represented by the symbol (âˆ¨).
But the NOR operation gives the output, opposite to OR operation. It means the statement which is True for OR, is False for NOR. And it is expressed as (~âˆ¨).
XOR Operation
This operation states, the input values should be exactly True or exactly False. The symbol for XOR is (âŠ»).
Conditional and Biconditional Operation
Conditional or also known as â€˜if-thenâ€™ operator, gives results as True for all the input values except when True implies False case. It is denoted by â€˜â‡’â€™. This operation is logically equivalent to ~P âˆ¨ Q operation. Let us prove here;
P |
Q |
~P |
~P âˆ¨ Q |
T |
T |
F |
T |
T |
F |
F |
F |
F |
T |
T |
T |
F |
F |
T |
T |
You can match the values of Pâ‡’Q and ~P âˆ¨ Q. Both are equal.
Biconditional is also known as Logical equality. If both the values of P and Q are either True or False, then it generates a True output or else the result will be false.
Example
Write the truth table for the following given statement:(P âˆ¨ Q)âˆ§(~Pâ‡’Q).
Solution: Given, (P âˆ¨ Q)âˆ§(~Pâ‡’Q)
Now let us create the table taking P and Q as two inputs,
P |
Q |
P âˆ¨ Q |
~P |
~Pâ‡’Q |
(P âˆ¨ Q)âˆ§(~Pâ‡’Q) |
T |
T |
T |
F |
T |
T |
T |
F |
T |
F |
T |
T |
F |
T |
T |
T |
T |
T |
F |
F |
F |
T |
F |
F |