SOP and POS Forms

Every Boolean function can be written in two standard shapes: a sum of products (SOP) and a product of sums (POS). Both come straight from a truth table, and both are the starting point for simplification, K-maps and circuit design. This lesson shows you how to read either form off a truth table, how minterms and maxterms work, and how to simplify the result.

Learning objectives

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

  • Tell a product term from a sum term, and an SOP expression from a POS expression.
  • Write the minterm and maxterm for any row of a truth table.
  • Build the canonical SOP and canonical POS of a function from its truth table.
  • Simplify a canonical form by combining pairs of terms that differ in one variable.
  • Convert between minterm numbers and maxterm numbers.

This lesson assumes you already know the AND, OR and NOT gates and how to fill in a truth table.

The vocabulary

A literal is a variable or its complement, such as A or A'. A product term is literals joined by AND, such as A'C or AB. A sum term is literals joined by OR, such as A + C or A' + B.

  • An SOP expression is product terms joined by OR: A'C + AB.
  • A POS expression is sum terms joined by AND: (A + C)(A' + B).

Both can describe exactly the same function. SOP builds a circuit as a layer of AND gates feeding one OR gate. POS builds it as a layer of OR gates feeding one AND gate.

Minterms and maxterms

For a function of three variables A, B and C there are eight rows in the truth table, numbered 0 to 7. We read the row as a binary number with A as the most significant bit, so row 5 is A=1, B=0, C=1.

  • A minterm is the product term that equals 1 on exactly one row. Write each variable uncomplemented where the row has a 1, and complemented where it has a 0.
  • A maxterm is the sum term that equals 0 on exactly one row. Write each variable complemented where the row has a 1, and uncomplemented where it has a 0.
Row A B C Minterm Maxterm
0 0 0 0 A'B'C' (m0) A + B + C (M0)
1 0 0 1 A'B'C (m1) A + B + C' (M1)
2 0 1 0 A'BC' (m2) A + B' + C (M2)
3 0 1 1 A'BC (m3) A + B' + C' (M3)
4 1 0 0 AB'C' (m4) A' + B + C (M4)
5 1 0 1 AB'C (m5) A' + B + C' (M5)
6 1 1 0 ABC' (m6) A' + B' + C (M6)
7 1 1 1 ABC (m7) A' + B' + C' (M7)

Notice the pattern: the maxterm is the complement pattern of the minterm. That is why the rule for maxterms feels backwards at first.

The two rules

  1. Canonical SOP: OR together the minterms of every row where the function is 1.
  2. Canonical POS: AND together the maxterms of every row where the function is 0.

"Canonical" means every term contains every variable. Canonical forms are correct but usually not minimal, so the next step is to simplify them.

Every row is either a 1-row or a 0-row, so the minterm numbers and the maxterm numbers of a function always split the rows 0 to 7 between them. If you know one list, the other is whatever is left.

Worked example 1: F = A'C + AB

Start by filling in the truth table for F = A'C + AB.

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 0
1 1 0 1
1 1 1 1

F is 1 on rows 1, 3, 6 and 7, and 0 on rows 0, 2, 4 and 5.

Canonical SOP (rows where F = 1):

F = A'B'C + A'BC + ABC' + ABC

Canonical POS (rows where F = 0):

F = (A + B + C)(A + B' + C)(A' + B + C)(A' + B + C')

Simplify the SOP. A'B'C and A'BC differ only in B, so they combine to A'C. ABC' and ABC differ only in C, so they combine to AB. The result is A'C + AB, which is where we started.

Simplify the POS. (A + B + C)(A + B' + C) differ only in B, so they combine to (A + C). (A' + B + C)(A' + B + C') differ only in C, so they combine to (A' + B). The result is (A + C)(A' + B).

Both simplified answers describe the same function. You can check this by building the truth table of each one.

Worked example 2: the XOR function

Exclusive OR is 1 when exactly one input is 1.

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

With two variables the rows are numbered 0 to 3. F is 1 on rows 1 and 2, and 0 on rows 0 and 3.

  • SOP: F = A'B + AB'
  • POS: F = (A + B)(A' + B')

Neither form can be simplified further. XOR is a good example of a function where the two forms are the same size.

Worked example 3: F = A + B'C

Here the function is given as an expression, and we want its canonical forms. Expand each product term until it contains every variable.

  • A is 1 on rows 4, 5, 6 and 7, so A = AB'C' + AB'C + ABC' + ABC.
  • B'C is 1 on rows 1 and 5, so B'C = A'B'C + AB'C.

Combine them and remove the duplicate row 5. F is 1 on rows 1, 4, 5, 6 and 7, and 0 on rows 0, 2 and 3.

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

Canonical POS (rows 0, 2 and 3):

F = (A + B + C)(A + B' + C)(A + B' + C')

Simplify. (A + B + C)(A + B' + C) combine to (A + C). (A + B' + C)(A + B' + C') combine to (A + B'). Using both pairs gives the simplified POS:

F = (A + C)(A + B')

Notice that the middle maxterm, M2, was used twice. That is allowed: a term can be reused when it helps remove a variable.

Common mistakes

  • Using the wrong rows. SOP uses the rows where the function is 1. POS uses the rows where it is 0. Mixing them up gives the complement of your function.
  • Getting the maxterm signs backwards. In a maxterm, a 1 in the row becomes a complemented variable. Row 5 (101) is A' + B + C', not A + B' + C.
  • Inconsistent bit order. Decide that A is the most significant bit and keep it for every table and every term number.
  • Mixing up the operators. SOP terms are ANDs inside and OR outside. POS terms are ORs inside and AND outside. Forgetting the brackets in a POS changes the meaning.
  • Stopping at the canonical form. The canonical form is correct, but it is rarely the smallest circuit. Combine terms that differ in one variable.

You can check your own forms with the SOP and POS calculator, which converts between them, and the truth table tool to confirm two expressions give the same table.

Practice problems

Problem 1. Write the SOP and the POS for XNOR, the function that is 1 when A and B are equal.

Answer: SOP is A'B' + AB. POS is (A + B')(A' + B). XNOR is 1 on rows 0 and 3 and 0 on rows 1 and 2.

Problem 2. F(A, B, C) is the sum of minterms m(0, 2, 4, 6). Simplify F and list its maxterms.

Answer: F = C'. The maxterms are M1, M3, M5 and M7.

Problem 3. F(A, B, C) is the product of maxterms M(1, 5). Write the POS, simplify it, and list the minterms.

Answer: the POS is (A + B + C')(A' + B + C'), which simplifies to B + C'. The minterms are 0, 2, 3, 4, 6 and 7.

Problem 4. List the minterms of F = (A + B)(A' + C) and write it as a simplified SOP.

Answer: the minterms are 2, 3, 5 and 7. The simplified SOP is A'B + AC.

For problems that involve grouping terms visually, try the Karnaugh map tool, and for checking algebra step by step use the Boolean algebra calculator.

Frequently asked questions

Is SOP always simpler than POS? No. For some functions the SOP has fewer terms, and for others the POS does. Simplify both if you want the smaller circuit, then compare them.

What is the difference between canonical and minimal forms? A canonical form lists one term per row and every term contains every variable. A minimal form combines terms to remove variables, so it has fewer and smaller terms. Both describe the same function.

Which form should I use for hardware? SOP maps naturally to AND-OR logic, and with NAND gates alone it becomes NAND-NAND logic. POS maps to OR-AND logic, and with NOR gates alone it becomes NOR-NOR logic. The choice usually depends on which gates you have and which form is smaller.

Next lesson

Continue with the Quine-McCluskey method, a table-based way to simplify SOP expressions that works for any number of variables.