Salta al contenuto
Note per Studenti Canonical Forms - Minterms, Maxterms, SOP and POS Report

Canonical Forms - Minterms, Maxterms, SOP and POS

In questa pagina 5

A Boolean expression can be written in many equivalent ways. Canonical (normal) forms are standard expressions derived mechanically from the truth table: not the most compact, but the ideal starting point for minimization (Karnaugh Maps and Two-Level MinimizationA Karnaugh map is the truth table arranged in a grid with rows and columns in Gray code, so that adjacent cells (also across opposite edges) differ in one variable. Groups of 2^k ones eliminate k variables and give a product. A prime implicant is a maximal group, an essential one is the only cover of some minterm; the minimum cover has all essentials plus few other primes. For POS, group the zeros. Don't cares may be used as 1 or 0. XOR functions have a checkerboard map and do not simplify.Karnaugh Maps and Two-Level Minimization →).

Minterms

A minterm is a product (AND) in which each variable of the function appears exactly once, direct or negated. It corresponds to one truth-table row: it is 11 for the combination of that row and 00 for all others. Take each variable direct if its bit in the row is 1, negated if 0. If the row is number ii (first variable = MSB) it is called mim_i.

With X,Y,ZX,Y,Z, row 5=1015=101 gives m5=XY‾Zm_5=X\overline YZ.

Maxterms

A maxterm is the dual concept: a sum (OR) containing each variable exactly once, direct or negated. It is 00 on one row and 11 on all others. Take each variable negated if its bit is 1, direct if 0 (opposite of the minterm rule).

Row 5=1015=101 gives M5=X‾+Y+Z‾M_5=\overline X+Y+\overline Z. The minterm and maxterm with the same index are complements: mi‾=Mi\overline{m_i}=M_i (De Morgan, Boolean Algebra - Axioms, Theorems and Function ComplementBoolean algebra works on two-valued variables with AND, OR, NOT. Fundamental identities (identity element, idempotence, complement, commutative, associative, both distributive laws) come in dual pairs; De Morgan, absorption, adjacency and consensus are the main theorems, proved by perfect induction or algebraically. The complement of a function is obtained with De Morgan or with the dual plus literal negation. Cost is measured in literals or gate inputs.Boolean Algebra - Axioms, Theorems and Function Complement →); e.g. XY‾Z‾=X‾+Y+Z‾\overline{X\overline YZ}=\overline X+Y+\overline Z.

row ii XYZXYZ minterm mim_i maxterm MiM_i
0 000 X‾ Y‾ Z‾\overline X\,\overline Y\,\overline Z X+Y+ZX+Y+Z
1 001 X‾ Y‾Z\overline X\,\overline Y Z X+Y+Z‾X+Y+\overline Z
2 010 X‾YZ‾\overline X Y\overline Z X+Y‾+ZX+\overline Y+Z
3 011 X‾YZ\overline X YZ X+Y‾+Z‾X+\overline Y+\overline Z
4 100 XY‾ Z‾X\overline Y\,\overline Z X‾+Y+Z\overline X+Y+Z
5 101 XY‾ZX\overline YZ X‾+Y+Z‾\overline X+Y+\overline Z
6 110 XYZ‾XY\overline Z X‾+Y‾+Z\overline X+\overline Y+Z
7 111 XYZXYZ X‾+Y‾+Z‾\overline X+\overline Y+\overline Z

With nn variables there are 2n2^n minterms and 2n2^n maxterms (not nn, not 2n−12n-1).

Canonical SOP and POS

From the truth table of FF:

  • canonical SOP (Sum Of Products): sum of the minterms of the rows with F=1F=1, F=∑m(… )F=\sum m(\dots);
  • canonical POS (Product Of Sums): product of the maxterms of the rows with F=0F=0, F=∏M(… )F=\prod M(\dots).

F(A,B)=BF(A,B)=B (1 on rows 1 and 3): F=∑m(1,3)=A‾B+AB=∏M(0,2)=(A+B)(A‾+B)F=\sum m(1,3)=\overline AB+AB=\prod M(0,2)=(A+B)(\overline A+B). The POS indices are those missing from the SOP. Other rows can be ignored: in a SOP rows with F=0F=0 would add 00 (neutral for OR); in a POS rows with F=1F=1 would contribute 11 (neutral for AND).

Worked example

F=XY‾+YZF=X\overline Y+YZ:

XX YY ZZ FF row
0 0 0 0 0
0 0 1 0 1
0 1 0 0 2
0 1 1 1 (YZYZ) 3
1 0 0 1 (XY‾X\overline Y) 4
1 0 1 1 (XY‾X\overline Y) 5
1 1 0 0 6
1 1 1 1 (YZYZ) 7

F=∑m(3,4,5,7)=X‾YZ+XY‾ Z‾+XY‾Z+XYZF=\sum m(3,4,5,7)=\overline X YZ+X\overline Y\,\overline Z+X\overline YZ+XYZ F=∏M(0,1,2,6)=(X+Y+Z)(X+Y+Z‾)(X+Y‾+Z)(X‾+Y‾+Z)F=\prod M(0,1,2,6)=(X+Y+Z)(X+Y+\overline Z)(X+\overline Y+Z)(\overline X+\overline Y+Z)

Check on row 6 (X=1,Y=1,Z=0X=1,Y=1,Z=0): M6=X‾+Y‾+Z=0M_6=\overline X+\overline Y+Z=0, so F=0F=0.

From an expression to a canonical form

If terms lack some variables, expand a product missing WW by multiplying by (W+W‾)=1(W+\overline W)=1: XY‾=XY‾Z+XY‾ Z‾X\overline Y=X\overline YZ+X\overline Y\,\overline Z. For a sum term missing WW add WW‾=0W\overline W=0 and use the second distributive law. Simpler: go through the truth table. E.g. G=XY+X‾ZG=XY+\overline XZ is 1 on rows 6,76,7 (XYXY) and 1,31,3 (X‾Z\overline XZ): G=∑m(1,3,6,7)=∏M(0,2,4,5)G=\sum m(1,3,6,7)=\prod M(0,2,4,5).

Minimal SOP/POS and circuit levels

Canonical forms are usually redundant. A simplified SOP (or POS) has fewer literals: XY‾+YZX\overline Y+YZ is shorter than ∑m(3,4,5,7)\sum m(3,4,5,7). An expression in SOP or POS is built as a two-level circuit (AND level and OR level for a SOP; OR and AND for a POS; direct and negated variables assumed available). Otherwise more levels are needed: F=A(B+CD)F=A(B+CD) has three levels; with the distributive law the SOP AB+ACDAB+ACD has two. SOPs map well to NAND-NAND and POSs to NOR-NOR (Combinational Design - Hierarchy and NAND-NOR MappingA combinational circuit has outputs depending only on the present inputs (no memory, no feedback); a sequential one also depends on history (state, memory, feedback). Design flow: specification, truth table, minimum-cost function, logic diagram, verification. With many inputs the hierarchical approach splits the system into reusable blocks (regularity). Basic blocks: one-variable functions, vectors, enabling. Technology mapping in CMOS: SOP to NAND-NAND, POS to NOR-NOR.Combinational Design - Hierarchy and NAND-NOR Mapping →).

With nn variables there are 22n2^{2^n} different functions: 256256 for n=3n=3, 65 53665\,536 for n=4n=4.

Common mistakes

  • Using the maxterm rule for a minterm (or vice versa): minterm direct if 1, maxterm direct if 0.
  • Writing in the POS the indices of the 1s instead of the 0s.
  • Calling a simplified SOP "canonical": canonical means every term has all variables.

Versione ripasso

  • Minterm mim_i: product with all variables once, direct if bit =1=1, negated if 00; 1 on one row. m5=XY‾Zm_5=X\overline YZ.
  • Maxterm MiM_i: sum with all variables once, negated if bit =1=1, direct if 00; 0 on one row. M5=X‾+Y+Z‾M_5=\overline X+Y+\overline Z.
  • Properties: mi‾=Mi\overline{m_i}=M_i; 2n2^n of each.
  • Canonical SOP: ∑m\sum m of rows with F=1F=1. Canonical POS: ∏M\prod M of rows with F=0F=0 (the missing indices). F=BF=B: ∑m(1,3)=∏M(0,2)\sum m(1,3)=\prod M(0,2).
  • Example: F=XY‾+YZ=∑m(3,4,5,7)=∏M(0,1,2,6)F=X\overline Y+YZ=\sum m(3,4,5,7)=\prod M(0,1,2,6); check row 6: M6=0M_6=0.
  • Expansion: multiply a product by W+W‾=1W+\overline W=1: XY‾=XY‾Z+XY‾ Z‾X\overline Y=X\overline YZ+X\overline Y\,\overline Z. G=XY+X‾Z=∑m(1,3,6,7)=∏M(0,2,4,5)G=XY+\overline XZ=\sum m(1,3,6,7)=\prod M(0,2,4,5).
  • Minimal forms: canonical is redundant; SOP = AND-OR (NAND-NAND), POS = OR-AND (NOR-NOR). A(B+CD)A(B+CD) has 3 levels, AB+ACDAB+ACD has 2. 22n2^{2^n} functions (256256 for n=3n=3).
  • Mistakes: minterm/maxterm rules swapped; POS indices taken from the 1s; simplified SOP called canonical.

Teoria collegata