Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 4

Truth Table to SOP Boolean Expressions

Recommended resources

Hello! Welcome to the fourth lesson in our digital design series.

In our last lesson, you learned how to take an existing Boolean expression and simplify it using algebraic laws. This is a crucial skill for optimizing circuits. But it begs the question: where do these expressions originate?

This lesson answers that question. We will focus on the fundamental process of translating a desired circuit behavior, defined by a truth table, into a mathematical expression. This is the bridge between a high-level specification and a concrete logical formula.

Our learning outcome for this 60-minute lesson is to derive a Boolean expression from a truth table using the sum-of-products form.

By the end of this lesson, you will be able to:

  • Understand what a Sum-of-Products (SOP) expression is.
  • Follow a systematic method to convert any truth table into its canonical SOP expression.
  • Recognize the "minterm" shorthand notation for SOP expressions.
  • Connect this process to the simplification techniques you learned in the previous lesson.

1. From Specification to Expression

In digital design, we almost always start with a specification—a clear description of what we want our circuit to do. The most fundamental way to represent this specification for a combinational circuit is with a truth table. A truth table exhaustively lists every possible input combination and the corresponding desired output.

Once we have a truth table, we need a standard way to turn it into a Boolean expression. The Sum-of-Products (SOP) form is one of the most common and important methods to do this.

As the name implies, an SOP expression is formed by ORing together (the "Sum") one or more terms that are themselves formed by ANDing variables together (the "Products").

For example, is an SOP expression. It's a sum of two product terms.

Let's watch a short video that introduces this concept and illustrates the basic idea of how to generate an SOP expression from a truth table.

Sum of Products (Part 1) | SOP Form

The video 'Sum of Products (Part 1) | SOP Form' by Neso Academy provides an excellent introduction. It will show you the core principle: we only care about the rows in the truth table where the output is '1'.

Watch from the beginning to 4:20. Focus on: The definition of Sum-of-Products. The key rule: you write the SOP form for the rows where the function's output is HIGH (1). The convention for writing each product term: if an input variable is 0, it's complemented (e.g., A becomes Ā), and if it's 1, it's left as is (e.g., B remains B).


2. The Step-by-Step Method for Deriving SOP

The video gave you the general idea. Now, let's formalize it into a clear, repeatable process. This method allows you to convert any truth table into its corresponding Boolean expression.

Logic Synthesis | 50.002 CS - natalieagus.github.io

The article 'Logic Synthesis' from a computer science course at SUTD provides a very concise, three-step summary of this process. Let's read through it.

Read the section titled 'Sum of Products'. It clearly lists the three steps and provides a simple example using the truth table for a NAND gate.

To summarize and reinforce the method from the reading:

  1. Identify the '1's: Scan the output column of your truth table and find every row where the output is 1. Ignore all rows where the output is 0.
  2. Write the Product Terms: For each row you identified, create a product (AND) term. In this term, if an input variable is 0, write it in its complemented form (e.g., ). If an input variable is 1, write it in its normal form (e.g., ). Each product term must include all input variables.
  3. Sum the Terms: Combine all the product terms you created using the OR (+) operator. The resulting expression is the canonical Sum-of-Products expression for that truth table.

Let's look at a visual example that puts this all together.

Truth Table of Sum-of-Product Expression
This image illustrates the SOP derivation process. For a 3-input (A, B, C) truth table, it highlights the three rows where the output Q is 1. For each highlighted row, it shows the corresponding product term: row 010 gives \(\bar{A}B\bar{C}\), row 101 gives \(A\bar{B}C\), and row 110 gives \(AB\bar{C}\). The final SOP expression would be the sum of these three terms.

The expression derived directly from this image would be:

This form, where every product term includes every input variable, is called the canonical SOP form.


3. Minterms: A Convenient Shorthand

Writing out long product terms can be cumbersome. In digital logic, we often use a shorthand called minterms. A minterm is simply a product term that corresponds to a specific row in the truth table. Each row is numbered based on the decimal equivalent of its binary input.

  • Row 0 (inputs 000) corresponds to minterm .
  • Row 1 (inputs 001) corresponds to minterm .
  • ...
  • Row 7 (inputs 111) corresponds to minterm .

Using this notation, an SOP expression can be written as a summation of minterms. For the example in the image Truth Table to SOP, the inputs for the '1' outputs are 010 (2), 101 (5), and 110 (6). So, we could write the function as:

This is a compact and standard way to represent a logic function.

Let's return to the Neso Academy video to see this notation explained.

Sum of Products (Part 1) | SOP Form

We'll now watch the second half of the 'Sum of Products' video, which introduces the concepts of canonical form and minterm notation.

Watch from 4:20 to the end (8:07). Focus on how the truth table rows are numbered and how this numbering is used to create the minterm list and the final shorthand expression.


4. Practice and Simplification

Now let's put it all together. You'll derive an SOP expression and then, using what you learned in the last lesson, you'll simplify it.

Exercise:
Consider the following truth table for a 3-input function, .

A B C F
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 1
1 1 0 0
1 1 1 1

Part 1: Write the canonical Sum-of-Products expression for .
Part 2: Write the function using minterm notation.
Part 3: Simplify the canonical SOP expression using Boolean algebra.

Click for solution

Part 1: Canonical SOP Expression
First, we identify the rows where :

  • A=0, B=0, C=1 → Product term is
  • A=0, B=1, C=1 → Product term is
  • A=1, B=0, C=1 → Product term is
  • A=1, B=1, C=1 → Product term is

Now, we sum them:

Part 2: Minterm Notation
The rows with '1' outputs are 001 (1), 011 (3), 101 (5), and 111 (7).

Part 3: Simplification
Let's simplify the canonical expression:

First, group the first two terms and the last two terms.

Use the Distributive law to factor out common variables.

Apply the Complement law ().

Apply the Identity law ().

Factor out again.

Apply the Complement law again.

And finally, the Identity law.

The entire complex function simplifies down to just ! This shows the complete workflow: from a truth table specification to a canonical expression, and finally to a minimal, optimized expression ready for implementation.

Conclusion

Today, you've learned one of the most essential skills in digital logic: how to translate a functional specification (a truth table) into a Boolean expression using the Sum-of-Products method.

Here are the key takeaways from our lesson:

  • A truth table defines what a combinational circuit should do.
  • The Sum-of-Products (SOP) method provides a systematic way to derive a Boolean expression from a truth table by focusing on the rows where the output is '1'.
  • For an input of '0', the variable is complemented; for an input of '1', it is not. The resulting expression is called the canonical SOP.
  • Minterm notation (e.g., ) is a standard shorthand for SOP expressions.
  • The canonical SOP expression is the starting point for optimization. You can then apply the Boolean simplification laws you learned previously to create a more efficient circuit.

In the next lesson, we will begin to explore the physical building blocks that correspond to these logical operations. You will learn to identify and describe the behavior of basic logic gates (AND, OR, NOT, etc.), the components you would use to build the circuits we've been describing with math.