Skip to main content

Digital Logic

K-Maps & Minimization

Group power-of-two adjacencies and mark essentials first — K-map questions are pure method marks.

~2 hrs ~1–1.5 marks · Must-score 10 samples · 10 practice · 10 cards

GATE CSE Karnaugh maps — 2/3/4-variable layouts with diagrams, Gray adjacency, grouping, don’t-cares, essential PIs, and exam tricks.

Learning outcomes

  • Draw 2–4 variable K-maps with correct Gray labels and minterm numbers
  • Form legal pairs/quads/octets (including wraps) and read product terms
  • Identify essential prime implicants and a minimal SOP (or POS from 0s)
  • Use don’t-cares legally and apply GATE speed tricks under time pressure

Map structure & Gray labeling

  • Each cell is one minterm. Axes use Gray code so geometrically adjacent cells (including wrap-around) differ by exactly one bit.
  • 2-var: 4 cells; 3-var: 8; 4-var: 16; 5-var: two 4-var maps (often A=0 and A=1).
  • SOP: plot 1s. POS: plot/group 0s (maxterms). Don’t-cares marked X.
  • Always confirm variable order in the stem (AB\CD vs CD\AB changes which index sits where).

Formulas to remember

  • Cells = 2^n for n variables
  • Gray sequence (2 bits): 00 → 01 → 11 → 10
VarsCellsTypical GATE ask
24Minimal SOP / constant
38Group count / expression
416Essentials + don’t-cares
532Two stacked 4-var maps
2-variable Karnaugh map with cells m0 to m3 labeled by A and B
2-variable map — start here until Gray adjacency feels automatic.

3-variable K-map layout

  • Rows: A = 0,1. Columns BC in Gray order 00,01,11,10.
  • Minterm index = binary ABC with A as MSB. Note m2 sits under BC=10, not under “binary counting” column 2.
  • Left↔right wrap: columns 00 and 10 are adjacent (differ only in B).
  • GATE trap: writing m0–m7 left-to-right in decimal order breaks adjacency — always use Gray columns.

Formulas to remember

  • Row A=0: m0, m1, m3, m2
  • Row A=1: m4, m5, m7, m6

Worked example

Problem. Where is minterm m6 on a 3-var map (A,BC)?

Solution. ABC=110 → A=1, BC=10 → bottom-right cell (not next to m5 in binary count order).

3-variable Karnaugh map with Gray BC columns and wrap-around adjacency marked
Memorise this 3-var skeleton — most GATE DL maps are 3 or 4 variables.

4-variable K-map layout

  • Rows AB and columns CD both Gray: 00,01,11,10.
  • Toroidal adjacency: left↔right and top↔bottom wraps; also 2×2 corners can form a quad of four corner cells.
  • Learn the number grid (0–15) until you can plot Σm(…) without rebuilding Gray each time.
  • 5-variable tip: fix the MSB on two 4-var maps; a valid group may span corresponding cells on both maps.

Formulas to remember

  • Quad (4 cells) → 2 literals dropped
  • Octet (8 cells) → 3 literals dropped → one literal left on a 4-var map
4-variable Karnaugh map with minterm numbers 0 through 15 in Gray order
Standard GATE 4-var numbering for AB\CD. Drill plotting random Σm lists on this grid.

Grouping rules (pairs, quads, octets)

  • Valid group sizes: 1, 2, 4, 8, … only — never 3, 5, 6, 7 cells as one circle.
  • Shape must be a rectangle in the Gray topology (including wrap and corner quads).
  • Larger group ⇒ fewer literals. Prefer largest groups that still cover all 1s.
  • Cells may belong to multiple groups. Each 1 must be covered at least once; Xs need not be covered.
  • Reading a group: keep literals that are constant inside the group; drop bits that change.

Formulas to remember

  • Group size 2^k ⇒ eliminates k variables
  • Single cell ⇒ n-literal minterm (n = #vars)

Worked example

Problem. F=Σm(0,2,4,5,6). Minimal SOP?

Solution. Quad {0,2,4,6} (wrap) → B′. Pair {4,5} → A C′. Cover complete: F = B′ + A C′.

Grouped 3-variable K-map showing a wrap-around quad for not B and a pair for A not C
Same example drawn: blue wrap-quad = B′; amber pair = A C′.

Essential PIs & don’t-cares

  • Prime implicant (PI): largest legal group that is not contained in a bigger group of 1s/Xs.
  • Essential PI: covers at least one 1 that no other PI covers — must appear in every minimal SOP.
  • Method: mark essentials first, strike covered 1s, then choose a cheapest cover of leftovers (may have alternate minimal SOPs).
  • Don’t-cares (X): may be treated as 1 to grow a group, or left unused. Never invent an X that forces F=1 when the stem leaves it unspecified.
  • POS path: group 0s the same way; each group is a sum term (maxterm product).

Worked example

Problem. Why can two “minimal” SOPs both be correct?

Solution. After essentials, remaining 1s may be covered by different equal-cost non-essential PIs. GATE usually accepts any minimal literal/gate count match.

K-map with ones and a dont-care X used to enlarge a group
X is optional fuel for larger groups — cover every 1, not every X.

GATE exam tricks — K-maps

  • Plot carefully once; most wrong options come from a single misnumbered cell (especially m2/m3 and m6/m7 swap).
  • If options are expressions, expand each to minterms and compare sets — faster than redrawing when stuck.
  • Count literals: pair→drop 1 var, quad→drop 2, octet→drop 3. Mismatch with an option ⇒ wrong grouping.
  • Wrap check: leftmost column adjacent to rightmost; top row to bottom on 4-var maps.
  • Four corners of a 4-var map form a valid quad (AB and CD both change in Gray-adjacent way).
  • Don’t-care present? First minimize without X, then retry with X — if a larger group appears, update; else ignore X.
  • “Minimum number of gates/literals” ⇒ after SOP, also check if POS of 0-groups is cheaper.
  • 5-var rare: only group across maps if the same CD/AB pattern cells are 1/X on both maps.

Formulas to remember

  • Verify cover: union of group minterms = all 1-indices (Xs optional)
  • Essential test: a 1 with only one maximal group through it

Worked example

Problem. Quick check that B′ + A C′ covers Σm(0,2,4,5,6)?

Solution. B′ covers even BC with B=0 → m0,m2,m4,m6. A C′ adds m5 (101). All listed 1s covered; m1,m3,m7 stay 0.

Quine–McCluskey (idea)

  • Tabular twin of K-maps: combine minterms that differ by one bit; dashes mark eliminated variables.
  • Prime implicant chart then picks essentials — same logic as circling essentials on a map.
  • GATE rarely asks a full QM table; use it mentally when a 5–6 variable stem appears or to justify PI lists.

Exam tips

  • Memorise 3-var and 4-var number grids — plotting speed wins marks.
  • Circle essential PIs before optional covering groups.
  • Count literals after grouping to verify minimality against options.
  • Don’t-cares: include only when they enlarge a legal power-of-two group.
  • Watch Gray order: m2 beside m0, m3 beside m1 — not decimal left-to-right.
  • Check wrap-around and 4-corner quads before declaring “no larger group”.
  • If two options look minimal, compare total literals (and whether both cover every 1).
  • For POS answers, regroup the 0-cells — do not negate an SOP blindly under time pressure unless you verify.
Exam pattern · 10 questions

GATE sample questions & answers

10 GATE-style MCQs for K-Maps & Minimization with full explanations. Attempt each question before revealing the answer.

Q1 Group size

Largest power-of-two group on a 4-var map that yields one literal covers:

  • A) 4 cells
  • B) 8 cells
  • C) 16 cells
  • D) 2 cells
Show answer & explanation

Answer: B

8 cells drop 3 variables → one literal. 16 cells ⇒ constant 1.

Q2 Gray adjacency

K-map adjacency uses:

  • A) Binary counting order only
  • B) Gray code
  • C) Random labels
  • D) One-hot only
Show answer & explanation

Answer: B

Gray labeling makes single-bit neighbors adjacent.

Q3 Essential PI

An essential prime implicant:

  • A) May be skipped
  • B) Covers at least one 1 covered by no other PI
  • C) Always a single cell
  • D) Is a don’t-care
Show answer & explanation

Answer: B

Definition of essential PI.

Q4 Don’t-cares

Don’t-cares in K-maps:

  • A) Must always be 1
  • B) May be treated as 1 to enlarge groups
  • C) Must always be 0
  • D) Are illegal in GATE
Show answer & explanation

Answer: B

Optional 1s for grouping only.

Q5 Map size

3-variable K-map has how many cells?

  • A) 4
  • B) 6
  • C) 8
  • D) 9
Show answer & explanation

Answer: C

2^3=8.

Q6 Full cover

Minimal SOP of Σm(0,1,2,3) for A,B is:

  • A) A
  • B) B
  • C) 1
  • D) 0
Show answer & explanation

Answer: C

All four minterms → constant 1.

Q7 Wrap-around

Wrapping edges on a K-map are adjacent because of:

  • A) ASCII order
  • B) Gray code toroidal topology
  • C) Decimal labels
  • D) Randomness
Show answer & explanation

Answer: B

Gray codes wrap so leftmost/rightmost (and top/bottom) differ by one bit.

Q8 Literal count

A quad (4-cell group) eliminates how many variables?

  • A) 1
  • B) 2
  • C) 3
  • D) 4
Show answer & explanation

Answer: B

4=2^2 ⇒ two bits vary ⇒ two literals drop.

Q9 POS maps

POS minimization on a K-map groups:

  • A) 1-cells
  • B) 0-cells
  • C) Only Xs
  • D) XOR marks
Show answer & explanation

Answer: B

Group 0s for product-of-sums.

Q10 Alternate covers

Two different minimal SOP covers can exist when:

  • A) Never
  • B) Non-essential PIs offer alternate coverings
  • C) Only with 2 variables
  • D) Only if F=0
Show answer & explanation

Answer: B

After essentials, remaining 1s may have multiple equal-cost covers.

Topic drill · 10 questions

10 practice questions — K-Maps & Minimization

Extra page-specific practice beyond the GATE samples. Attempt all 10, then reveal answers to check your reasoning.

P1

Cells in a 4-variable K-map:

  • A) 8
  • B) 12
  • C) 16
  • D) 32
Show answer & explanation

Answer: C) 16

2^4=16.

P2

Pair (2 cells) eliminates:

  • A) 0 vars
  • B) 1 var
  • C) 2 vars
  • D) 3 vars
Show answer & explanation

Answer: B) 1 var

One bit changes inside the pair.

P3

F=Σm(0,2) for A,B minimal SOP:

  • A) A
  • B) ¬A
  • C) B
  • D) ¬B
Show answer & explanation

Answer: D) ¬B

m0=00, m2=10 → B=0.

P4

Including an X that is not needed:

  • A) Always wrong
  • B) OK if it helps a larger group of required 1s
  • C) Forces F=1 there always in hardware
  • D) Illegal
Show answer & explanation

Answer: B) OK if it helps a larger group of required 1s

Don’t-care outputs may be 0 or 1.

P5

Prime implicant is:

  • A) Any product term
  • B) Implicant not covered by a larger implicant
  • C) A single literal only
  • D) A maxterm
Show answer & explanation

Answer: B) Implicant not covered by a larger implicant

Standard PI definition.

P6

Minimal expression prefers:

  • A) More terms always
  • B) Fewer terms / fewer literals (cost model)
  • C) Canonical only
  • D) XOR only
Show answer & explanation

Answer: B) Fewer terms / fewer literals (cost model)

GATE usually wants simplest SOP/POS.

P7

5-variable map often drawn as:

  • A) One 8-cell map
  • B) Two 4-variable maps
  • C) Hex cube only
  • D) Truth table only
Show answer & explanation

Answer: B) Two 4-variable maps

Common textbook presentation.

P8

Corner cells of a 4-var map can form a quad if all are 1 because:

  • A) Magic
  • B) They are mutually adjacent via wraps
  • C) They share no adjacency
  • D) Gray fails
Show answer & explanation

Answer: B) They are mutually adjacent via wraps

Four corners are a classic wrap group.

P9

Σm(1,3,5,7) for A,B,C often simplifies to:

  • A) C
  • B) ¬C
  • C) A
  • D) B
Show answer & explanation

Answer: A) C

Odd minterms → C=1.

P10

After essentials, leftover 1s require:

  • A) Ignoring them
  • B) Additional PIs to complete cover
  • C) Only don’t-cares
  • D) POS always
Show answer & explanation

Answer: B) Additional PIs to complete cover

Finish a complete cover of all 1s.

Topic FAQs

Must every 1 be covered?

Yes for a correct SOP cover. Don’t-cares need not be covered.

Why is Gray code used on K-maps?

So that cells that differ by one variable are adjacent (including wraps). Binary counting order would place single-bit neighbors apart.

Can a group wrap around the edges?

Yes. Left–right and top–bottom wraps are legal. On 4-var maps, the four corners also form a valid quad.

How do I know a prime implicant is essential?

If some 1-cell lies in only one largest group, that group is essential and must be in every minimal SOP.

When should I ignore a don’t-care?

When treating it as 1 does not create a larger legal group or does not help cover remaining 1s. Unused Xs simply stay unspecified.

SOP vs POS on the map — which is better?

Try both when the question asks minimum literals/gates. Dense 1s favour SOP; dense 0s often favour POS.

Quick revision · 10 cards

10 flashcards — K-Maps & Minimization

Hover a card to reveal the answer with a 3D flip. On touch devices, tap the card or use Show answer.

Q1 Valid K-map group sizes?
Q2 What is an essential PI?
Q3 How do don’t-cares help?
Q4 Why Gray labels?
Q5 4-cell group drops how many literals?
Q6 8-cell group on 4-var map yields?
Q7 SOP groups which cells?
Q8 POS groups which cells?
Q9 3-var column order for BC?
Q10 Are the four corners of a 4-var map a valid group?