2. Methodical guidelines / Методичні вказівки
This section is self-contained: it collects all the theory needed for the theme — Boolean formulas, truth tables, the laws of Boolean algebra, and the two normal forms — together with the techniques used to solve the tasks in 3classroom.md. No outside material is required.
2.1 Boolean formulas
A Boolean (propositional) variable takes one of two values, (true) or (false). Formulas are built from variables, the constants and , and the connectives:
| Connective | Symbol | Value |
|---|---|---|
| Negation (NOT) | (also ) | iff |
| Conjunction (AND) | (also ) | iff both are |
| Disjunction (OR) | iff at least one is | |
| Implication | only when ; equals | |
| Equivalence | iff and are equal |
Two shorthands used throughout: an overline means , and juxtaposition means .
Precedence. To drop parentheses, connectives bind in the order
So reads . When in doubt, parenthesise.
2.2 From a formula to a truth table
A formula in variables defines a Boolean function; its truth table lists the value on each of the interpretations (assignments of to the variables). To build it:
- write the rows in the standard order — read the variable values as a binary number counting up from to ;
- for each row, substitute the values and evaluate the formula inside-out, respecting precedence;
- record the result in the last column.
For example, one row of at evaluates as
The number of the row (its binary value) doubles as the number of the interpretation.
2.3 The laws of Boolean algebra
These identities let you transform a formula without changing the function it computes. They come in dual pairs (swap and ).
| Law | For | For |
|---|---|---|
| Double negation | (\overline{\overline{A}} = A) | |
| Complement (excluded middle) | ||
| Constants | ||
| Idempotence | ||
| Absorption | ||
| Combining | ||
| Commutativity | ||
| Associativity | ||
| Distributivity | ||
| De Morgan |
The two workhorses for normal forms are De Morgan (a bar over a group flips the operation and complements each part) and distributivity.
2.4 Literals, DNF and CNF
- A literal is a variable or its negation: or .
- A term (elementary conjunction, “product”) is an AND of literals, e.g. .
- A clause (elementary disjunction, “sum”) is an OR of literals, e.g. .
The two standard shapes are:
- Disjunctive normal form (DNF) — an OR of terms (a sum of products), e.g. ;
- Conjunctive normal form (CNF) — an AND of clauses (a product of sums), e.g. .

Every formula has both forms. DNF makes satisfiability obvious (a term with no clashing literals is satisfiable); CNF is the input format expected by SAT solvers.
2.5 Reducing a formula to DNF or CNF
Follow the same first two steps, then distribute in the appropriate direction:
- Eliminate and . Replace by , and by .
- Push negations inward with De Morgan and double negation until every sits on a single variable (this is negation normal form).
- Distribute:
- for DNF, distribute over until the formula is an OR of AND-terms;
- for CNF, distribute over until it is an AND of OR-clauses.
- Simplify with idempotence, the complement laws (, ), absorption, and the constant laws. A term that contains both and is (drop it from a DNF); a clause that contains both is (drop it from a CNF). If everything cancels, the formula is a constant: (a contradiction) or (a tautology).

2.6 Working checklist
- For a truth-table task, list all rows in binary order and evaluate inside-out; a final algebraic simplification of the formula is a good cross-check (the table and the simplified formula must agree).
- For a normal-form task, always start by removing and , then apply De Morgan to reach negation normal form before distributing.
- DNF distributes over ; CNF distributes over — keep straight which one the task asks for.
- Cite one law per step, and finish by simplifying; watch for a term/clause collapsing to or .