Don’t-Care Conditions in K-Maps
Updated 2026-11-22 · 6 min read
A don’t-care is an input whose output you are free to choose. Used well, don’t-cares turn small groups into large ones and remove whole terms from the answer.
The one rule
Treat each X as a 1 if that makes a group larger, and as a 0 otherwise. Never draw a group to cover Xs alone, and never feel obliged to cover an X.
Worked example: “BCD digit ≥ 5” detector
A circuit receives a BCD digit ABCD (A is the most significant bit) and outputs 1 when the digit is 5 or more. Only the codes 0 to 9 can occur, so the six codes 10 to 15 are don’t-cares:
F = Σm(5, 6, 7, 8, 9) + d(10, 11, 12, 13, 14, 15)
- A: group of 8 (m8, m9, m10, m11, m12, m13, m14, m15), essential. A = 1 in every cell; B, C, D change inside the group and drop out.
- BC: group of 4 (m6, m7, m14, m15), essential. B = 1, C = 1 in every cell; A, D change inside the group and drop out.
- BD: group of 4 (m5, m7, m13, m15), essential. B = 1, D = 1 in every cell; A, C change inside the group and drop out.
Result: F = A + BC + BD, 3 terms and 5 literals. Open this example in the solver.
The bottom two rows (A = 1) contain m8, m9 and six Xs: together they make a group of eight, A. The pairs m5–m7 and m6–m7 grow into quads by borrowing m13, m15 and m14, m15, giving BD and BC.
The same function without don’t-cares
If the Xs are forced to 0, the groups stay small:
- AB'C': group of 2 (m8, m9), essential. A = 1, B = 0, C = 0 in every cell; D changes inside the group and drops out.
- A'BC: group of 2 (m6, m7), essential. A = 0, B = 1, C = 1 in every cell; D changes inside the group and drops out.
- A'BD: group of 2 (m5, m7), essential. A = 0, B = 1, D = 1 in every cell; C changes inside the group and drops out.
Result: F = AB'C' + A'BC + A'BD, 3 terms and 9 literals. Open this example in the solver.
Using the don’t-cares cuts the answer from 9 literals (three 3-literal terms) to 5 (A + BC + BD). The circuit gets smaller for free, because the inputs on which the two versions differ never occur.
Don’t-cares in a POS
For the product of sums, group the 0s (m0 to m4) with whichever Xs help. m0 to m3 form the sum term (A + B). m4 can pair with m0, giving (A + C + D), or with the don’t-care m12, giving (B′ + C + D). So there are two equally minimal POS answers, (A + B)(A + C + D) and (A + B)(B′ + C + D).
The second one treats m12 as a 0, while the SOP A + BC + BD treats it as a 1. That is legitimate: the SOP and the POS are free to give an X different values, because input 12 never occurs.
Tips
- List don’t-cares separately (d or D) when you enter a function into a solver; mixing them into the minterm list forces them to 1.
- An X is worth using only when it fills the gap that keeps a group of 1s from doubling. Look at the 1s around each X (remember the edges wrap), not at where the X sits on the page.
- Check your design on the real inputs only; on don’t-care inputs any output is acceptable.
Frequently asked questions
What is a don't-care condition?
An input combination for which the output does not matter, either because it can never occur or because nobody looks at the output when it does. It is written X (or d, or –) in the truth table and K-map, and listed separately: F = Σm(…) + d(…).
Do don't-cares have to be covered?
No. Unlike a 1, an X never needs to be inside a group. Include it only when it lets a group of 1s grow; leave it out otherwise.
Can a don't-care be 1 in the SOP and 0 in the POS?
Yes. Each minimization chooses the values that suit it, so the minimal SOP and the minimal POS of the same incompletely specified function can treat an X differently. The two circuits then differ on the don’t-care inputs, which is fine because those inputs never matter.
Where do don't-cares come from?
Unused codes (BCD uses only 10 of the 16 four-bit patterns), unreachable states in a state machine, input combinations that are physically impossible (two mutually exclusive sensors both on), and outputs that are ignored in some modes.
Related tools and guides
- K-map grouping rules The rules for grouping cells in a Karnaugh map: powers of two, rectangles, wrap-around edges and corners, overlap, largest groups, fewest groups.
- How to solve a K-map How to solve a Karnaugh map in 6 steps, with worked 3- and 4-variable examples, a cyclic map with two answers, and the mistakes that cost marks.
- K-map solver Free K-map solver for 2 to 6 variables: enter cells, minterms, a truth table or an expression, add don't-cares, and get every minimal SOP and POS with steps.
- 4-variable K-map Solve a 4-variable Karnaugh map (AB, CD) with don't-cares. Cell numbering, edge and corner groups, worked examples and all minimal answers.