Boolean to DNF Converter

Convert a Boolean expression to disjunctive normal form (DNF) and negation normal form (NNF): minimal and canonical DNF, with step-by-step working using De Morgan's laws and distribution.

Privacy: worked out in your browser; nothing is sent or stored.

Up to 10 variables and 2000 characters.

Variables are a letter with optional digits (A, b, x1). NOT: A' !A ¬A ~A · AND: AB A·B A*B A&B A∧B · OR: A+B A|B A∨B · XOR: A^B A⊕B · implies: -> → · if and only if: <-> ↔ · constants 0 and 1. You can also enter a list such as Σm(1, 3, 5) + d(7), ΠM(0, 2) or F(A, B, C) = Σm(1, 3).

How to convert an expression to DNF

  1. Type the expression, for example (A → B) ∧ (B → C).
  2. Press Convert to DNF. The minimal DNF appears first, with the canonical DNF and the negation normal form.
  3. Press Next step to follow the conversion law by law.

What are DNF and NNF?

Disjunctive normal form is an OR of terms, where each term is an AND of literals, for example (A ∧ ¬B) ∨ C. In digital electronics it is called a sum of products (SOP). Negation normal form allows any mix of AND and OR, but NOT may only appear directly on a variable, for example (¬A ∨ B) ∧ (¬B ∨ C). NNF is the half-way point of every DNF or CNF conversion.

The conversion, step by step

  1. Remove ↔, ⊕, ↑ and ↓ using their definitions.
  2. Remove →: P → Q becomes ¬P ∨ Q.
  3. Push NOT inward with De Morgan's laws and remove double negations. The result is the NNF.
  4. Multiply out: distribute ∧ over ∨, P ∧ (Q ∨ R) = (P ∧ Q) ∨ (P ∧ R), dropping terms that contain both X and ¬X.
  5. Absorption: drop any term that contains a smaller term.
  6. Shortest DNF: grouping on a Karnaugh map (Quine–McCluskey) can remove further terms, such as redundant consensus terms; the tool shows the shortest DNF and says whether the algebra already reached it.

Frequently asked questions

What is the canonical DNF?

One full term (minterm) for every row of the truth table where the expression is 1, written with every variable. It is unique but long; Σm lists the row numbers.

Is DNF the same as SOP?

Yes. Use the POS to SOP converter if your input is a product of sums, or the CNF converter for the opposite form.

Why can multiplying out get very long?

Each bracket multiplies the number of terms, so a CNF with many clauses can turn into a huge DNF. The step-by-step algebra stops with a message above 2,000 terms, but the minimal DNF is still found from the truth table.

Related tools