Karnaugh Map Examples

Master Karnaugh maps with step-by-step solved examples for 2, 3, and 4 variables. Learn grouping techniques and Boolean simplification.

2-Variable K-Map Example

Problem: F(A,B) = Σm(1,3)

Step 1: Truth Table

A B F
000
011
100
111

Step 2: K-Map

B=0 B=1
A=0 0 1
A=1 0 1

Step 3: Grouping

Group the two adjacent 1s vertically (column B=1).

Result: F = B

3-Variable K-Map Example

Problem: F(A,B,C) = Σm(1,2,3,5,7)

Step 1: Truth Table

A B C F
0000
0011
0101
0111
1000
1011
1100
1111

Step 2: K-Map Layout

BC=00 BC=01 BC=11 BC=10
A=0 0 1 1 1
A=1 0 1 1 0

Step 3: Grouping Strategy

  • Group 1: Vertical pair (BC=01 column) → A'C + AC = C
  • Group 2: Horizontal pair (A=0 row, BC=11,10) → A'B
  • Individual: Single cell (A=1, BC=11) → ABC

Result: F = C + A'B + ABC

4-Variable K-Map Example

Problem: F(A,B,C,D) = Σm(0,1,2,5,8,9,10)

Step 1: 4-Variable K-Map

CD=00 CD=01 CD=11 CD=10
AB=00 1 1 0 1
AB=01 0 1 0 0
AB=11 0 0 0 0
AB=10 1 1 0 1

Step 2: Optimal Grouping

  • Group 1: Top row (AB=00) → A'B'
  • Group 2: Bottom row (AB=10) → AB'
  • Group 3: Single cell → A'BC'D

Result: F = A'B' + AB' + A'BC'D = B'(A' + A) + A'BC'D = B' + A'BC'D

Advanced K-Map Techniques

Don't Care Conditions

Don't care conditions (X or d) can be treated as either 0 or 1 to achieve maximum simplification.

Example: F(A,B,C) = Σm(1,3,7) + Σd(0,2,5)

Use don't cares strategically to create larger groups and achieve better simplification.

Grouping Rules

  • Group sizes: Must be powers of 2 (1, 2, 4, 8, 16)
  • Shape: Groups must be rectangular
  • Adjacency: Include wrap-around edges
  • Overlap: Groups can overlap
  • Coverage: All 1s must be covered
  • Minimality: Use fewest, largest groups

Common Mistakes to Avoid

❌ Wrong

  • • Diagonal grouping
  • • Non-rectangular groups
  • • Forgetting wrap-around
  • • Missing larger groups
  • • Including 0s in groups

✅ Correct

  • • Horizontal/vertical grouping
  • • Rectangular shapes only
  • • Consider edge wrap-around
  • • Maximize group sizes
  • • Group only 1s and don't cares

Practice Problems

Try These Examples:

  1. Problem 1: F(A,B,C) = Σm(0,2,4,6) - Hint: Look for a pattern
  2. Problem 2: F(A,B,C,D) = Σm(0,1,4,5,10,11,14,15) - Hint: Four groups of 2
  3. Problem 3: F(A,B,C) = Σm(1,2,3,5,6,7) + Σd(0,4) - Hint: Use don't cares

Summary

Karnaugh maps provide a visual method for Boolean function simplification. The key is to identify the largest possible groups of adjacent 1s, following the grouping rules. With practice, K-maps become an intuitive tool for logic optimization and circuit design.