Don’t-care condition: meaning and examples
A don't-care condition is an input combination that never occurs, or whose output nobody needs, so the designer may treat its cell as 1 or 0, whichever gives a larger group. On the engine's map, don't-cares come only from stated assumptions.
In a truth table a don't-care is marked X or d, and in minterm notation it is listed separately, as in Σm(…) + d(…). The classic source is an encoding with unused codes: four bits can hold sixteen values, but a decimal digit uses only ten, so six combinations never arrive. Treating those cells as 1 when that enlarges a group, and as 0 otherwise, yields a shorter expression that agrees with the specification on every combination that can actually occur, and nothing is promised about the rest.
The artefact on this page is the BCD rule Σm(D, C, B, A; 6, 7, 8, 9) under the assumption NOT (D AND (C OR B)), which says codes 10 to 15 never occur. The map marks 6 cells as don't-care and reports 2 prime implicants; its cover is D OR (C AND B), with the group D taking cells 8 to 15 and the group C AND B taking cells 6, 7, 14 and 15. The result is labelled equivalent within the assumptions, and the scope annotation names assumption k1 as the source of the 6 don't-care cells.
Don't-cares appear wherever a domain has impossible states: unused opcodes, mutually exclusive flags, a banned user who cannot also be a member. They are also where errors hide, because an expression derived with them is wrong on the excluded cells if the exclusion was wrong. The term is confused with an unknown value and with an input that is simply absent from a formula; a don't-care is a deliberate, stated freedom.
Example
greater_than_five := Σm(D, C, B, A; 6, 7, 8, 9) · output
Assumptions: NOT (D AND (C OR B)) (The four bits encode a decimal digit 0 to 9 (BCD); codes 10 to 15 never occur.)
Exact checks
Truth table (16 rows)
| # | D | C | B | A | greater_than_five | k1 | Scope |
|---|---|---|---|---|---|---|---|
| 0 | FALSE | FALSE | FALSE | FALSE | FALSE | TRUE | in scope |
| 1 | FALSE | FALSE | FALSE | TRUE | FALSE | TRUE | in scope |
| 2 | FALSE | FALSE | TRUE | FALSE | FALSE | TRUE | in scope |
| 3 | FALSE | FALSE | TRUE | TRUE | FALSE | TRUE | in scope |
| 4 | FALSE | TRUE | FALSE | FALSE | FALSE | TRUE | in scope |
| 5 | FALSE | TRUE | FALSE | TRUE | FALSE | TRUE | in scope |
| 6 | FALSE | TRUE | TRUE | FALSE | TRUE | TRUE | in scope |
| 7 | FALSE | TRUE | TRUE | TRUE | TRUE | TRUE | in scope |
| 8 | TRUE | FALSE | FALSE | FALSE | TRUE | TRUE | in scope |
| 9 | TRUE | FALSE | FALSE | TRUE | TRUE | TRUE | in scope |
| 10 | TRUE | FALSE | TRUE | FALSE | FALSE | FALSE | excluded |
| 11 | TRUE | FALSE | TRUE | TRUE | FALSE | FALSE | excluded |
| 12 | TRUE | TRUE | FALSE | FALSE | FALSE | FALSE | excluded |
| 13 | TRUE | TRUE | FALSE | TRUE | FALSE | FALSE | excluded |
| 14 | TRUE | TRUE | TRUE | FALSE | FALSE | FALSE | excluded |
| 15 | TRUE | TRUE | TRUE | TRUE | FALSE | FALSE | excluded |
Plain-language reading
Beginnergreater_than_five is true exactly when the truth-table row of (D, C, B, A) is one of the rows 6, 7, 8, and 9.
In every other case, greater_than_five is false.
About the operators:
- Σm lists the truth-table rows (minterms) where the formula is true. Rows are numbered from 0 with the first listed input as the most significant bit.
Intermediategreater_than_five is true exactly when the truth-table row of (D, C, B, A) is one of the rows 6, 7, 8, and 9.
In every other case, greater_than_five is false.
Advancedgreater_than_five is true exactly when the truth-table row of (D, C, B, A) is one of the rows 6, 7, 8, and 9 [canonical sum of minterms (DNF)].
In every other case, greater_than_five is false.
Formal notation: Σm(D, C, B, A; 6, 7, 8, 9)
Karnaugh map
- cells m8, m9, m10, m11, m12, m13, m14, m15
D - cells m6, m7, m14, m15
C AND B
6 cells excluded by the confirmed assumptions (k1) are marked don't-care. An expression derived with them is equivalent only within the assumptions.
The common slip
Treating a don't-care as a promise that the output is 0 there. D OR (C AND B) is true on cells 10 to 15, which the specification never mentions; it is correct only because those codes are assumed never to occur. Feed it code 12 and it answers TRUE.
Questions
Why does the engine refuse to guess don't-cares?
Because a don't-care is a claim about the domain, not about the function, and only the author can make it. The map marks a cell don't-care only when a stated assumption proves it unreachable, and then labels the result as equivalent within those assumptions.
Related
Guides
Practice
- Karnaugh map exercises with answers: 2 variables
- Karnaugh map exercises with answers: 3 variables
- Karnaugh map exercises with answers: 4 variables
See also
- Assumption (domain constraint): meaning and examples
- Karnaugh map (K-map): meaning and examples
- BCD digit greater than five: four-variable K-map with don’t-cares
- Karnaugh map solver: 2 to 4 variables, groups, SOP and POS, don’t-cares from assumptions
- Inconsistent assumptions make every test pass
- Karnaugh map grouping rule: adjacent cells drop the variable that changes
Glossary
Generated from the Tangibool engine, semantics tangibool-semantics/1, engine 1.0.0, build . Every table, map, simplification and verdict on these pages was computed by the Tangibool engine when the site was built, and every claim was re-checked by the same exact checker the app uses. Limits are stated where they apply. © 2026 Foreranger LTD.