Truth Table & Boolean Logic Solver
Type a boolean expression and get its full truth table instantly, plus the minterms and the canonical sum-of-products form. Supports AND, OR, NOT, XOR, parentheses, and implicit AND like AB. Everything runs in your browser.
How to Use
- Type a boolean expression using your variables (single letters) and operators.
- Use & (or just write AB) for AND, + or | for OR, ! or ~ or a trailing apostrophe for NOT, and ^ for XOR.
- The full truth table builds instantly — true rows are highlighted.
- Read the minterms and the canonical sum-of-products underneath.
- Tap a preset like XOR or the 3-input majority function to see how it works.
& * or just AB · OR + | · NOT ! ~ A′ · XOR ^ · group with ( )
Boolean logic and truth tables
Underneath every digital device is Boolean algebra: a maths of just two values, true (1) and false (0), combined with three core operations — AND (true only if both inputs are true), OR (true if either is), and NOT (flips the value). From those, everything else is built, including XOR (true when the inputs differ). A truth table simply lists every possible combination of the input variables and the resulting output. Because each variable can be 0 or 1, a function of n variables has 2n rows — the table is the complete, exhaustive definition of what the function does.
This solver parses your expression into a syntax tree, then evaluates it for all 2n input combinations to build the table. The same engine powers logic gates, processor instructions, and the validation rules in software — it is the bedrock of computing.
Minterms and sum-of-products
Once you have the table, a powerful trick lets you write the function as a formula. Each row where the output is 1 is a minterm: a single AND of all the variables, each taken plain if it is 1 in that row or complemented (with a prime, A′) if it is 0. OR all the minterms together and you get the canonical sum-of-products — an expression guaranteed to be equivalent to your original. It is the bridge from a desired behaviour (the table) to a circuit (gates). For the 3-input majority function above, the minterms are the four rows with two or more 1s, and their sum-of-products is exactly a circuit you could wire up. Simplifying that expression further — with Boolean algebra or a Karnaugh map — is the next step in digital design, and the canonical SOP is always where it begins.
A use you can try right now
Boolean algebra has laws, and the most famous are De Morgan’s: NOT(A AND B) equals (NOT A) OR (NOT B), and NOT(A OR B) equals (NOT A) AND (NOT B). They are why a NAND gate can build anything, and why you can rewrite a condition to remove a negation. Test one: type !(A & B), note its truth table, then type !A + !B and confirm the columns match exactly. Equivalence proven, no algebra required — that side-by-side check is one of the most useful things a truth table can do.
About this solver
The solver accepts the full set of common notations — symbolic operators, word operators (and / or / not / xor), the apostrophe for complement, and implicit AND by juxtaposition — so you can paste expressions straight from a textbook or a datasheet. It computes the exact truth table, the list of minterms, and the canonical sum-of-products, for up to eight variables. Everything runs on your device with nothing uploaded.
About the Truth Table & Boolean Logic Solver
The Truth Table & Boolean Logic Solver is a free tool for electronics and circuit design. It runs right in your web browser, so there is nothing to download. Type a boolean expression and get its full truth table instantly, plus the minterms and the canonical sum-of-products form. Supports AND, OR, NOT, XOR, parentheses, and implicit AND like AB. Everything runs in your browser.
How it works
Type your numbers into the boxes. The answer shows up right away — you do not have to press a button. If you change a number, the answer changes too. So you can try different numbers and watch what happens, or check an answer you worked out yourself. Just make sure each box has the right kind of number in it.
Want the deeper story? The Knowledge Base explains the ideas behind the tools in more detail.
Frequently Asked Questions
What operators can I use?
AND: &, *, · or simply writing variables next to each other (AB means A AND B). OR: + or |. NOT: !, ~, or a trailing apostrophe (A′). XOR: ^. Plus parentheses for grouping, and the constants 0 and 1. The words and, or, not, xor work too. Precedence is NOT, then AND, then XOR, then OR — use parentheses when in doubt.
What are minterms and sum-of-products?
A minterm is a single row of the truth table where the output is 1, written as a product of all the variables (each either true or complemented). The canonical sum-of-products (SOP) is just the OR of all those minterms — an expression that is exactly equivalent to your input and can be read straight off the table. It is the starting point for designing or simplifying a logic circuit.
How does implicit AND work?
In digital logic it is conventional to write AND by juxtaposition: AB means A AND B, and A(B+C) means A AND (B OR C). This solver understands that, so you can type expressions exactly as they appear in textbooks. You can still use an explicit & if you prefer.
How many variables can it handle?
Up to eight, which is a 256-row table. Each extra variable doubles the number of rows, so beyond eight the table becomes impractical to read — that is a property of truth tables themselves, not a limit of the tool.
How do I use the Truth Table & Boolean Logic Solver?
Just type your numbers. The answer shows up right away — there is no button to press. Change anything and it updates by itself.
Is it free? Does it work without internet?
Yes to both. It is free with no sign-up, and once the page has loaded it keeps working even with no internet.
Where does my data go?
Nowhere — every calculation runs on your own device. Nothing you enter is uploaded, logged, or stored.
Common Use Cases
Check a logic expression
Confirm that two boolean expressions are equivalent by comparing their truth tables — the fastest way to verify a simplification.
Design a logic circuit
Get the minterms and sum-of-products for a desired output, ready to map onto gates or a Karnaugh map.
Study Boolean algebra
See De Morgan's laws, distribution, and absorption play out concretely by typing both sides and comparing.
Verify a digital design
Enter the boolean function of an adder, multiplexer, or decoder output and check every input combination at once.
Last updated: