Don't-care conditions
Some input combinations can never happen. Marking them "don't-care" is free freedom — it lets your K-map groups grow bigger and your circuit get smaller.
Built from first principles.
Before you start
What you need first
- Karnaugh maps — filling the grid and grouping the 1s.
What you'll be able to do
- Recognise a don't-care row and mark it
X. - Use Xs in a K-map to grow groups — without being forced to cover them.
- Simplify a real example (BCD "is it even?") to one literal.
Free freedom
In many designs some input combinations cannot occur, or their output
genuinely doesn't matter. Those rows are don't-cares,
written X. Common reasons:
- Physically impossible — e.g. two interlocked switches that can't both be on.
- Invalid by spec — e.g. BCD digits use only 0000–1001; 1010–1111 never appear.
- Ignored — the output is only read when some other enable is active.
X as either 0 or 1,
whichever helps. Don't-cares often let groups grow much larger.Using don't-cares in a K-map
- Plot all 1s, 0s, and Xs from the truth table.
- When grouping, you may include any X that makes a group bigger.
- You are not forced to cover every X — use only the ones that help.
- Never make a group of only Xs — that adds a term for no benefit (the output never has to be 1 there).
"Is this BCD digit even?"
Inputs A B C D are a 4-bit number. F = 1 if the digit is a valid BCD digit
(0–9) and even (0, 2, 4, 6, 8). The codes 1010–1111 are invalid BCD →
don't-cares.
| AB \ CD | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 00 | 1 | 0 | 0 | 1 |
| 01 | 1 | 0 | 0 | 1 |
| 11 | X | X | X | X |
| 10 | 1 | 0 | X | X |
Blue = the two D = 0 columns (CD = 00 and 10), using the helpful Xs → one group of 8
The 1s (even digits 0,2,4,6,8) all have D = 0. Treating the Xs in those
two columns as 1 makes the whole D = 0 half a single group of 8. A, B, C all
vary and drop; only D stays.
D = 0.
The don't-cares turned a messy function into one inverter.✏️ Try it yourself
(a) What symbol marks a don't-care row? (b) Must every X be covered by some group? (c) Why is a group made only of Xs useless? (d) Name one real situation that creates don't-cares.
X.
(b) No — use an X only if it grows a group; otherwise ignore it.
(c) the output never has to be 1 there, so an all-X group just adds a term for nothing.
(d) e.g. invalid BCD codes 1010–1111, or two switches that can't both be pressed.
Recap — the whole topic on one screen
| Idea | What you own now |
|---|---|
| Don't-care | a row that can't occur / doesn't matter, marked X |
| Freedom | treat each X as 0 or 1, whichever helps grouping |
| Discipline | don't cover Xs you don't need; never an all-X group |
| Payoff | bigger groups → fewer literals → smaller circuit |