Source
Adapted from my own handwritten and hand-typed notes from Year 1 to Year 3 of my EEE degree
Meaning
Sometimes a function is only specified for some input combinations, either because those inputs can never happen or because the output does not matter for them. These rows are don't-care conditions, written as x, X or d.
Notation:
means for rows 1, 2, 5, is undefined for rows 4 and 6, and elsewhere.
Using Don't-Cares on a K-Map
Enter an x in each don't-care square. When grouping, each x may be treated as 1 or 0, whichever helps:
- take x = 1 only when it makes a group larger (fewer literals)
- take x = 0 otherwise and simply leave it out of every group
- never make a group that contains only don't-cares
Rule of thumb: don't care about the don't-cares first. Group the real 1s, then use x squares only to enlarge those groups.
Worked Example
:
| 00 | 01 | 11 | 10 | |
|---|---|---|---|---|
| 0 | 0 | 1 | x | x |
| 1 | 1 | 0 | 0 | 1 |
- with the x at gives (x at 110 used as 1)
- with gives
- the x at 100 is not needed, so it is taken as 0
4-variable example:

Solving a Word Problem
Example: and are 2-bit numbers and when they are equal. The 16-row truth table has only for rows 0000, 0101, 1010, 1111. None of these 1s are adjacent on the K-map, and the result is
where is XNOR. This is the same idea used in magnitude comparators.
Other Minimization Methods
For more than 4 or 5 variables a K-map becomes hard to use. Alternatives are the Variable-Entered Map (VEM) and the tabular Quine-McCluskey method, which follow the same prime implicant idea as Karnaugh Map Minimization.