Enter or edit a truth table (up to 4 variables). Instantly get Sum of Products (SOP), Product of Sums (POS), minimal boolean expression, and interactive Karnaugh map visualization. Supports don't-care conditions (X) for advanced logic optimization.
A truth table defines the output of a digital logic circuit for every combination of input variables. Converting it into a Boolean expression is a cornerstone of logic design, computer architecture, and digital electronics. This calculator uses two robust minimization techniques: Quine-McCluskey algorithm (exact logic minimization) and Karnaugh map visual grouping — guaranteeing the most simplified Sum-of-Products form.
For a given truth table, the canonical Sum of Products (SOP) consists of minterms (output = 1), while Product of Sums (POS) uses maxterms (output = 0). The minimized expression reduces gate count and improves circuit efficiency.
The tool follows rigorous steps: (1) Parse truth table outputs into minterms (1) and don't-cares (X). (2) Apply Quine-McCluskey tabular method to find all prime implicants. (3) Solve the cyclic covering table using exact minimum cover (branch-and-bound) to produce the minimal SOP expression. (4) Additionally derive canonical SOP/POS for transparency. Each prime implicant corresponds to a product term where eliminated variables are those that differ within the group.
Engineers frequently use truth-table minimization to design BCD to 7-segment decoders. By inputting the desired output patterns for digits 0-9, our calculator quickly yields minimal logic equations, reducing the number of gates in embedded systems. The don't-care conditions (invalid BCD inputs above 9) further simplify the circuit.
Karnaugh maps provide fast visual minimization for up to 4 variables, while Quine-McCluskey is algorithmic and can be extended to more variables (here limited to 4 for interactive clarity). Our implementation combines both: the K-map visual reflects the same prime implicants derived by the algorithm, ensuring consistency.
| Function | Truth Table (3 inputs) | Minimized Expression |
|---|---|---|
| Majority Vote | Output=1 when at least two inputs are 1 | AB + AC + BC |
| Full Adder Sum | Sum = A ⊕ B ⊕ Cin | A'B'Cin + A'BCin' + AB'Cin' + ABCin |
| Don't-care example | Output=1 for 0,2,5; X for 6,7 | B'C' + A'C |