Advanced Boolean Algebra Calculator

Build truth tables from any valid logic expression. Compare minterms, maxterms, and reduced canonical results. Master Boolean structures through checks, downloads, and visual charts.

Calculator Inputs

Use explicit operators such as AND, OR, NOT, XOR, NAND, NOR, and XNOR. Symbols &, |, !, ~, *, +, and ^ are also accepted.

Optional. Missing detected variables are appended automatically.

Example Data Table

Expression Assignments Output Observation
(A AND B) OR NOT C A=1, B=1, C=0 1 Both conjunction and negation paths make the result true.
A XOR B A=1, B=1 0 XOR returns true only when inputs differ.
(A NOR B) NAND C A=0, B=0, C=1 0 NOR becomes 1 first, then NAND with 1 flips to 0.
(A XNOR B) OR C A=1, B=1, C=0 1 XNOR is true when both compared values match.

Formula Used

1. Expression evaluation: The calculator converts the typed expression into Reverse Polish Notation, then evaluates it with a stack for each assignment row.

2. Truth table expansion: For n variables, the calculator generates 2n rows and evaluates the function for every binary combination.

3. Canonical SOP: Sum all minterms where the output equals 1. Each minterm includes every variable once, complemented or uncomplemented.

4. Canonical POS: Multiply all maxterms where the output equals 0. Each maxterm includes every variable once as a sum term.

5. Simplification method: The page reduces minterms and maxterms with a Quine-McCluskey style grouping process, then selects essential implicants for shorter forms.

Useful identities: A XOR B = (A AND !B) OR (!A AND B), A XNOR B = !(A XOR B), and De Morgan rules convert complements of sums and products.

How to Use This Calculator

  1. Enter a Boolean expression with variables such as A, B, C, or D.
  2. Use valid operators and parentheses to control grouping and precedence.
  3. Optionally add manual assignments like A=1, B=0 to test one specific case.
  4. Set a custom variable order if you want a different truth-table sequence.
  5. Click the calculate button to render the result above the form.
  6. Review the output, minterms, maxterms, canonical forms, and reduced forms.
  7. Inspect the truth table and Plotly graph for pattern behavior across all combinations.
  8. Use the CSV or PDF buttons to export the generated table and summary.

Frequently Asked Questions

1. What expressions can this calculator parse?

It accepts identifiers like A, B, C, or X1, parentheses, and operators such as AND, OR, NOT, XOR, NAND, NOR, and XNOR. Common symbols like !, ~, &, |, +, *, and ^ also work.

2. How are truth-table rows ordered?

Rows follow binary counting over the chosen variable order. You can display them in ascending or descending order. The leftmost variable acts like the most significant bit.

3. What are minterms and maxterms?

Minterms are truth-table rows where the function equals 1. Maxterms are rows where it equals 0. They are the basis for canonical SOP and canonical POS forms.

4. Why does the simplified result differ from my original expression?

Different Boolean expressions can represent the same logic function. A reduced expression removes redundant literals or terms while preserving identical output across every truth-table row.

5. What happens if I omit manual assignments?

The calculator still builds the full truth table. For the single-case evaluation badge, any unspecified variables default to 0 so the page can show one current output immediately.

6. Is there a variable limit?

Yes. This page currently supports up to six variables for truth tables and simplification. That keeps the output readable and prevents overly large tables for one-page calculation results.

7. Can I export the results?

Yes. The CSV button exports summary metrics and the truth table. The PDF button creates a report containing the expression details, reduced forms, and table rows.

8. Does the calculator support NAND and NOR directly?

Yes. NAND, NOR, and XNOR are treated as direct operators during parsing and evaluation, so you do not need to manually rewrite them into simpler gates first.

Related Calculators

set operations calculatorbinary multiplication calculatorcode word generatorfibonacci sequence calculatorbinary subtraction calculatorbinary tree calculatorkarnaugh map calculatorbinary number calculatordivisibility calculatorpartial order calculator

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.