Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools

How to Convert a Formula to Disjunctive Normal Form

A formula is in disjunctive normal form (DNF) when it is an or of terms, and each term is an and of letters and negated letters. Each term describes one way to make the formula true.

Recognize the task

The question asks for DNF, a sum of products, or a list of the cases that make a formula true: (P→Q)∧¬(Q∧R)(P \to Q) \land \neg(Q \land R), P∧(Q∨¬R)P \land (Q \lor \neg R), (P∨Q)∧(¬P∨¬Q)(P \lor Q) \land (\neg P \lor \neg Q). Test for the answer: no arrows, every ¬\neg on a single letter, and no ∨\lor inside a bracket that is joined by ∧\land.
Normal forms, minterms and maxterms are explained with the normal forms converter.

Two ways to do it

Rewrite with the lawsusual
A∧(B∨C)≡(A∧B)∨(A∧C)A \land (B \lor C) \equiv (A \land B) \lor (A \land C)
Remove arrows, push negations in, then apply the distributive law of and over or.
Read it off the truth tabletable
one term per T row: a T letter appears plain, an F letter negated\text{one term per T row: a T letter appears plain, an F letter negated}
For each row where the formula is T, write the term that is true only in that row. The result is the full canonical DNF.

Steps

StepOn (P→Q)∧¬(Q∧R)(P \to Q) \land \neg(Q \land R)
1Remove the arrows. Use material implication; split ↔\leftrightarrow into two conditionals first.Material implication ↗(¬P∨Q)∧¬(Q∧R)(\neg P \lor Q) \land \neg(Q \land R)
2Push every negation onto a letter. Apply De Morgan's law, then cancel any ¬¬\neg\neg.De Morgan's laws ↗(¬P∨Q)∧(¬Q∨¬R)(\neg P \lor Q) \land (\neg Q \lor \neg R)
3Distribute and over or. Multiply out as with two brackets in algebra: each term of the first bracket with each term of the second.Distributive laws ↗(¬P∧¬Q)∨(¬P∧¬R)∨(Q∧¬Q)∨(Q∧¬R)(\neg P \land \neg Q) \lor (\neg P \land \neg R) \lor (Q \land \neg Q) \lor (Q \land \neg R)
4Drop the impossible terms. A term with a letter and its negation is always F (non-contradiction) and disappears from an or; so do repeated terms.(¬P∧¬Q)∨(¬P∧¬R)∨(Q∧¬R)(\neg P \land \neg Q) \lor (\neg P \land \neg R) \lor (Q \land \neg R)

Worked examples

Example 1 · one distribution

laws
P∧(Q∨¬R)P \land (Q \lor \neg R)
an or inside an and
≡(P∧Q)∨(P∧¬R)\equiv (P \land Q) \lor (P \land \neg R)
distribute P∧P \land

Example 2 · from the truth table

T rows
P→QP \to Q: T, F, T, T
T rows (T,T)(T, T), (F,T)(F, T), (F,F)(F, F)
terms P∧QP \land Q, ¬P∧Q\neg P \land Q, ¬P∧¬Q\neg P \land \neg Q
negate the F letters
(P∧Q)∨(¬P∧Q)∨(¬P∧¬Q)(P \land Q) \lor (\neg P \land Q) \lor (\neg P \land \neg Q)
or of the terms

Example 3 · exclusive or

4 terms
(P∨Q)∧(¬P∨¬Q)(P \lor Q) \land (\neg P \lor \neg Q)
start
≡(P∧¬P)∨(P∧¬Q)∨(Q∧¬P)∨(Q∧¬Q)\equiv (P \land \neg P) \lor (P \land \neg Q) \lor (Q \land \neg P) \lor (Q \land \neg Q)
four products
≡(P∧¬Q)∨(¬P∧Q)\equiv (P \land \neg Q) \lor (\neg P \land Q)
drop the two impossible terms
Check that the start and your DNF are equivalent in the equivalence validator.

See it happen

A DNF is a list of the ways a formula can be true. A term that uses every letter, such as ¬P∧Q\neg P \land Q, is T in exactly one row of the truth table, so joining the terms of the true rows with ∨\lor rebuilds the formula row by row. The law method reaches a shorter list, where each term covers several rows at once. CNF is the mirror image: it lists the ways the formula can fail.

Common mistakes

Distributing the wrong connective

✗ P∧(Q∨¬R)≡(P∨Q)∧(P∨¬R)P \land (Q \lor \neg R) \equiv (P \lor Q) \land (P \lor \neg R)
✓ distribute ∧\land over ∨\lor: (P∧Q)∨(P∧¬R)(P \land Q) \lor (P \land \neg R)

Using the CNF sign rule

✗ the T row P=FP = F, Q=TQ = T gives the term P∧¬QP \land \neg Q
✓ negate the letters that are F: ¬P∧Q\neg P \land Q

Calling an and of ors a DNF

✗ (P∨Q)∧R(P \lor Q) \land R is in DNF
✓ distribute first: (P∧R)∨(Q∧R)(P \land R) \lor (Q \land R)

Building terms from the false rows

✗ P→QP \to Q in DNF is P∧¬QP \land \neg Q
✓ P∧¬QP \land \neg Q is its negation; use the three T rows instead