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. This is based on boolean algebra. It consists of columns for one or more input values, says, 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 examples of binary operations are AND, OR, NOR, XOR, XNOR, etc. We will learn all the operations here with their respective truth-table.
Table of Contents:
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 |
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 |
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’
- Bi-conditional
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
(⇒) |
Bi-conditional
(⇔) |
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 Bi-conditional 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.
Bi-conditional 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.
Also, read:
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 |
Related Links
Compound statements in Mathematics | Conditional Statements |
Boolean Algebra Laws | Basics of Algebra |