Boolean Logic Tester
Supported operators: AND, OR, NOT, XOR, NAND, NOR, XNOR, ->, <->, parentheses, 1, 0.
Plotly Graph
The graph updates with your selected chart mode.
Truth Table Output
Filtered rows follow your display mode setting.
Example Data Table
| Expression | Variables | True Rows | False Rows | Classification |
|---|---|---|---|---|
| A AND B | 2 | 1 | 3 | Satisfiable |
| A OR B | 2 | 3 | 1 | Satisfiable |
| A XOR B | 2 | 2 | 2 | Contingent |
| A OR NOT A | 1 | 2 | 0 | Tautology |
| A AND NOT A | 1 | 0 | 2 | Contradiction |
Formula Used
A Boolean logic tester evaluates every possible input combination for a given expression. If there are n variables, the truth table contains:
Rows = 2nCore operator rules
AND: P ∧ Q = 1 only when both are 1.
OR: P ∨ Q = 1 when at least one is 1.
NOT: ¬P flips the input value.
XOR: P ⊕ Q = 1 when inputs differ.
XNOR: P ⊙ Q = 1 when inputs match.
Extended operator rules
NAND: ¬(P ∧ Q)
NOR: ¬(P ∨ Q)
Implication: P → Q = ¬P ∨ Q
Equivalence: P ↔ Q = (P ∧ Q) ∨ (¬P ∧ ¬Q)
Classification logic
Tautology: every result is True.
Contradiction: every result is False.
Satisfiable: at least one row is True.
Contingent: both True and False rows exist.
How to Use This Calculator
- Enter a Boolean expression using variable names like A, B, C, or custom names.
- Use operators such as AND, OR, NOT, XOR, NAND, NOR, XNOR, ->, and <->.
- Optionally type a preferred variable order, such as A,B,C,D, to control table columns.
- Choose the table filter, graph mode, row label format, and canonical form visibility.
- Press Test Logic to generate the summary, graph, and truth table.
- Review the result classification, minterms, maxterms, canonical expressions, and row counts.
- Export the full analysis using the CSV or PDF buttons.
- Use the sample buttons when you want to test the calculator quickly.
FAQs
1. What does this Boolean logic tester calculate?
It parses a Boolean expression, detects its variables, generates every valid input combination, evaluates each row, and reports truth counts, classifications, canonical forms, and exportable outputs.
2. Which operators can I use in the expression?
You can use AND, OR, NOT, XOR, NAND, NOR, XNOR, implication using ->, equivalence using <->, parentheses, and constants 1 or 0.
3. What is the difference between satisfiable and contingent?
A satisfiable expression has at least one True output row. A contingent expression has both True and False rows, so it is neither always true nor always false.
4. Why does the table size grow quickly?
Each added variable doubles the number of rows. A formula with n variables needs 2^n evaluations, so complexity increases very fast.
5. What are minterms and maxterms?
Minterms are row indices where the expression evaluates to True. Maxterms are row indices where the expression evaluates to False under the selected variable order.
6. Can I export the truth table?
Yes. The calculator includes CSV export for spreadsheet use and PDF export for reports, study notes, audits, and printable documentation.
7. Does variable order matter?
Yes. Variable order changes column arrangement and row numbering. It also affects minterm and maxterm index labels, so consistent ordering is important.
8. Can this tool help with digital logic study?
Yes. It is useful for circuit design, proof checking, simplification review, gate analysis, classroom practice, and debugging logical conditions in technical work.