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 · Don’t-cares
- 2
- 3
Find the minimal DNF. Cells marked x are don’t-cares: you may treat them as 0 or 1.
| AB \ CD | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 00 | 1 | 0 | 0 | 0 |
| 01 | 1 | 0 | 1 | 0 |
| 11 | x | 1 | 0 | x |
| 10 | 1 | 1 | x | 1 |
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 \ CD | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 00 | 0 | 0 | 0 | x |
| 01 | 1 | x | 0 | 0 |
| 11 | 1 | 0 | x | 1 |
| 10 | 0 | 0 | 0 | 1 |
Worked solution
- 1Only include x cells where they make a block larger; they need not be covered.
- 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
- 3Smallest selection covering every 1: B ∧ ¬C ∧ ¬D · A ∧ C ∧ ¬D (2 blocks, 6 literals)
- 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.
