Logo
All chapters
Volume II: Digital Logic  ›  Gate-Level Minimization

Four-Variable K-Map

A grid that turns a truth table into the simplest possible logic expression.

PrevThe Map Method
NextProduct-of-Sums Simplification

Description

A 4×4 grid arrangement of a 4-variable truth table that exposes adjacencies visually. Grouping adjacent 1s yields a minimal sum-of-products faster and more reliably than algebra. Place 1s/×s, then cover them with the fewest largest power-of-two rectangles.

  • Cells are arranged so neighbors differ in exactly one variable (Gray code).
  • Group adjacent 1s in powers of two (1, 2, 4, 8, 16) — bigger groups = simpler terms.
  • A variable that changes inside a group drops out of that product term.
  • Cells marked × can be treated as 0 or 1 — whichever yields larger groups.
  • Use them to simplify further, never to cover a required minterm twice needlessly.
  • What: A 4×4 grid arrangement of a 4-variable truth table that exposes adjacencies visually.
  • Why: Grouping adjacent 1s yields a minimal sum-of-products faster and more reliably than algebra.
  • How: Place 1s/×s, then cover them with the fewest largest power-of-two rectangles.
  • Where: Hand design of small combinational blocks and exam/interview minimization problems.
  • When: Up to ~4–5 variables; beyond that, switch to Quine–McCluskey or a tool.

At a glance

What

A 4×4 grid arrangement of a 4-variable truth table that exposes adjacencies visually.

Why

Grouping adjacent 1s yields a minimal sum-of-products faster and more reliably than algebra.

How

Place 1s/×s, then cover them with the fewest largest power-of-two rectangles.

Where

Hand design of small combinational blocks and exam/interview minimization problems.

When

Up to ~4–5 variables; beyond that, switch to Quine–McCluskey or a tool.

Think of it like…

Like grouping photos that are almost the same so you can caption a whole batch with one line — each doubling of the batch drops one more detail you no longer need to mention.

How grouping works

  • Cells are arranged so neighbors differ in exactly one variable (Gray code).
  • Group adjacent 1s in powers of two (1, 2, 4, 8, 16) — bigger groups = simpler terms.
  • A variable that changes inside a group drops out of that product term.

Don't-cares

  • Cells marked × can be treated as 0 or 1 — whichever yields larger groups.
  • Use them to simplify further, never to cover a required minterm twice needlessly.

Group size → literals eliminated

Cells groupedVariables removedLiterals in term (of 4)
104
213
422
831
1640 (term = 1)

Each doubling of a group removes one more variable.

K-map (auto-minimized)

▶ live simulator

Click a cell to cycle 0 → 1 → don't-care (×). Minimized SOP updates live.

CD →
AB ↓
00011110
00
01
11
10
F = C' + A'D' + BD'

3 prime implicants · verified by Quine–McCluskey

The 5 Whys

  1. 1

    Why use a K-map? To minimize logic without error-prone algebra.

  2. 2

    Why minimize? Fewer product terms mean fewer gates.

  3. 3

    Why is the map reliable? Gray coding makes logical adjacency physical adjacency.

  4. 4

    Why group powers of two? Only those groupings let a full variable cancel.

  5. 5

    Root cause: visual adjacency turns Boolean combining (AB + AB′ = A) into spotting rectangles.

Cheat sheet

Working principle

  • Place 1s/×s, then cover them with the fewest largest power-of-two rectangles.
  • A 4×4 grid arrangement of a 4-variable truth table that exposes adjacencies visually.

Formulas & Boolean expressions

  • Group adjacent 1s in powers of two (1, 2, 4, 8, 16) — bigger groups = simpler terms.

Key facts

  • Cells are arranged so neighbors differ in exactly one variable (Gray code).
  • Cells marked × can be treated as 0 or 1 — whichever yields larger groups.

Why it exists

  • Root cause: visual adjacency turns Boolean combining (AB + AB′ = A) into spotting rectangles.
PrevThe Map Method
NextProduct-of-Sums Simplification