Complete a truth table from a problem statement, logic expression or logic circuit

Resources | Subject Notes | Computer Science

Boolean Logic - Truth Tables

Objective

Complete a truth table from a problem statement, logic expression or logic circuit.

Understanding Boolean Logic

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.

Basic Logical Operators

  • AND (≈): The output is TRUE only if both inputs are TRUE.
  • OR (≨): The output is TRUE if at least one of the inputs is TRUE.
  • NOT ( ): The output is the opposite of the input (if the input is TRUE, the output is FALSE, and vice versa).

Constructing Truth Tables

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:

  1. Identify the number of inputs.
  2. List all possible input combinations (each input can be either TRUE or FALSE).
  3. For each input combination, evaluate the logical expression and determine the output.

Example 1: Simple AND Expression

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

Example 2: Simple OR Expression

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

Example 3: NOT Expression

Consider the expression: $\overline{A}$

Here, A is the input.

The truth table is:

A $\overline{A}$
FALSE TRUE
TRUE FALSE

Example 4: Combining Operators

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

Practice

Try constructing truth tables for the following expressions:

  • $A \lor \overline{B}$
  • $\overline{A} \land B$
  • $(A \land \overline{B}) \lor \overline{C}$

Suggested diagram:

Suggested diagram: A simple logic gate showing an AND gate with two inputs A and B, and an output.