G27
Self-checkedTier 1 12 min readdl.boolean-functions-forms

SOP, POS, minterms and maxterms

The standard ways to write a Boolean function: minterms and maxterms with their numbering, canonical sum of minterms and product of maxterms, converting between them, complements, don't cares and counting.

Why it exists

A truth table says what a function is; a circuit needs an expression. There are many expressions for one function, so engineers fix two standard shapes: sum of products (an OR of AND terms, a two-level AND-OR circuit) and product of sums (an AND of OR terms, a two-level OR-AND circuit). Every function has a unique canonical form in each shape, built directly from its truth table, and every minimisation method (K-map, tabular) starts from it. GATE questions in this area ask you to list the minterms, convert between the two canonical forms, count minterms, or identify the complement.

Prerequisites

You need the laws from Boolean algebra, especially x+x′=1x + x' = 1 and De Morgan.

Precise definitions

Literal. A variable or its complement (AA or A′A').

Product term (AND term). A literal or an AND of literals. Sum term (OR term). A literal or an OR of literals.

Sum of products (SOP). An OR of product terms, for example AB′+CAB' + C. Product of sums (POS). An AND of sum terms, for example (A+B′)(C+D)(A + B')(C + D). A form with at most two levels of gates (not counting inverters) is a standard form.

Minterm. For nn variables, a product term that contains every variable exactly once, so that it is 1 on exactly one row of the truth table. The row with binary index ii (the first variable is the most significant bit) has the minterm mim_i: a variable appears uncomplemented where the bit of ii is 1 and complemented where it is 0. For three variables A,B,CA, B, C:

iiABCABCminterm mim_imaxterm MiM_i
0000A′B′C′A'B'C'A+B+CA + B + C
1001A′B′CA'B'CA+B+C′A + B + C'
2010A′BC′A'BC'A+B′+CA + B' + C
3011A′BCA'BCA+B′+C′A + B' + C'
4100AB′C′AB'C'A′+B+CA' + B + C
5101AB′CAB'CA′+B+C′A' + B + C'
6110ABC′ABC'A′+B′+CA' + B' + C
7111ABCABCA′+B′+C′A' + B' + C'

Maxterm. A sum term that contains every variable exactly once, so that it is 0 on exactly one row. The maxterm MiM_i has a variable uncomplemented where the bit of ii is 0 and complemented where it is 1 (the opposite of the minterm). The two are complements: Mi=(mi)′M_i = (m_i)' and mi=(Mi)′m_i = (M_i)'.

Useful facts about minterms. Two different minterms multiply to 0 (mimj=0m_i m_j = 0 for i≠ji \ne j). All 2n2^n minterms add up to 1. A minterm with nn variables has nn literals.

Canonical sum of products (sum of minterms). The function equals the OR of the minterms of the rows where it is 1:

F=∑m(i1,i2,… ).F = \sum m(i_1, i_2, \dots) .

Canonical product of sums (product of maxterms). The function equals the AND of the maxterms of the rows where it is 0:

F=∏M(j1,j2,… ).F = \prod M(j_1, j_2, \dots) .

Conversion. If F=∑m(S)F = \sum m(S) over nn variables, then F=∏M(T)F = \prod M(T) where TT is the set of all indices not in SS. Also F′=∑m(T)F' = \sum m(T) and F′=∏M(S)F' = \prod M(S). The two canonical forms of one function list complementary sets of indices. A function with kk ones has kk minterms in its canonical SOP and 2n−k2^n - k maxterms in its canonical POS.

Obtaining a canonical SOP from any SOP. Multiply each product term that lacks a variable xx by (x+x′)(x + x') and expand; remove duplicates. For a canonical POS from a POS, add xx′x x' to each sum term lacking xx and use the distributive law x+yz=(x+y)(x+z)x + yz = (x+y)(x+z).

Don't cares. An input combination that cannot occur, or whose output is not needed, is a don't care, written d(… )d(\dots) or X. A function is then given as F=∑m(… )+∑d(… )F = \sum m(\dots) + \sum d(\dots). The designer may treat each don't care as 0 or 1, whichever gives a simpler circuit (see Karnaugh maps).

Minimal forms. A minimal SOP has the fewest product terms and, among those, the fewest literals. The canonical SOP is rarely minimal. The nn-input parity (XOR) function is the extreme case: no two minterms are adjacent, so its minimal SOP is its canonical SOP, with 2n−12^{n-1} terms of nn literals.

Counting. There are 2n2^n minterms for nn variables, so 22n2^{2^n} functions (each subset of minterms is a different function). A product term that omits kk of the nn variables is a sum of 2k2^k minterms.

How it works

Step through the table for F=AB′+CF = AB' + C. The columns show the function, its sum of minterms m1+m3+m4+m5+m7m_1 + m_3 + m_4 + m_5 + m_7, and its product of maxterms M0M2M6M_0 M_2 M_6. Rows where F=1F = 1 are exactly the minterms; rows where F=0F = 0 are exactly the maxterms. The two canonical forms agree on every row.

F = AB' + C as a sum of minterms and as a product of maxterms

Computed exactly, not typed
ABCF=AB'+Cm1+m3+m4+m5+m7M0.M2.M6
000···
001···
010···
011···
100···
101···
110···
111···

Step 0

Claim: the function is 1 exactly on rows 1, 3, 4, 5, 7. The sum of those minterms and the product of the maxterms for the other rows 0, 2, 6 are the same function.

0 / 9
computed by script: exact integer, Fraction and truth-table evaluation (IEEE 754 patterns via Python struct where used), not typed by hand. python3 scripts/gen-dl-traces.py

Method: write the truth table, then read it off. For SOP, take each row with output 1, write the product of all variables (true form for a 1, complemented for a 0) and OR them. For POS, take each row with output 0, write the sum of all variables (true form for a 0, complemented for a 1) and AND them. The reversal of the rule between minterm and maxterm is the usual place to slip; check one row (substitute the row's values: a minterm must give 1, a maxterm must give 0).

Worked examples

EX 1Write $m_5$ and $M_5$ for three variables

Easy

Step 1. 5=10125 = 101_2, so A=1A = 1, B=0B = 0, C=1C = 1.

Step 2 (minterm). Uncomplemented where the bit is 1, complemented where it is 0: m5=AB′Cm_5 = AB'C. Check: with A=1,B=0,C=1A=1, B=0, C=1 the product is 1⋅1⋅1=11 \cdot 1 \cdot 1 = 1.

Step 3 (maxterm). Uncomplemented where the bit is 0, complemented where it is 1: M5=A′+B+C′M_5 = A' + B + C'. Check: 0+0+0=00 + 0 + 0 = 0 at the same row.

EX 2Minterms and maxterms of a function

Easy

For F=AB′+CF = AB' + C the program lists the rows where FF is 1 and where it is 0, for this function and for G=A′B+ACG = A'B + AC.

#include <stdio.h>
 
static int f1(int a, int b, int c) { return (a && !b) || c; }
static int f2(int a, int b, int c) { return (!a && b) || (a && c); }
 
static void lists(const char *name, int (*f)(int, int, int)) {
    printf("%s: minterms", name);
    for (int i = 0; i < 8; i++)
        if (f((i >> 2) & 1, (i >> 1) & 1, i & 1)) printf(" %d", i);
    printf(" | maxterms");
    for (int i = 0; i < 8; i++)
        if (!f((i >> 2) & 1, (i >> 1) & 1, i & 1)) printf(" %d", i);
    printf("\n");
}
 
int main(void) {
    lists("AB'+C", f1);
    lists("A'B+AC", f2);
    int count = 0;
    for (int i = 0; i < 16; i++) {
        int a = (i >> 3) & 1, b = (i >> 2) & 1;
        if (a || !b) count++;
    }
    printf("A+B' over four variables has %d minterms\n", count);
    return 0;
}
AB'+C: minterms 1 3 4 5 7 | maxterms 0 2 6
A'B+AC: minterms 2 3 5 7 | maxterms 0 1 4 6
A+B' over four variables has 12 minterms

So AB′+C=∑m(1,3,4,5,7)=∏M(0,2,6)AB' + C = \sum m(1,3,4,5,7) = \prod M(0,2,6) and A′B+AC=∑m(2,3,5,7)=∏M(0,1,4,6)A'B + AC = \sum m(2,3,5,7) = \prod M(0,1,4,6).

EX 3Expand an SOP to canonical form

Medium

Write F=A′B+ACF = A'B + AC as a sum of minterms.

Step 1. A′BA'B lacks CC: A′B(C+C′)=A′BC+A′BC′A'B(C + C') = A'BC + A'BC'. ACAC lacks BB: AC(B+B′)=ABC+AB′CAC(B + B') = ABC + AB'C.

Step 2. Sum: F=A′BC′+A′BC+AB′C+ABCF = A'BC' + A'BC + AB'C + ABC. In index form: A′BC′=010=2A'BC' = 010 = 2, A′BC=3A'BC = 3, AB′C=101=5AB'C = 101 = 5, ABC=7ABC = 7.

Result. F=∑m(2,3,5,7)F = \sum m(2,3,5,7), and so F=∏M(0,1,4,6)F = \prod M(0,1,4,6), which matches the program output above.

EX 4From minterms to maxterms and the complement

Medium

Let F(A,B,C)=∑m(0,2,5)F(A,B,C) = \sum m(0, 2, 5).

Step 1 (maxterms). The other indices are 1, 3, 4, 6, 7, so F=∏M(1,3,4,6,7)F = \prod M(1,3,4,6,7).

Step 2 (complement). F′=∑m(1,3,4,6,7)F' = \sum m(1,3,4,6,7) and also F′=∏M(0,2,5)F' = \prod M(0,2,5).

Step 3 (write one of them out). M1=A+B+C′M_1 = A + B + C', M3=A+B′+C′M_3 = A + B' + C', M4=A′+B+CM_4 = A' + B + C, M6=A′+B′+CM_6 = A' + B' + C, M7=A′+B′+C′M_7 = A' + B' + C', and FF is their product.

EX 5Counting minterms of a product or sum term

GATE level

How many minterms does F=A+B′F = A + B' have over four variables A,B,C,DA, B, C, D?

Step 1. AA is 1 on 8 of the 16 rows. B′B' is 1 on 8 rows. They are both 1 when A=1A = 1 and B=0B = 0, which is 4 rows.

Step 2. By inclusion and exclusion, 8+8−4=128 + 8 - 4 = 12 (the program prints 12).

Step 3 (check by the complement). F′=A′BF' = A'B is 1 on 24−2=42^{4-2} = 4 rows, so FF has 16−4=1216 - 4 = 12.

General rule. A product term with kk literals over nn variables covers 2n−k2^{n-k} minterms.

EX 6A function with no simplification

GATE level

How many product terms does the minimal SOP of the three-variable parity function A⊕B⊕CA \oplus B \oplus C have?

Step 1. The function is 1 when an odd number of inputs are 1, so F=∑m(1,2,4,7)F = \sum m(1,2,4,7).

Step 2. Any two of these indices differ in at least two bits (001001 and 010010 differ in two, 001001 and 111111 in two, and so on), so no two minterms can merge into a smaller product term.

Result. The minimal SOP is the canonical SOP: 4 terms of 3 literals each, A′B′C+A′BC′+AB′C′+ABCA'B'C + A'BC' + AB'C' + ABC. For nn inputs the count is 2n−12^{n-1} terms.

Cheat box

Cheat box

  • Minterm mim_i: AND of all variables, true where the bit is 1. Maxterm MiM_i: OR of all variables, true where the bit is 0. Mi=(mi)′M_i = (m_i)'.
  • First variable is the most significant bit of the index.
  • F=∑m(rows with 1)=∏M(rows with 0)F = \sum m(\text{rows with } 1) = \prod M(\text{rows with } 0).
  • F′=∑m(rows with 0)=∏M(rows with 1)F' = \sum m(\text{rows with } 0) = \prod M(\text{rows with } 1).
  • FF has kk minterms ⇒\Rightarrow 2n−k2^n - k maxterms. A term with kk literals covers 2n−k2^{n-k} minterms.
  • mimj=0m_i m_j = 0 for i≠ji \ne j; ∑imi=1\sum_{i} m_i = 1.
  • Don't cares: F=∑m(… )+d(… )F = \sum m(\dots) + d(\dots), free to be 0 or 1.
  • nn-input parity: minimal SOP has 2n−12^{n-1} terms of nn literals; there is no simplification.
  • Number of functions of nn variables: 22n2^{2^n}.

Traps and GATE patterns

Connections

Both canonical forms are what a Karnaugh map and the tabular method start from. A decoder generates all minterms of its inputs, so any function is an OR of decoder outputs. A multiplexer with n−1n - 1 select lines implements a sum of minterms by Shannon expansion, and the design of combinational circuits begins with exactly this truth-table-to-expression step.

PYQs

3 previous year questions from your book. I re-solved each one myself (3 by running or simulating, 0 by reasoning only); the book's key is shown next to my answer. All PYQs

GATE 2015 · Set 2 · NAT · 2 marksQ15 · page 166 of the book
The number of min-terms after minimizing the
following Boolean expression is ________.

[D' + AB' + A'C + AC'D + A'C'D]'.
year not read yetQ19 · page 166 of the book
The truth table represents the Boolean function
  • (a)X
  • (b)X + Y
  • (c)X ⊕Y
  • (d)Y
year not read yetQ24 · page 167 of the book
Given f1,f2 and f in the canonical sum of products
form(in decimal) for the circuit

f1 = Σm(4, 5, 6, 7, 8)

f3 = Σm(1, 6, 15)

f = Σm(1, 6, 8, 15)

then f2 is
  • (a)Σm(4, 6)
  • (b)Σm(4, 8)
  • (c)Σm(6, 8)
  • (d)Σm(4, 6, 8)

Self-check

Question 1

Write F=AB+A′CF = AB + A'C as ∑m\sum m over A,B,CA, B, C.

Show answer

AB(C+C′)=ABC+ABC′=m7+m6AB(C + C') = ABC + ABC' = m_7 + m_6 and A′C(B+B′)=A′BC+A′B′C=m3+m1A'C(B + B') = A'BC + A'B'C = m_3 + m_1. So F=∑m(1,3,6,7)F = \sum m(1, 3, 6, 7).

Question 2

A 4-variable function has 6 minterms. How many maxterms does its canonical POS have?

Show answer

24−6=102^4 - 6 = 10.

Question 3

What is the maxterm M10M_{10} over A,B,C,DA, B, C, D?

Show answer

10=1010210 = 1010_2, so A=1,B=0,C=1,D=0A = 1, B = 0, C = 1, D = 0. The maxterm is complemented where the bit is 1: M10=A′+B+C′+DM_{10} = A' + B + C' + D.

Question 4

How many minterms does the product term AC′AC' cover over four variables?

Show answer

It has 2 literals, so it covers 24−2=42^{4-2} = 4 minterms.

Revision card

One-screen revision

  • mim_i: true literal where the bit is 1. MiM_i: true literal where the bit is 0. Mi=mi′M_i = m_i'.
  • F=∑m(ones)=∏M(zeros)F = \sum m(\text{ones}) = \prod M(\text{zeros}); complement swaps the index sets.
  • kk ones ⇒\Rightarrow kk minterms and 2n−k2^n - k maxterms.
  • Expand a missing variable with (x+x′)(x + x'). A term with kk literals covers 2n−k2^{n-k} minterms.
  • Don't cares are free. Parity has no simplification.

References

  • ·Mano and Ciletti, Digital Design, 5th ed., Chapter 2 Boolean Algebra and Logic Gates (canonical and standard forms)
  • ·Kohavi and Jha, Switching and Finite Automata Theory, Chapter 3 Boolean algebra (canonical forms)

Verification

The minterm and maxterm numbering, the equality of the sum-of-minterms and product-of-maxterms forms for all 256 functions of three variables, the complement and conversion rules, the minterm counts and the parity minimal-SOP claim (n = 2 to 5, by exhaustive cover search) are checked in scripts/enum-checks/dl_forms.py. The truth-table animation is computed by scripts/gen-dl-traces.py. The C program is compiled and run by npm run verify:c. Textbook chapter titles are from memory; the independent second pass has not been run, so the page stays draft. SECOND PASS (2026-11-02, done by the assistant, not a human check): every Self-check question was solved before the printed answer was read and all agreed; the definitions, worked examples, cheat box and traps were read claim by claim and the numbers re-derived by hand or by a small script (conversions, signed ranges and flags, IEEE 754 fields and custom formats, Boolean identities and counts, K-map groups, adder carries, BCD correction, flip-flop conversions, counter sequences and T equations, state reduction, Quine-McCluskey rounds and covers, floating-point alignment and rounding); long C programs were not re-read line by line (they are compiled and compared by npm run verify:c, and their printed outputs were checked against the prose); tables and animations are machine output and were read, not re-run; No other defect found. Status raised to self-checked; verified needs a textbook or human check.

last verified: never