Module 1: Foundations of Digital Logic · 1.2 Boolean Algebra

Canonical Forms: Sum of Products and Product of Sums

Any Boolean truth table can be converted systematically into an algebraic expression. This article describes the two canonical forms: Sum of Products (SOP) and Product of Sums (POS).

Synthesis tools and minimization algorithms use canonical forms as standard initial representations before performing logic optimization.

Minterms

A minterm of $n$ variables is a product (AND) term that contains all $n$ variables exactly once in either true or complemented form.

An $n$-variable function produces $2^n$ unique minterms. Each minterm evaluates to 1 for exactly one row in the truth table and evaluates to 0 for all other rows.

Minterm construction rules:

  • If a variable has value 1 in a row, use the uncomplemented variable.
  • If a variable has value 0 in a row, use the complemented variable ($A’$).
  • The lowercase identifier $m_i$ designates the minterm, where subscript $i$ represents the decimal row index.

Minterms for two variables ($n = 2$):

Row Index Input $A$ Input $B$ Minterm Expression Symbol
0 0 0 $A’B'$ $m_0$
1 0 1 $A’B$ $m_1$
2 1 0 $AB'$ $m_2$
3 1 1 $AB$ $m_3$

Minterms for three variables ($n = 3$):

Row Index $A$ $B$ $C$ Minterm Expression Symbol
0 0 0 0 $A’B’C'$ $m_0$
1 0 0 1 $A’B’C$ $m_1$
2 0 1 0 $A’BC'$ $m_2$
3 0 1 1 $A’BC$ $m_3$
4 1 0 0 $AB’C'$ $m_4$
5 1 0 1 $AB’C$ $m_5$
6 1 1 0 $ABC'$ $m_6$
7 1 1 1 $ABC$ $m_7$

Canonical Sum of Products (SOP)

To construct the canonical SOP expression, OR together the minterms of all truth table rows where the output equals 1. This set of rows constitutes the on-set.

Notation $\sum m(i, j, \ldots)$ specifies the list of active row indices.

Example: Consider the following truth table:

Row Index $A$ $B$ $C$ Output $F$
0 0 0 0 0
1 0 0 1 1
2 0 1 0 0
3 0 1 1 1
4 1 0 0 0
5 1 0 1 1
6 1 1 0 0
7 1 1 1 1

The output equals 1 in rows 1, 3, 5, and 7.

$$F = \sum m(1, 3, 5, 7) = A’B’C + A’BC + AB’C + ABC$$

Maxterms

A maxterm of $n$ variables is a sum (OR) term that contains all $n$ variables exactly once in either true or complemented form. Each maxterm evaluates to 0 for exactly one row in the truth table and evaluates to 1 for all other rows.

Maxterm construction rules:

  • If a variable has value 0 in a row, use the uncomplemented variable.
  • If a variable has value 1 in a row, use the complemented variable ($A’$).
  • The uppercase identifier $M_i$ designates the maxterm, where subscript $i$ represents the decimal row index.

Maxterms for three variables ($n = 3$):

Row Index $A$ $B$ $C$ Maxterm Expression Symbol
0 0 0 0 $A+B+C$ $M_0$
1 0 0 1 $A+B+C'$ $M_1$
2 0 1 0 $A+B’+C$ $M_2$
3 0 1 1 $A+B’+C'$ $M_3$
4 1 0 0 $A’+B+C$ $M_4$
5 1 0 1 $A’+B+C'$ $M_5$
6 1 1 0 $A’+B’+C$ $M_6$
7 1 1 1 $A’+B’+C'$ $M_7$

Canonical Product of Sums (POS)

To construct the canonical POS expression, AND together the maxterms of all truth table rows where the output equals 0. This set of rows constitutes the off-set.

Notation $\prod M(i, j, \ldots)$ specifies the list of inactive row indices.

For the truth table in the previous section, the output equals 0 in rows 0, 2, 4, and 6:

$$F = \prod M(0, 2, 4, 6) = (A+B+C)(A+B’+C)(A’+B+C)(A’+B’+C)$$

Duality and Conversion Between Canonical Forms

Minterms and maxterms are complementary:

$$M_i = m_i’$$

For example, $m_3 = A’BC$. Applying De Morgan’s law:

$$(A’BC)’ = A + B’ + C’ = M_3$$

The on-set minterm indices and off-set maxterm indices form complementary sets. For a three-variable function, the complete index set is ${0, 1, 2, 3, 4, 5, 6, 7}$.

If $F = \sum m(1, 3, 5, 7)$, the complementary maxterm representation is:

$$F = \prod M(0, 2, 4, 6)$$

The complement function $F’$ swaps the index sets:

$$F’ = \sum m(0, 2, 4, 6) = \prod M(1, 3, 5, 7)$$

Designers select SOP or POS based on gate count:

  • If the on-set has fewer terms than the off-set, SOP requires fewer gates.
  • If the off-set has fewer terms than the on-set, POS requires fewer gates.

Application in Logic Synthesis

Canonical forms serve essential functions in EDA tools:

  1. Logic Minimization: Minimization algorithms (such as Espresso and Quine-McCluskey) use the list of minterm indices as input.
  2. Equivalence Checking: Two logic circuits implement the identical function if and only if their canonical minterm sets are identical. Formal verification tools use this property to verify synthesized netlists against RTL specifications.
  3. Formal Specification: Minterm and maxterm lists provide unambiguous functional definitions.

Worked Example: 3-Bit Odd Parity Function

Design a circuit that outputs logic 1 when an input 3-bit vector contains an odd number of 1s:

Row Index $A$ $B$ $C$ Number of 1s Output $F$
0 0 0 0 0 0
1 0 0 1 1 1
2 0 1 0 1 1
3 0 1 1 2 0
4 1 0 0 1 1
5 1 0 1 2 0
6 1 1 0 2 0
7 1 1 1 3 1

The on-set is ${1, 2, 4, 7}$. The off-set is ${0, 3, 5, 6}$.

Canonical SOP form:

$$F = \sum m(1, 2, 4, 7) = A’B’C + A’BC’ + AB’C’ + ABC$$

Canonical POS form:

$$F = \prod M(0, 3, 5, 6) = (A+B+C)(A+B’+C’)(A’+B+C’)(A’+B’+C)$$

This function implements a 3-input exclusive-OR operation ($A \oplus B \oplus C$).

Practice Exercises

Exercise 1: Express $F(A,B,C) = \sum m(0, 3, 6, 7)$ as a full SOP equation and determine its canonical POS representation.

View Solution

Canonical SOP:

$$F = A’B’C’ + A’BC + ABC’ + ABC$$

The complementary index set is ${1, 2, 4, 5}$:

$$F = \prod M(1, 2, 4, 5) = (A+B+C’)(A+B’+C)(A’+B+C)(A’+B+C’)$$

Exercise 2: A function has maxterm representation $G(A,B,C) = \prod M(1, 4, 5, 7)$. Determine its canonical SOP expression.

View Solution

The complement of ${1, 4, 5, 7}$ within universal set ${0, 1, 2, 3, 4, 5, 6, 7}$ is ${0, 2, 3, 6}$:

$$G = \sum m(0, 2, 3, 6) = A’B’C’ + A’BC’ + A’BC + ABC’$$

Exercise 3: Calculate the total number of distinct Boolean functions that can be formed using three input variables.

View Solution

A 3-variable truth table contains $2^3 = 8$ rows. Each row can produce output 0 or 1 independently. Therefore, the total number of distinct Boolean functions is:

$$2^{(2^3)} = 2^8 = 256$$

← De Morgan's Laws and Bubble Pushing Algebraic Simplification →