Boolean Algebra Lab
Type a logic expression and get it all: truth table, exact minimal simplification (Quine–McCluskey SOP/POS), Karnaugh map, a logic-gate diagram, NAND/NOR-only conversions and a binary evaluator. For electronics, digital logic and programming.
How to Use
- Type a Boolean expression with variables A–Z and operators — words (<code>AND OR NOT XOR NAND NOR XNOR</code>) or symbols (<code>& | ! ^</code>, <code>+</code> for OR, <code>'</code> after a variable for NOT, juxtaposition <code>AB</code> for AND).
- The example <code>A AND (B OR NOT C)</code> gives the truth table, simplifies to <strong>AB + AC′</strong>, and draws the gate layout.
- Switch views: <strong>Truth table</strong>, <strong>Simplify</strong> (minimal SOP & POS), <strong>Karnaugh map</strong> (1–4 variables), <strong>Gate diagram</strong>, <strong>NAND/NOR</strong> universal-gate forms, and <strong>Evaluate</strong> (flip each input bit and watch the output).
- Simplification uses the Quine–McCluskey algorithm, so the result is the true minimal sum-of-products — not just a few algebra rules applied.
- Up to 8 variables for truth tables and simplification; Karnaugh maps are drawn for up to 4.
Tools & theory
About the Boolean Algebra Lab
The Boolean Algebra Lab gives you a fast, free answer for electronics and circuit design without sending anything off your device. Type a logic expression and get it all: truth table, exact minimal simplification (Quine–McCluskey SOP/POS), Karnaugh map, a logic-gate diagram, NAND/NOR-only conversions and a binary evaluator. For electronics, digital logic and programming.
How it works
Enter your figures and the result appears instantly, updating the moment you change anything. There is no submit button and nothing to wait for, so it is easy to try a few what-if numbers and compare the results. Just check each box holds the kind of value it expects.
Want the deeper story? The Knowledge Base explains the ideas behind the tools in more detail.
Frequently Asked Questions
What notation can I use?
Mix and match: keywords <code>AND OR NOT XOR NAND NOR XNOR</code>, or symbols — <code>&</code>, <code>·</code> or <code>*</code> for AND (and plain juxtaposition, so <code>AB</code> = A·B); <code>+</code> or <code>|</code> for OR; <code>!</code>, <code>~</code> or a trailing <code>'</code> for NOT (so <code>A'</code> = NOT A); <code>^</code> for XOR. Parentheses group as usual. Precedence is NOT > AND > XOR > OR.
How is the expression simplified?
By the <strong>Quine–McCluskey algorithm</strong> — it finds every prime implicant of the function and selects a minimal cover, giving the provably minimal sum-of-products. That's more reliable than hand algebra or eyeballing a K-map, and it works for any number of variables. The tool also gives the minimal product-of-sums (POS).
What is a Karnaugh map?
A grid that arranges the truth table so that adjacent cells differ by one variable (Gray-code order). Groups of adjacent 1s correspond directly to the simplified product terms, which is why K-maps are taught for hand simplification. This tool draws the map for 1–4 variables and shows the matching minimal SOP.
Why convert to NAND-only or NOR-only?
NAND and NOR are each <strong>functionally complete</strong> — any logic function can be built from just one of them. Real chips (like the 7400 series) come as banks of identical NAND or NOR gates, so designers convert their logic to one gate type to save part count. NOT X is simply X NAND X (or X NOR X). The tool derives the NAND-NAND form from the minimal SOP and the NOR-NOR form from the POS.
What does the gate diagram show?
It draws your expression as a combinational logic schematic — inputs on the left, gates (AND, OR, NOT, XOR, with bubbles for the inverting variants) flowing to the output Q on the right. It mirrors the structure of the expression as written; simplify first if you want the minimal circuit.
Does it run on a server?
No — the parser, truth table, Quine–McCluskey simplifier, K-map, gate renderer and evaluator all run in your browser. Nothing is uploaded and it works offline.
How do I use the Boolean Algebra Lab?
Just type your numbers. The answer shows up right away — there is no button to press. Change anything and it updates by itself.
Does it cost anything or need an account?
No. The tool is completely free, there is no account to create, and it keeps working offline after the page first loads.
Is anything I type uploaded?
No. The tool works entirely on your device, so the values you enter never leave your browser.
Common Use Cases
Digital electronics
Design and minimise combinational logic; convert to NAND/NOR for real chips.
CS & logic courses
Truth tables, K-maps and Quine–McCluskey with the working shown.
Programming
Simplify gnarly boolean conditions in if-statements and guards.
FPGA / HDL
Check and minimise logic before writing Verilog/VHDL.
Circuit debugging
Generate the truth table to verify a gate network.
Teaching
Show how an expression, truth table, K-map and gates relate.
Last updated: