Resources | Subject Notes | Computer Science
Complete a truth table from a problem statement, logic expression or logic circuit.
Boolean logic deals with logical operations that form the basis of digital circuits and computer programming. The fundamental Boolean values are TRUE (often represented as 1) and FALSE (often represented as 0). We use logical operators to combine and manipulate these values.
A truth table systematically shows all possible combinations of input values and their corresponding output values for a given logical expression.
To construct a truth table:
Consider the expression: $A \land B$
Here, A and B are the inputs.
The truth table is:
A | B | $A \land B$ |
---|---|---|
FALSE | FALSE | FALSE |
FALSE | TRUE | FALSE |
TRUE | FALSE | FALSE |
TRUE | TRUE | TRUE |
Consider the expression: $A \lor B$
Here, A and B are the inputs.
The truth table is:
A | B | $A \lor B$ |
---|---|---|
FALSE | FALSE | FALSE |
FALSE | TRUE | TRUE |
TRUE | FALSE | TRUE |
TRUE | TRUE | TRUE |
Consider the expression: $\overline{A}$
Here, A is the input.
The truth table is:
A | $\overline{A}$ |
---|---|
FALSE | TRUE |
TRUE | FALSE |
Consider the expression: $(A \land B) \lor \overline{C}$
Here, A, B, and C are the inputs.
The truth table is:
A | B | C | $A \land B$ | $\overline{C}$ | $(A \land B) \lor \overline{C}$ |
---|---|---|---|---|---|
FALSE | FALSE | FALSE | FALSE | TRUE | TRUE |
FALSE | FALSE | TRUE | FALSE | FALSE | FALSE |
FALSE | TRUE | FALSE | FALSE | TRUE | TRUE |
FALSE | TRUE | TRUE | FALSE | FALSE | FALSE |
TRUE | FALSE | FALSE | FALSE | TRUE | TRUE |
TRUE | FALSE | TRUE | FALSE | FALSE | FALSE |
TRUE | TRUE | FALSE | TRUE | TRUE | TRUE |
TRUE | TRUE | TRUE | TRUE | FALSE | TRUE |
Try constructing truth tables for the following expressions: