Two-Variable Karnaugh Map Example | Generated by AI

Home 2025.10

Simple Karnaugh Map Example: 2-Variable Function

Let’s use a very basic 2-variable Boolean function: f(A, B) = A’B + AB’ + AB (sum of minterms m(1, 2, 3)). This is the OR gate: f = A + B, but we’ll “discover” that using a K-map.

Step 1: Construct the K-Map

A 2-variable K-map is a 2x2 grid. Rows for A (0, 1), columns for B (0, 1) in Gray code (already simple). Place 1s for the minterms:

A \ B 0 (B’) 1 (B)
0 (A’) 0 (m0) 1 (m1)
1 (A) 1 (m2) 1 (m3)

Step 2: Group Adjacent 1s

Look for largest groups of 1s (powers of 2: 1, 2, 4…). Adjacent means sharing a side (no diagonals).

(Overlap on m3 is fine.)

Step 3: Derive the Minimized Expression

Each group gives a term:

Minimized: f = A + B

This simplifies from 3 terms (9 literals originally, wait no: 3 terms with 2 literals each) to 2 terms with 1 literal each—fewer gates!

It matches the OR function. For even simpler practice, try all 1s: groups to just 1 (true).

All About Circuits: Karnaugh Maps


Back

x-ai/grok-4-fast

Donate