Canonical Sum Calculator

Σm canonical SOP, ΠM canonical POS and a minimal form from minterms or a truth table.

  1. Enter valuesUse your own inputs or an example
  2. CalculateApply your selected settings
  3. View resultExplore the answer and explanation

Describe the Boolean function

Enter your values below to get started.

Examples:
Input
Comma-separated row numbers; ranges like 10-15 work.
One character per row: 0, 1 or X for don't care. 3 variables need 8 characters.
Leave empty for A, B, C … The first name is the most significant bit.
Reset restores the default values.

Tips for this calculator

Row number m reads the variables as a binary number: for A B C, row 5 is 101 (A = 1, B = 0, C = 1).

Don't cares (X) never appear in the canonical SOP, yet they help the minimal form.

The K-map tab colors each group of the minimal SOP for 2 to 4 variables.

Type your own names, e.g. X Y Z, to match a textbook.

A canonical sum calculator writes a Boolean function as its canonical sum of products (SOP): the OR of 1 minterm for every truth-table row where the function equals 1. Enter minterm numbers (with optional don't cares) or the output column of a truth table for 2 to 6 variables to get the Σm notation, the full canonical SOP, the canonical product of sums (POS) in ΠM notation, a minimal SOP and POS from the Quine–McCluskey method, the truth table and a Karnaugh map (K-map).

What is a Canonical Sum?

A canonical sum, or canonical sum of products (SOP), is a Boolean expression written as the OR of minterms, one minterm for each input row where the function is 1, with every variable in every term. The 3-input majority function F = 1 on rows 3, 5, 6 and 7, so its canonical sum is F = A′BC + AB′C + ABC′ + ABC = Σm(3, 5, 6, 7).

The form is called the disjunctive normal form (DNF) with full minterms, or the sum of minterms. It follows from George Boole's algebra (1854) and Claude Shannon's 1938 thesis, which showed that any switching circuit equals an expression in this form. Each Boolean function of n variables has exactly 1 canonical sum, which makes the canonical sum a unique fingerprint of the function.

InteractiveSet the truth table, read the canonical sum

How Does the Canonical Sum Calculator Work?

The canonical sum calculator lists the rows where F = 1, writes 1 minterm per row, joins them with + for the canonical SOP, does the same with the 0 rows for the canonical POS, and simplifies with the Quine–McCluskey method. Willard Quine (1952) and Edward McCluskey (1956) designed the method as a tabular version of the K-map that works for any number of variables.

InteractiveQuine–McCluskey: merge the minterms stage by stage
  1. Read the function

    From minterm numbers and don't cares, or from the truth-table output column (0, 1, X).

  2. Write the canonical forms

    1 rows → minterms (Σm); 0 rows → maxterms (ΠM).

  3. Merge implicants

    Terms that differ in 1 bit merge (010 + 011 → 01–) until only prime implicants remain.

  4. Pick a minimum cover

    Primes that alone cover a minterm come first, then the smallest set of the rest that covers every minterm.

Canonical Sum Formula: Minterms and Maxterms

The canonical sum formula is F = Σ mi over every row i where F(i) = 1, where minterm mi uses each variable plain if its bit is 1 and complemented if its bit is 0. The canonical product uses maxterms Mi over the 0 rows with the opposite rule.

F=∑i: F(i)=1mi=∏i: F(i)=0Mi,Mi=mi‾F = \sum_{i:\,F(i)=1} m_i = \prod_{i:\,F(i)=0} M_i, \qquad M_i = \overline{m_i}

For 3 variables, row 5 = 101, so m5 = AB′C and M5 = A′ + B + C′. A function with k minterms out of 2n rows has 2n − k maxterms: the majority function has 4 of each, F = ΠM(0, 1, 2, 4).

InteractiveBuild the minterm and maxterm of any row

Types of Canonical and Standard Forms

There are 4 forms of the same Boolean function: canonical SOP, canonical POS, minimal SOP and minimal POS. The canonical forms are unique and use every variable in every term; the minimal forms use the fewest literals and are the ones built as circuits.

Interactive4 forms of one function and their literal counts

Canonical SOP (Σm)

OR of full minterms, e.g. A′BC + AB′C + ABC′ + ABC. Maps directly to a decoder with an OR gate.

Canonical POS (ΠM)

AND of full maxterms, e.g. (A + B + C)(A + B + C′)(A + B′ + C)(A′ + B + C) for the majority function.

Minimal SOP

Fewest product terms and literals: majority = AB + AC + BC (6 literals instead of 12). 2-level AND–OR or NAND–NAND logic.

Minimal POS

Fewest sum terms: majority = (A + B)(A + C)(B + C). 2-level OR–AND or NOR–NOR logic.

How to Find the Canonical Sum by Hand

To find the canonical sum by hand, write the truth table, mark the rows where F = 1, turn each marked row into a product using each variable plain for 1 and primed for 0, and OR the products. For F(A, B, C) = 1 on rows 3, 5, 6, 7:

  1. Row 3 = 011 → A′BC.
  2. Row 5 = 101 → AB′C.
  3. Row 6 = 110 → ABC′.
  4. Row 7 = 111 → ABC.
  5. Canonical sum: F = A′BC + AB′C + ABC′ + ABC = Σm(3, 5, 6, 7).
InteractiveStep through canonical sums by hand

    Simplifying a Canonical Sum with a Karnaugh Map

    A Karnaugh map simplifies a canonical sum by placing its minterms in a grid ordered in Gray code, so adjacent cells differ in 1 variable and groups of 1, 2, 4 or 8 cells collapse into 1 shorter product. Maurice Karnaugh introduced the map at Bell Labs in 1953.

    AB′C+ABC=AC(B′+B)=ACAB'C + ABC = AC(B' + B) = AC

    A group of 2k cells removes k variables. On 4 variables, the 4 corner cells m0, m2, m8 and m10 form 1 group, B′D′: the map wraps around at its edges. Don't cares (X) may join a group to make it larger, and stay out of the canonical sum.

    Interactive4-variable K-map: click cells, watch the groups

    Common Mistakes with Canonical Sums

    • Priming the wrong literals: in a minterm a 0 bit gives a complemented variable; in a maxterm a 1 bit does.
    • Dropping variables from a term: AB is not a minterm of a 3-variable function; a canonical term contains all 3 variables (ABC′ or ABC).
    • Reversing the bit order: the first variable is the most significant bit, so for A B C row 4 is 100 = AB′C′, not A′B′C.
    • Putting don't cares in Σm: don't cares go in a separate d( ) list and never in the canonical sum.
    • Calling a minimal form canonical: AB + AC + BC is a standard SOP, not the canonical SOP.
    InteractiveTrue or false: canonical sums
    1. Every minterm of a 3-variable function contains all 3 variables.

    2. For variables A B C, m6 = ABC′.

    3. The canonical POS uses the rows where F = 1.

    4. A Boolean function has exactly 1 canonical sum of products.

    5. AB + AC + BC is the canonical sum of the majority function.

    Score: 0 / 5

    How to Use the Canonical Sum Calculator

    To use the canonical sum calculator, pick the number of variables, enter either the minterm list (with optional don't cares) or the truth-table output column, and press Calculate. The result shows the Σm form with the canonical and minimal expressions; the tabs show the steps, the K-map and the full truth table.

    InteractiveLoad a Boolean function

    Each button fills the calculator and runs it.

    1. Pick n

      2 to 6 variables (4 to 64 truth-table rows).

    2. Choose the input

      Minterm list such as 3, 5, 6, 7, or a truth column such as 00010111.

    3. Add don't cares

      Optional: rows whose output does not matter, e.g. 10-15 for BCD.

    4. Read the forms

      Canonical SOP, ΠM, minimal SOP and minimal POS, with literal counts.

    Real-Life Uses of Canonical Sums

    Canonical sums turn any truth table into a circuit, and minimization makes that circuit small. There are 5 common uses:

    • Display decoders: each segment of a BCD-to-7-segment decoder (such as the 7447 chip) is a canonical sum over the digits 0–9 with don't cares for 10–15.
    • Programmable logic: programmable logic arrays (PLAs) and the AND–OR planes of CPLDs implement SOP forms directly.
    • Lookup tables: FPGA lookup tables (LUTs) store the truth table, which is the canonical sum in memory form.
    • Arithmetic circuits: the full adder's sum bit is Σm(1, 2, 4, 7) and its carry is Σm(3, 5, 6, 7).
    • Verification: 2 circuits are equivalent when their canonical sums match, which is how a truth-table comparison proves equivalence.
    Interactive7-segment decoder: canonical sum of each segment

    Canonical Sum Examples

    Minterm lists with their canonical SOP and minimal form.

    Canonical Sum Examples
    FunctionCanonical SOPMinimal SOPCalculator
    Σm(3, 5, 6, 7)A′BC + AB′C + ABC′ + ABCBC + AC + AB
    Σm(1, 3, 5, 7)A′B′C + A′BC + AB′C + ABCC
    Σm(0, 1, 2, 5, 6, 7)6 mintermsA′B′ + BC′ + AC
    Σm(0, 2, 8, 10, 13, 15)6 minterms of A B C DB′D′ + ABD
    Σm(1, 2, 4, 7)A′B′C + A′BC′ + AB′C′ + ABCsame (no reduction)
    Truth column 0110A′B + AB′A′B + AB′ (XOR)
    Σm(0, 2, 3, 5, 6, 7, 8, 9) + d(10–15)8 mintermsC + A + B′D′ + BD

    Popular Canonical Sum Problems

    Try each one, then reveal the answer or solve it in the calculator.

    1. Write the canonical sum of F(A, B) = Σm(0, 3).

      Show answerF = A′B′ + AB (XNOR)
    2. Write the canonical product (ΠM) of F(A, B, C) = Σm(1, 2, 4, 7).

      \Pi M(?)
      Show answer\Pi M(0, 3, 5, 6)
    3. Simplify F(A, B, C) = Σm(0, 1, 2, 3).

      Show answerF = A′
    4. Simplify F(A, B, C, D) = Σm(4, 5, 6, 7, 12, 13, 14, 15).

      Show answerF = B
    5. A truth table has the output column 11101000 (rows 0–7). Give Σm and the minimal SOP.

      Show answerΣm(0, 1, 2, 4); F = A′B′ + A′C′ + B′C′
    6. Simplify F = Σm(1, 3, 7, 11, 15) + d(0, 2, 5) with 4 variables.

      Show answerF = A′D + CD

    Explore More Sum Calculators

    Discover 67 free sum calculators across different categories. Find the right calculator for your needs.

    Browse All 67 Calculators
    Questions and answers

    Frequently Asked Questions

    What is a canonical sum calculator?

    A canonical sum calculator is an online tool that converts a minterm list or truth table into the canonical sum of products (Σm). This canonical sum calculator returns the canonical SOP and POS, the minimal SOP and POS, the truth table and a K-map for 2 to 6 variables.

    What is the difference between canonical SOP and canonical POS?

    Canonical SOP is the OR of minterms for the rows where F = 1, and canonical POS is the AND of maxterms for the rows where F = 0. Both describe the same function: Σm(3, 5, 6, 7) = ΠM(0, 1, 2, 4).

    What does Σm mean?

    Σm means "sum of minterms": Σm(3, 5, 6, 7) is shorthand for m3 + m5 + m6 + m7, the OR of the minterms for rows 3, 5, 6 and 7.

    Is the canonical sum the simplest form?

    No, the canonical sum is usually not the simplest form. Every term holds every variable, so the majority function needs 12 literals in canonical SOP and 6 in its minimal SOP, AB + AC + BC.

    How many minterms does a function of n variables have?

    A function of n variables has 2ⁿ possible minterms, 1 per truth-table row: 8 for 3 variables and 16 for 4 variables. The canonical sum includes only those where F = 1.

    Can the canonical sum calculator handle don't cares?

    Yes, the canonical sum calculator handles don't cares. Enter them in the don't-care field or as X in the truth column; they stay out of Σm and help shrink the minimal form.

    How do you convert a Boolean expression to a canonical sum?

    Multiply each product term by (x + x′) for every missing variable x, expand, and remove repeated terms. A + B′C over A, B, C expands to Σm(1, 4, 5, 6, 7).

    What is the canonical sum of a full adder?

    The full adder's sum output is Σm(1, 2, 4, 7) = A′B′C + A′BC′ + AB′C′ + ABC, and its carry output is Σm(3, 5, 6, 7), the majority function.

    Conclusion

    A canonical sum writes a Boolean function as the OR of 1 full minterm per true row, and the canonical sum calculator builds that Σm form together with the canonical POS and the minimal SOP and POS. Use the canonical form to describe or compare functions exactly, and the minimal form with the K-map to design the smallest 2-level circuit.

    Not sure which form to use? Answer the questions below.

    InteractiveWhich Boolean form do you need?