Open In App

Truth Table

Last Updated : 25 Jan, 2024
Improve
Improve
Like Article
Like
Save
Share
Report

A Truth Table is a table that lists all the possible combinations of inputs and their corresponding outputs. It shows how the output of logic circuits changes with different combinations of logic levels at the input. It is mostly associated with Boolean algebra or areas where Boolean logic is used. It is a branch of algebra where there are only two values possible true and false. In this article, We will discuss what is Truth Table, We will go through the Steps for Constructing a Truth Table, Then we look at Truth Tables for Different Operators, At last, we will Solve Some Examples of Truth Table With Applications, Advantages, Disadvantages, and Some FAQs.

,

Truth Table Definition

A Truth Table is a table that lists all the possible combinations of inputs and their corresponding outputs. It shows how the output of logic circuits changes with different combinations of logic levels at the input. It is mostly associated with Boolean algebra or areas where Boolean logic is used. It is a branch of algebra where there are only two values possible true and false. The variables used in these expressions can take values of true or false, true is denoted by 1 and false is denoted by 0. It is a systematic representation of all truth values of a logical expression. If the output columns only contain 0’s then the logical statement is called a contradiction and if the output column contains both 0’s and 1’s then it is called contingent. The truth table is primarily used in digital circuits where it is used to validate the output generated from the various input combinations of the logical expressions. It is also used in mathematics and other fields which use Boolean logic.

Construction of Truth Table

A truth table is a table-like structure with rows and columns. It has some elements that include Input Variables, Output Variables, and combinations of input variables. The columns represent the number of input and output variables and the rows represent the number of all possible combinations. As in truth table we generally work with binary there will be 2^n number of rows, where n is the number of input variable. Steps involving construction of truth table are:

  1. Identification of input variables and determining the number of rows.
  2. Listing all the possible combinations.
  3. Determining the output for each combination using the logical expression.

Truth Table For Different Operations

We will go through Truth Table For Different Operations Which are given Below

  • Truth Table for Unary Operations
  • Truth Table for Binary operation

Truth Table for Unary Operations

A Unary operation is a kind of operation where there is only one operand present. There are four types of unary operation:

Logical True

In this operation, whatever the input is the output will be always true. The truth table is as follows:

INPUT

OUTPUT

True

True

False

True

Logical False

In this operation, whatever the input is the output will be always False. The truth table is as follows:

INPUT

OUTPUT

True

False

False

False

Logical Identity

In this operation, whatever the input is the output will remain same. This is also known as NULL operator. The truth table is as follows:

INPUT

OUTPUT

True

True

False

False

Logical Negation

In this operation, whatever the input is the output will be opposite of the input. For True input it will return False and vice-versa. This is also known as the NOT operation. The truth table is as follows:

INPUT

OUTPUT

True

False

False

True

Truth Table for Binary operation

Binary operation is a kind of operation where two operands are involved. Using two operands and a single operator which gives a single output. Truth Table of some basic Boolean operators are given below:

AND Operator

This is one of the basic operations of Boolean algebra. It is the Boolean multiplication version of multiplication. When both the inputs are 1 then the output is 1 otherwise the output is 0. For two input AND gate there are two inputs therefore the number of combinations will be 4 (22=4). The operation between two inputs will be A.B which is read as A AND B.

A

B

C=A.B

0

0

0

0

1

0

1

0

0

1

1

1

OR Operator

Another basic operations of Boolean algebra. It is the Boolean addition version of multiplication. When atleast one the inputs is 1 then the output is 1 and if both the inputs are 0 then the output is also 0. For two input OR gate there are two inputs therefore the number of combinations will be 4 (22=4). The operation between two inputs will be A + B which is read as A OR B.

A

B

C=A+B

0

0

0

0

1

1

1

0

1

1

1

1

XOR Operator

The XOR (Exclusive or) is another binary operator. In this operator if both the operand are same then the output will be 0, otherwise it will be 1 when both the operands are different. The operation between two operands will be A⊕B which is read as A XOR B.

A

B

C = A⊕B

0

0

0

0

1

1

1

0

1

1

1

0

NOR Operator

The NOR (NOT OR) is also a binary operator. The output of this operator is 1 when both the inputs are 0. This operator gives output 1 only when neither of the of the inputs is 1, if atleast one input is 1, the output will be 0. In simple words, this operator applies NOT operation on the output of OR operation. The operation between two operands will be A ⊽ B which is read as A NOR B.

A

B

C=A ⊽ B

0

0

1

0

1

0

1

0

0

1

1

0

NAND Operator

The NAND (NOT AND) is also a binary operator which is used as universal logic gate and can be used to implement other gates. The output is 1 when at least one of the input is 0. If both the input is 1, the output will be 0. In simple words, this operator applies NOT operation on the output of AND operation. The operation between two operands will be A ⊼ B which is read as A NAND B.

A

B

C= A ⊼ B

0

0

1

0

1

1

1

0

1

1

1

0

XNOR Operator

The exclusive NOR operator gives the output as 1 when both the operands are same and output at 0 when both the operands are different.

A

B

C =A↔B

0

0

1

0

1

0

1

0

0

1

1

1

Conditional Operation(Implication)

It is one of logical operation that is used to represent the conditional statements or “if-then” statements. The output of the operation is 0 only when the first input is 1 and second is 0 and in all other cases output is 1. Its symbol is A → B.

A

B

C= A→B

0

0

1

0

1

1

1

0

0

1

1

1

Biconditional Operation

In this binary operation it represents “if and only if”. If both the inputs are either 1 or 0 then the output will be 1 and if both the inputs are different then output is 0. It is denoted by A↔ B.

A

B

C= A↔B

0

0

1

0

1

0

1

0

0

1

1

1

Solved Examples of Truth Table

There are some examples of truth table given below for better understanding :

Example 1

Draw the truth table of the given Boolean expression: A.(B+C)

The number of input combinations will be 8 (23=8).

A

B

C

B+C

A.(B+C)

0

0

0

0

0

0

0

1

1

0

0

1

0

1

0

0

1

1

1

0

1

0

0

0

0

1

0

1

1

1

1

1

0

1

1

1

1

1

1

1

Example 2

Draw the truth table of the given Boolean expression: A.¬(B+(C.D))

There are four inputs so the number of input combinations will be 24=16

A

B

C

D

C.D

B+(C.D)

¬(B+(C.D))

A.¬(B+(C.D))

0

0

0

0

0

0

1

0

0

0

0

1

0

0

1

0

0

0

1

0

0

0

1

0

0

0

1

1

1

1

0

0

0

1

0

0

0

1

0

0

0

1

0

1

0

1

0

0

0

1

1

0

0

1

0

0

0

1

1

1

1

1

0

0

1

0

0

0

0

0

1

1

1

0

0

1

0

0

1

1

1

0

1

0

0

0

1

1

1

0

1

1

1

1

0

0

1

1

0

0

0

1

0

0

1

1

0

1

0

1

0

0

1

1

1

0

0

1

0

0

1

1

1

1

1

1

0

0

Applications of Truth Table

  • The most important use of Truth table is in logic design of digital circuits. It is used for design and validation of various logical expressions and then form optimization of digital circuits.
  • Truth table is also used in computer programming, it is used to design and analyze the logical behavior of algorithms. It plays an important role in use of bitwise operators.
  • In communication system, it is used for error detection. Logical conditions are analyzed to identify and correct the codes with the help of truth table.
  • In mathematics field, truth tables are used in set theory for understanding of relationship between sets using logical operations and it is also used to simplify logical expressions in predicate logic

Advantages of Truth Table

  • Truth table provides clean representation which makes it easier to analyze.
  • It provides a systematic method for analyzing all possible combinations of truth values of a particular logical expression.
  • It is very easy to implement.
  • It helps to find the various outcomes of different logical conditions and hence helps in design.

Disadvantages of Truth Table

  • As the number of variables increase it also grows in size and becomes very big making it difficult to use.
  • It provides redundant information sometimes when the logical expression follows a pattern.
  • It is very time consuming for big logical expression as the number of variables is more and the process is manual.
  • It can’t solely be used for optimization and has to be used with some other techniques.
  • IT is highly dependent on expressions and it is difficult for converting language statements into truth tables

Conclusion

In conclusion, truth table is a table that is used to find the output of logical expressions for its various combination of input. Truth table is widely used in digital circuits along with this it is also used in other fields like computer programming and mathematics. It is used in various fields because of its easy to implement method along with systematic and clear representation making it easy to interpret. Although, while implementing large logical expressions it is avoided due to its increase size, this is the main disadvantage of using truth table. Overall, truth table is one of the most important component for design of digital circuits and in Boolean algebra.

FAQs on Truth Table

How is truth table used in digital circuit design?

Truth tables are used for interpretation of output of different input combinations of logic gates. Based on the output it is used for design and optimization of digital circuits.

How truth tables are used for error detection in communication systems?

In communication system, truth table is used for error detection. Logical conditions are analyzed to identify and correct the codes with the help of truth table. It is achieved through error detection and correction algorithms.

How many number of input combinations are there for a 3 input AND gate?

In 3 input AND gate there are three input variables. By the rule of 2 n , where n is the number of input variable. Therefore, 2 3 =8 so there will be 8 combination of input.



Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads