Digital Logic Revision Tool

Learn to simplify Karnaugh maps without memorizing blind patterns.

This site is built for electronics engineering students who want to see why grouping works, how wrap-around adjacency behaves, and how a minimized SOP expression is formed from a 4-variable map.

Open the Studio

Things to keep in mind

  • Largest valid groups are almost always the right first move.
  • Opposite edges are adjacent because the map wraps around.
  • Overlapping groups are allowed when they reduce literals.
  • Don't-care cells can be used only when they help simplification.

Core Rules

Five habits that make K-map simplification reliable.

01

Read the map in Gray code order

Rows and columns differ by one bit at a time. That is why neighboring cells represent terms that differ in only one variable.

02

Group in powers of two

Valid groups are single cells, pairs, quads, octets, or the full map. Rectangles can wrap across borders, but the area must stay a power of two.

03

Always prefer bigger groups

A larger group removes more variables from the final term. Bigger groups give simpler expressions.

04

Keep only the variables that stay fixed

If a variable changes inside a group, it disappears from that term. If it stays constant, keep it in complemented or uncomplemented form.

05

Use don't-cares strategically

Don't-cares are optional helpers. Include them only if they let you grow a pair into a quad, a quad into an octet, or remove an unnecessary literal.

Interactive Studio

Build your own map and inspect every simplified term.

Inputs

4-Variable Karnaugh Map

Click a cell to cycle through 0, 1, and X.

Rows: AB in Gray order. Columns: CD in Gray order.

1 = minterm included 0 = minterm excluded X = don't care

Worked Examples

Use the presets as quick revision drills.

Starter

Begin with the smallest clean grouping for the active map.

The starter preset adapts to the selected input count so you can practice the first valid grouping on 2 to 6 variables.

Boundary

Practice wrap-around adjacency on the map edges.

The boundary preset shows how the first and last Gray-code rows or columns still count as adjacent on larger maps.

Don't care

Use X values only when they shrink the algebra.

Adding a don't-care to a group can reduce the number of literals in the final answer. If it does not help, ignore it.

Exam-Day Checklist

A clean sequence for solving any 2- to 6-variable Karnaugh map.

1. Mark the 1s and Xs

Translate the minterms into the map using Gray code order. Keep don't-cares visible because they might expand a group later.

2. Search for the largest rectangles first

Look for 32-cell and 16-cell groups before octets, octets before quads, and quads before pairs. This avoids premature small groups.

3. Allow overlap when it removes literals

A cell can belong to more than one group. Overlap is valid when it helps create larger prime implicants.

4. Write one term per group

Keep only the variables that remain fixed inside that rectangle. Drop every variable that changes.

5. OR all terms together

The final simplified SOP expression is the sum of every group term needed to cover all 1-cells.