Boolean Function Calculator
Enter a formula or a value vector — get the truth table, PDNF, PCNF, Zhegalkin polynomial, Post classes, minimal DNF and CNF, a Karnaugh map and step-by-step solutions. Everything runs in your browser: no install, no data sent to a server.
How to write functions
Variables are Latin or Russian letters, with or without a numeric index: a, b, x1, X12, abc. Case matters: x and X are different variables, and x2 sorts before x10. Names stick together: ab is a single variable, not a·b.
| Operator | Meaning | How to type |
|---|---|---|
| Negation | NOT | ¬a, !a |
| Conjunction | AND | a ∧ b, a & b, a * b, a • b |
| Disjunction | OR | a ∨ b, a + b |
| Exclusive OR | XOR | a ⊕ b, a ^ b |
| Implication | a implies b | a → b, a -> b, a => b |
| Equivalence | a equals b | a ≡ b, a = b, a <=> b, a ~ b |
| Sheffer stroke | NAND | a ↑ b, a | b |
| Peirce arrow | NOR | a ↓ b |
Precedence: parentheses → negation → conjunction and Sheffer stroke → disjunction and Peirce arrow → XOR → implication → equivalence. Neighbors on the same level associate to the left; implication associates to the right: a → b → c reads as a → (b → c).
You may omit the conjunction sign only next to parentheses: a(b∨c), (a∨b)c, (a∨b)(c∨d). Everywhere else use an explicit sign: a ∧ b. After a negation the sign is required too.
Instead of a formula you can enter a value vector — a string of zeros and ones whose length must be a power of two: 0001, 1 0 1 1 0 1 0 1. Variables then come from the «Variables» button in the toolbar under the input (next to «Keyboard»), which expands on click: eight symbols need three names, e.g. x1, x3, x5. Table rows go from 00…0 to 11…1, the last variable toggles fastest. The full table supports functions of at most 10 variables (1024 rows).
Frequently asked questions
What can the Boolean function calculator do?
From a formula or a value vector the calculator builds a truth table (up to 10 variables, 1024 rows), PDNF, PCNF, the Zhegalkin polynomial, Post classification, minimal DNF and CNF, a Karnaugh map (2–6 variables) and the list of dummy variables. Turn on «Show solution» to see the intermediate steps.
How do I write a formula?
Variables are Latin or Russian letters, with or without a numeric index (a, b, x1, X12, abc); case matters: x and X are different variables. Operators: ¬ (NOT), ∧ (AND), ∨ (OR), ⊕ (XOR), → (implication), ≡ (equivalence), ↑ (NAND), ↓ (NOR). Precedence: parentheses, negation, ∧/↑, ∨/↓, ⊕, →, ≡. Implication associates to the right: a→b→c means a→(b→c). Synonyms are accepted: !, &, *, •, +, ^, ->, =>, =, <=>, ~, |.
How does the calculator differ from the truth table generator?
The truth table generator only builds a table from a formula. The calculator is the fuller tool: on top of the table it adds PDNF, PCNF, the Zhegalkin polynomial, Post classes, minimization, a Karnaugh map, dummy variables and step-by-step solutions. Note: in the calculator the symbol | means NAND (Sheffer stroke), while in the generator it means OR — it has a different, simpler syntax. If you only need the table, the generator is enough; for PDNF, PCNF, the Zhegalkin polynomial or a Karnaugh map, you are on the right page.
Related tools and materials
- Truth table generator — just the table from a formula, with the simple NOT/AND/OR/XOR syntax.
- Logic circuit simulator — build the circuit for your function and test it.
- Number base converter — convert between binary, decimal and hexadecimal.
- From truth table to circuit: SOP and POS — how to build circuits from a table.
- Logic minimization: Karnaugh maps — the theory behind the «Minimization» option.
- Zhegalkin polynomial: any Boolean function as one formula — the theory behind the «Zhegalkin polynomial» block.
- Knowledge library — articles and component datasheets on circuitry.