K-Map
K-Maps
Logic simplification using Karnaugh Maps (K-Maps)
Imagine you’re studying for exams. Instead of remembering every small detail, you group topics (like formulas, laws, shortcuts). That’s exactly what K-Maps do → group 1’s/0’s to shorten your work
What is a K-Map?
A Karnaugh Map (K-Map) is a graphical method for simplifying Boolean algebra expressions. Instead of using complex algebraic theorems, you can visually solve for the most simplified expression. Think of it as a logic puzzle where you group adjacent terms to eliminate redundant variables.
A K-Map is a grid where each square represents a minterm (a product of all variables, like A⋅B′⋅C) or a maxterm (a sum of all variables, like A+B′+C). The number of squares is 2n, where 'n' is the number of variables in your function.
A 2-variable K-Map has 4 squares (22).
A 3-variable K-Map has 8 squares (23).
A 4-variable K-Map has 16 squares (24).
While you can use K-Maps for functions with more than five variables, it becomes complex and unwieldy, so other methods are often preferred.
How to Simplify a Boolean Expression Using a K-Map
The process is straightforward:
Select the correct K-Map size for the number of variables in your function.
Fill the map: For a Sum of Products (SOP) expression, place a '1' in the squares that correspond to your minterms. For a Product of Sums (POS) expression, place a '0' in the squares that correspond to your maxterms.
Group the terms: Your goal is to make the largest possible groups of adjacent '1's (for SOP) or '0's (for POS). The size of each group must be a power of two (2, 4, 8, etc.). The groups can be squares or rectangles and can wrap around the edges of the map.
Find the simplified term: For each group, find the variables that do not change their value (0 or 1) across all the squares in the group. Any variable that changes is eliminated.
For example, if you group squares where variable 'A' is 0 for some and 1 for others, 'A' is eliminated.
If 'B' is 0 for all squares in the group, the term for the group will include B′.
Write the final expression: Combine all the simplified terms using a 'sum' for SOP (OR gates) or a 'product' for POS (AND gates).
Example: Simplifying an SOP Expression
Let's simplify F(A,B,C)=∑m(0,1,3,5,7).
We need a 3-variable K-Map.
Fill in '1's for minterms 0, 1, 3, 5, and 7.
Grouping:
Notice that the '1's for minterms 1, 3, 5, and 7 form a 4-square group. Within this group, variables A and B change, but variable C is constant at '1'. So, this group simplifies to C.
The '1's for minterms 0 and 1 form a pair. Within this group, variable C changes, but variables A is constant at '0' and B is constant at '0'. So, this pair simplifies to A′B′.
Final Expression: The simplified SOP expression is the sum of these terms: F=C+A′B′
