Optimized Result
Enter your variables and term sets, then submit.
The minimized expression, tables, K map, and exports will appear here.
Calculator Input
Example Data Table
| Case | Variables | Mode | Terms | Don't Cares | Expected Minimized Form |
|---|---|---|---|---|---|
| Sample 1 | 4 | SOP | 0,1,2,5,6,7,8,9,10,14 | 3,11,15 | B' + C + A'D |
| Sample 2 | 3 | SOP | 1,3,5,7 | None | C |
| Sample 3 | 4 | POS | 0,2,8,10 | None | (B + D) |
Formula Used
1. K map grouping rule
Adjacent cells differ by one bit in Gray code order. Valid groups contain 1, 2, 4, or 8 cells, and groups may wrap around edges.
2. SOP minimization logic
For minterms, combine cells containing 1 values and optional don't cares. Each fixed 1 keeps the plain variable. Each fixed 0 keeps the complemented variable.
3. POS minimization logic
For maxterms, group zero cells. Each fixed 1 becomes a complemented variable inside a sum. Each fixed 0 becomes an uncomplemented variable inside a sum.
4. Quine-McCluskey support
This calculator uses binary combination and prime implicant selection to confirm the reduced result. That gives a dependable optimized expression for small K maps.
How to Use This Calculator
- Choose 2, 3, or 4 variables.
- Pick SOP when you have minterms. Pick POS when you have maxterms.
- Enter the target terms using commas or spaces.
- Add optional don't care terms to widen valid groups.
- Press Optimize K Map to generate the result.
- Review the minimized expression, prime implicants, K map, and truth table.
- Use the CSV and PDF buttons to save the output.
Frequently Asked Questions
1. What does this calculator optimize?
It reduces Boolean expressions from minterms or maxterms. The page supports 2, 3, and 4 variables, optional don't cares, prime implicants, a truth table, and a K map view.
2. When should I use SOP mode?
Use SOP when your function is defined by minterms, meaning rows where the output equals 1. The calculator then builds product terms and joins them with plus signs.
3. When should I use POS mode?
Use POS when your function is defined by maxterms, meaning rows where the output equals 0. The calculator groups zero cells and builds summed clauses for the final product.
4. How are don't cares handled?
Don't cares can join helpful groups, but they never force the final output. They simply give the minimizer extra freedom to create larger groups and shorter expressions.
5. Why does the map use Gray code ordering?
Gray code keeps neighboring K map cells one bit apart. That adjacency rule makes simplification valid because each group removes only the variable that changes.
6. Can this replace manual K map practice?
It helps verify manual work and speeds checking. It is also useful for homework review, lab preparation, and testing whether your chosen groups produce the shortest form.
7. Why do some results look different but still work?
Different valid groupings can produce equivalent simplified expressions. If two expressions match the same truth table, both are logically correct even when their written forms differ.
8. What are the export buttons saving?
The CSV file saves the truth table in spreadsheet form. The PDF file saves the main result summary, selected implicants, and truth table in a compact printable report.