Don't-care conditions in K-maps: what X really means
By K-Map Solver · · 3 min read

In this article
A don't-care, written X, is an input combination whose output you are free to choose. It is a gift: the simplifier may treat each X as a 1 when that makes a group bigger, and as a 0 when it does not help. It never has to be covered.
Where don't-cares come from
- Impossible inputs. A BCD digit only uses the codes 0000 to 1001, so 1010 to 1111 never occur.
- Unused states in a counter or state machine.
- Outputs nobody looks at, such as a display that is blanked when the input is invalid.
An example: is the BCD digit greater than four?
The function is 1 for the digits 5, 6, 7, 8 and 9. The codes 10 to 15 are impossible, so they are don't-cares. First look at what happens if we pretend they are plain zeros.
Worked example: sum of products
Without don't-cares the ones cannot grow: three terms and nine literals.
F = Σm(5, 6, 7, 8, 9)
Simplified result
F = A'BD + A'BC + AB'C'
- A'BD — minterms (5, 7)
- A'BC — minterms (6, 7)
- AB'C' — minterms (8, 9)
Now mark 10 to 15 as X. The whole bottom half of the map (A = 1) becomes available, so cells 8 and 9 join a group of eight with the don't-cares and the term collapses to the single letter A. The other two groups grow as well.
Worked example: sum of products
Same function, but the unused codes may help: three terms and only five literals.
F = Σm(5, 6, 7, 8, 9) + d(10, 11, 12, 13, 14, 15)
Simplified result
F = BD + BC + A
- BD — minterms (5, 7, 13, 15), includes don't-care 13, 15
- BC — minterms (6, 7, 14, 15), includes don't-care 14, 15
- A — minterms (8, 9, 10, 11, 12, 13, 14, 15), includes don't-care 10, 11, 12, 13, 14, 15
What the circuit does with the X cells
A circuit built from the simplified expression produces a definite output for every input, including the ones you marked X. Some of them end up as 1 and some as 0, whichever fell out of the grouping. That is fine precisely because you declared that you do not care. It also means a different valid simplification can behave differently on those inputs.
Don't-cares in a product-of-sums answer
When you group zeros for a POS result the roles swap: an X may be treated as a 0 to enlarge a group of zeros, and the ones are what you must not cover. The same function, solved as POS, uses the don't-cares in the opposite direction and can lead to a different but equally correct circuit.