2. Methodical guidelines / Методичні вказівки
This section is self-contained: it collects all the theory needed for the theme — canonical forms, algebraic minimization, and Karnaugh maps — together with the techniques used to solve the tasks in 3classroom.md. No outside material is required.
2.1 Boolean functions and truth tables
A Boolean function of variables assigns a value in to each of the input combinations (interpretations); its truth table lists them all. We build from variables, the constants , and the connectives (NOT, written ), (AND, written by juxtaposition ), and (OR). A literal is a variable or its negation ( or ). Precedence is .
2.2 Canonical forms: canonical DNF and canonical CNF
Two special forms are read directly off the truth table. (Some textbooks call them the perfect or complete DNF/CNF; the Russian/Ukrainian abbreviations СДНФ/СКНФ, sometimes transliterated “SDNF/SKNF”, refer to the same two forms. More generally, a DNF is a sum of products (SOP) and a CNF a product of sums (POS) — the names used in Lecture 5.)
- A minterm of a row is the AND of all variables, each uncomplemented if its value is and complemented if ; it equals on exactly that row. The canonical DNF (the sum of minterms) is the OR of the minterms of the -rows.
- A maxterm of a row is the OR of all variables, each uncomplemented if its value is and complemented if ; it equals on exactly that row. The canonical CNF (the product of maxterms) is the AND of the maxterms of the -rows.
For example, if is only on the rows and , then
Canonical forms are unique but usually not minimal — every -row (or -row) contributes a full term; minimizing removes the redundancy.
2.3 The laws of Boolean algebra
Minimization rewrites a formula using these identities (dual pairs — swap , ).
| Law | For | For |
|---|---|---|
| Double negation | (\overline{\overline{A}} = A) | |
| Complement | ||
| Constants | ||
| Idempotence | ||
| Absorption | ||
| Combining | ||
| Commutativity / Associativity | ||
| Distributivity | ||
| De Morgan |
A useful consequence: (absorption variant).
2.4 Algebraic minimization
To minimise by equivalent transformations:
- Eliminate implications/equivalences: .
- Push negations inward with De Morgan and double negation, until each is on a single variable.
- Simplify with distributivity, combining (), absorption (), and the complement laws, until no rule applies. The result is a minimal DNF (or, dually, a minimal CNF).

The weakness of the algebraic method is that it is easy to miss a simplification; the Karnaugh map makes the available groupings visible instead.
2.5 Karnaugh maps
A Karnaugh map is the truth table laid on a grid where physically adjacent cells differ in exactly one variable (a Gray-code ordering). For three variables the columns are labelled and the rows ; fill in a for every minterm of the function.
(Lecture 5 draws the same three-variable map with the axes swapped — rows , columns in Gray order. The two layouts are equivalent: a group’s constant literals, and hence its term, come out the same either way.)

For four variables the map is a grid: the rows are labelled by and the columns by , both in the Gray order . The wrap-around adjacency now applies to both directions (top/bottom rows and left/right columns are neighbours), so a group may be a block of or cells, and a group of cells again drops variables.
Reading a minimal DNF:
- Group the $1$s into rectangles of size (a power of two), each as large as possible;
- adjacency wraps around: the left and right edges are neighbours and the top and bottom are too (the map is a cylinder/torus), so the first and last columns may group together, as may the four corners;
- a group of cells eliminates variables; its term is the AND of the literals that stay constant across the group;
- choose the fewest, largest groups that together cover every (overlaps are allowed); the minimal DNF is the OR of the group terms.
Reading a minimal CNF: apply the same procedure to the $0$s. Grouping the zeros gives the minimal DNF of ; complementing it with De Morgan turns each product into a sum, yielding the minimal CNF of . (Equivalently, each zero-group contributes one OR-clause.)
Prime and essential implicants. A group that cannot be enlarged (doubled) any further is a prime implicant. If a prime implicant is the only group that covers some particular -cell, it is an essential prime implicant and must appear in the answer. The systematic recipe is therefore: take all essential prime implicants first, then cover any $1$s still left with as few further prime implicants as possible. (The Karnaugh map and the tabular Quine–McCluskey method find the same prime implicants; the map is faster by eye up to four variables, Quine–McCluskey scales to more.)
2.6 Working checklist
- To get the canonical DNF/CNF, list the truth table; OR the minterms of the -rows (canonical DNF) or AND the maxterms of the -rows (canonical CNF); mind the polarity rule (minterm: complement where the value is ; maxterm: complement where it is ).
- On a Karnaugh map, group in powers of two, as large as possible, use the wrap-around, and cover every with the fewest groups; read the term of a group from the literals that stay constant.
- For a minimal CNF, group the $0$s (or convert the minimal DNF of by De Morgan).