Karnaugh Map (K-Map) Calculator

A Karnaugh Map (K-Map) is a grid-based method for simplifying Boolean logic expressions used in digital circuit design — reducing complex combinations of 1s and 0s into the shortest possible algebraic form. Select your number of variables (2–6), enter your minterms and any don't care terms, and choose an output format (SOP or POS) to get the simplified Boolean expression. Secondary outputs include the number of groups, original terms count, and expression reduction percentage.

Comma-separated list of variable names

Output Format *

Comma-separated list of decimal numbers representing true conditions

Comma-separated list of don't care conditions (optional)

Name for the simplified Boolean function

Results

Simplified Boolean Expression

--

Number of Groups

--

Expression Reduction

--

Original Terms Count

--

Results Table

More Electrical & Electronics Tools

Frequently Asked Questions

What are Don't Care conditions in a Karnaugh Map?

Don't Care conditions (represented by X) are input combinations where the output value doesn't matter - it can be either 0 or 1. These provide flexibility in grouping terms to achieve maximum simplification of the Boolean expression.

What is the difference between SOP and POS formats?

SOP (Sum of Products) expresses the function as OR of AND terms, focusing on when the output is 1. POS (Product of Sums) expresses it as AND of OR terms, focusing on when the output is 0. Choose based on which gives a simpler expression.

How do I input minterms for my Karnaugh map?

Enter minterms as decimal numbers separated by commas (e.g., 0,1,3,7). Each number represents a row in the truth table where the output should be 1. For a 3-variable map, valid minterms are 0-7.

What's the maximum number of variables supported?

The calculator supports Karnaugh maps for 2 to 6 variables. Maps with more than 4 variables become complex to visualize but can still be solved using the Quine-McCluskey method for optimization.

How does the calculator group terms in the K-map?

The calculator automatically identifies the largest possible groups of adjacent 1s (and don't cares) that are powers of 2 in size (1, 2, 4, 8, etc.). These groups minimize the number of literals in the final simplified expression.

Can I use custom variable names instead of A, B, C?

Yes, you can specify custom variable names in the Variable Names field. Enter them as comma-separated values (e.g., X,Y,Z or P,Q,R). The calculator will use these names in the simplified expression.

How accurate is the Boolean expression simplification?

The calculator uses standard Karnaugh map grouping algorithms to find the minimal sum-of-products or product-of-sums expressions. The results are mathematically correct for educational and verification purposes.