CleverSphere

Karnaugh maps with don’t-care cells

Don’t-cares are inputs that never occur or whose output does not matter. You may treat them as 0 or 1 and so form larger groups.

Rules

  • An x may join a group but need not
  • Use x only when it makes a group larger
  • Every real 1 must be covered
  • A group made only of x cells is pointless

Your turn

Three problems on this topic. Any equivalent formula counts.

  1. 1 · Don’t-cares
  2. 2
  3. 3

Find the minimal DNF. Cells marked x are don’t-cares: you may treat them as 0 or 1.

AB \ CD00011110
001000
011010
11x10x
1011x1

Minimal DNF (at most 10 literals)

Number of blocks (product terms)

Type formulas like A'B + C, ¬A ∧ B or !A & B. Any equivalent way of writing it counts. The symbol buttons insert a character.

Worked example

Find the minimal DNF. Cells marked x are don’t-cares: you may treat them as 0 or 1.

AB \ CD00011110
00000x
011x00
1110x1
100001

Worked solution

  1. 1Only include x cells where they make a block larger; they need not be covered.
  2. 2Form the largest blocks of 1, 2, 4 or 8 adjacent cells (also across the edge). Prime implicants: ¬B ∧ C ∧ ¬D · ¬A ∧ B ∧ ¬C · B ∧ ¬C ∧ ¬D · A ∧ C ∧ ¬D · A ∧ B ∧ ¬D · A ∧ B ∧ C
  3. 3Smallest selection covering every 1: B ∧ ¬C ∧ ¬D · A ∧ C ∧ ¬D (2 blocks, 6 literals)
  4. 4Result: F = (B ∧ ¬C ∧ ¬D) ∨ (A ∧ C ∧ ¬D)

Typical mistake: Don’t-cares need not be covered. A block made only of x cells is pointless.

Common questions

Where do don’t-cares come from?

In BCD for example: inputs 1010 to 1111 never occur, so their output does not matter.

Related

More topics