Create and complete truth tables from logic expressions or circuits

Boolean Logic & Truth Tables 📊

Boolean logic is the backbone of digital circuits and computer programs. It uses only two values: True (1) and False (0). In this lesson we’ll learn how to write logic expressions, create truth tables, and translate circuits into tables.

What is Boolean Logic?

Think of Boolean logic like a recipe that only uses two ingredients: True and False. The “cooking” rules are the logical operators:

  • AND ($\land$): both ingredients must be True.
  • OR ($\lor$): at least one ingredient is True.
  • NOT ($\lnot$): flips the truth value.

Basic Boolean Operations

Let’s see how each operator works with a simple truth table.

A B A ∧ B A ∨ B ¬A
0 0 0 0 1
0 1 0 1 1
1 0 0 1 0
1 1 1 1 0

Creating Truth Tables from Expressions

Follow these steps to build a truth table for any Boolean expression:

  1. List all input variables (e.g., A, B, C).
  2. Determine the number of rows: 2n where n is the number of variables.
  3. Fill in all possible combinations of 0 and 1.
  4. Evaluate the expression for each row and write the result.

Example: For the expression (A ∧ B) ∨ ¬C, the truth table would look like this:

A B C (A ∧ B) ∨ ¬C
0 0 0 1
0 0 1 0
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 0

From Circuits to Truth Tables

Logic gates are the physical representation of Boolean operators:

  • AND gate – output is 1 only if all inputs are 1.
  • OR gate – output is 1 if at least one input is 1.
  • NOT gate – flips the input.

To convert a circuit into a truth table, simply:

  1. Identify all input wires.
  2. Write the gate logic for each intermediate node.
  3. Use the same truth‑table method as above.

Example: A 3‑input NAND gate (¬(A ∧ B ∧ C)) has the following table:

A B C NAND
0001
0011
0101
0110
1001
1010
1101
1110

Practice Problems 🚀

Fill in the missing columns for each expression. Use the same colour scheme as the examples.

  1. Expression: A ∨ (B ∧ C)
  2. Expression: ¬(A ∨ B) ∧ C
  3. Expression: (A ∧ ¬B) ∨ (¬A ∧ B) (XOR)

Exam Tips 📌

Know the symbols: for AND, for OR, ¬ for NOT.

Always write all input combinations: 2n rows for n variables.

Revision

Log in to practice.

0 views 0 suggestions