Skip to content
BetterDL

2-variable K-map

Also called: two-variable K-map, 2-variable Karnaugh map, 2-variable map, 2x2 K-map

A 2×2 Karnaugh map for a function of A and B, with rows A = 0, 1 and columns B = 0, 1. Its cells are m0 m1 on top and m2 m3 below.

A 2-variable K-map has 2² = 4 cells. In this course rows are A and columns are B:

  • top row (A = 0): m0, m1
  • bottom row (A = 1): m2, m3

With only two labels per axis, binary order and gray code order are the same (0, 1), so there's nothing to reorder.

Adjacency is simple. Each cell has two neighbors: the one beside it and the one above or below. The diagonal pairs, m0 with m3 and m1 with m2, are not adjacent, because they differ in both variables.

Possible groups and their terms:

  • a single cell: a 2-literal term such as
  • a row: one literal, or A
  • a column: one literal, or B
  • all four cells: the constant 1

It is a small map, but it shows every idea of the larger ones in miniature, and it's handy for checking two-variable simplifications at a glance.

A\B01
0
1m0
1m1
1
1m2
0m3

Worked examples

Example

F = Σm(0, 1, 2)

Simplify the function in the map above.

  1. 1.

    m0 and m1 form the top row, where A = 0 → .

  2. 2.

    m0 and m2 form the left column, where B = 0 → .

  3. 3.

    The groups overlap at m0, which is allowed.

  4. 4.

    F = . That's NAND, which is 0 only in row 11. ✓

Example

A map with no groups

Simplify F = Σm(1, 2).

  1. 1.

    m1 (top right) and m2 (bottom left) sit diagonally, so they can't be grouped.

  2. 2.

    Each is a group of one: and .

  3. 3.

    F = , the XOR function. No smaller SOP exists.

Common mistakes

  • Grouping diagonal cells, such as m1 and m2. They differ in both A and B.

  • Forgetting that a whole row or column reduces to a single literal.

  • Mixing up which axis is A. Read the labels: here rows are A and columns are B.

Practice 2-variable K-map

Interactive questions with instant feedback and a worked solution for every wrong answer.

Learn it step by step

2-variable K-map is taught in Karnaugh Maps.