5.5 Don't-Care Conditions: Using Unspecified Inputs to Simplify Further
Mark don't-care cells correctly on a K-map using X or d(...) notation, and decide, group by group, whether treating a given don't-care as 1 or 0 produces a smaller minimized expression.
Not every input combination to a real circuit is guaranteed to occur, or the designer may simply not care what the output is for certain combinations — for instance, a circuit driven by a BCD (binary-coded decimal) input only ever receives codes 0000 through 1001, so the six remaining 4-bit patterns (1010 through 1111) can never actually appear at its input. A don't-care condition marks those impossible or irrelevant input combinations in the K-map, and because their output value is unconstrained, the designer is free to treat each one as whichever value (0 or 1) produces the largest, simplest grouping — turning what looks like missing information into an extra degree of freedom for simplification.
Notation: X and d(...)
Don't-care cells are marked with an X directly in the K-map grid, distinct from the 0s and 1s of the fully specified minterms. In algebraic (sum-of-minterms) notation, the set of don't-care input combinations is written using d(...), listed alongside the minterm sum — for example F(A,B,C,D) = Σm(1,3,5) + d(6,7) states that minterms 1, 3, and 5 are required 1s, while combinations 6 and 7 may be treated as either 0 or 1, whichever helps.
The X notation and the d(...) notation describe the same information at two different stages: d(...) is how don't-cares are specified in the function's algebraic description (or truth table), and X is how that same information is drawn onto the K-map grid before grouping begins.
The rule: use a don't-care only when it helps
The rule governing don't-cares is a targeted one, not a blanket policy: use a don't-care cell as 1 when doing so allows a larger valid group to be formed (thereby eliminating more literals), and otherwise simply ignore it (treat it as 0, effectively leaving it out of every group). This decision is made independently, group by group — a single don't-care cell might be folded into one group as a 1 while being irrelevant to (and untouched by) a different nearby group.
Because a don't-care's actual output is never required to be any specific value, there is no correctness penalty either way; the only thing that changes is how compact the final simplified expression turns out to be. This means the grouping procedure for a K-map with don't-cares is otherwise identical to the ordinary procedure — find prime implicants, keep essential ones — except that don't-care cells are candidates for inclusion in any group without being mandatory members of any group.
You do not have to include every don't-care
A common misconception is that every X on the map must end up inside some group, as if don't-cares were a checklist to be cleared. They are not: a don't-care that does not help enlarge any group covering a real (required) 1 should simply be left out of the final grouping and effectively treated as 0. Including a don't-care that provides no benefit does not make the answer wrong, but it also does not help — the only reason to ever fold a don't-care into a group is that doing so genuinely produces a larger, simpler rectangle than would otherwise be possible.
This selective usage is exactly why don't-cares are valuable: they give the designer flexibility to shape groups around the required 1s optimally, using only the specific unconstrained cells that actually help, while disregarding the rest.
Don't-care notation
d(...) lists don't-care minterm indices the same way Σm(...) lists required-1 minterm indices. An X on the grid may end up circled as part of a group (treated as 1) or left uncircled (treated as 0) — the choice is made per group, based on which produces the larger valid rectangle.
On the K-map grid: X (placed in the cell instead of 0 or 1)
In algebraic form: F(A,B,C,D) = Σm(1,3,5) + d(6,7)
^required 1s (must be covered) ^don't-cares (optional, use if helpful)Code Examples
This trace shows the real workflow: first try grouping only the required 1s (which needs two separate 2-literal pairs), then test whether folding a don't-care in as 1 produces one larger group instead. Treating m7 as 1 completes a quad spanning both AB rows and the CD=01/CD=11 columns, in which only A (at 0) and D (at 1) stay constant, collapsing three required minterms and one don't-care into the single 2-literal term A'D. Notice m6 was never needed and is correctly left as 0 (unused), consistent with the rule that you don't have to include every don't-care. Expected result: F(A,B,C,D) = A'D
Only fold in a don't-care (X -> 1) when it completes a larger valid group; otherwise leave it as 0.
Common mistake: Assuming every X must be assigned to 1 'to be safe', instead of testing whether it actually enlarges a group.
F(A,B,C,D) = Σm(1,3,5) + d(6,7)
CD=00 CD=01 CD=11 CD=10
AB=00 [ 0 ] [ 1 ] [ 1 ] [ 0 ] <- m1 (CD=01), m3 (CD=11) required 1s
AB=01 [ 0 ] [ 1 ] [ X ] [ X ] <- m5 (CD=01) required 1; m7 (CD=11), m6 (CD=10) are X
Without using any don't-care: m1,m3 pair (row AB=00) -> term A'B'D ; m1,m5 pair (column CD=01) -> term A'C'D.
Two separate pairs would be needed to cover all three required 1s (m1, m3, m5) this way.
Treating m7 (X) as 1: {m1, m3, m5, m7} forms one valid quad (rows AB=00/AB=01, columns CD=01/CD=11).
Across the quad: A stays 0 constant. B varies (eliminated). C varies (eliminated). D stays 1 constant.
m6 (X) is not needed for this grouping and is correctly left as 0 (unused).
Simplified SOP: F(A,B,C,D) = A'D (one 2-literal quad covers all three required minterms, using don't-care m7)Don't-care cell shown alongside required 1s and 0s
A don't-care (X) is evaluated per candidate group: included only when it enlarges that group.
C=0 C=1
B=0 [ 1 ] [ X ] <- X: don't-care, output unconstrained for this input combination
B=1 [ 0 ] [ 1 ]
If treating X as 1 lets it join the B=0,C=0 cell into a pair (B stays 0, C eliminated) -> use X=1.
If it provides no larger group with any required 1 -> leave X as 0 (unused).Important Rules
Mark unconstrained input combinations with X on the K-map, or with d(...) in algebraic minterm notation.
Treat a don't-care as 1 only when doing so forms a larger valid group than is otherwise possible.
Otherwise, treat the don't-care as 0 and leave it out of every group.
Not every X needs to be circled — an unused don't-care simply contributes nothing and is not an error.
Don't-cares never need to be covered themselves; only the function's required 1s (from Σm) must be covered by the final set of groups.
Classic real-world source of don't-cares: BCD logic
The most common textbook and real-world source of don't-care conditions is binary-coded decimal (BCD) circuitry: a 4-bit BCD digit only ever takes values 0000 through 1001 (decimal 0–9), so input codes 1010 through 1111 are guaranteed never to occur in a correctly functioning system. Any combinational circuit built to process BCD digits — a BCD-to-seven-segment display decoder is the textbook example — can treat those six impossible codes as don't-cares, routinely producing a noticeably smaller and cheaper circuit than would be required if every one of the 16 possible 4-bit patterns had to be given an explicit, defined output.
Circling every X on the map into some group, treating don't-cares as if they were mandatory 1s that must be covered.
Only include a don't-care in a group when doing so enlarges that group; leave the rest as 0 and uncircled.
The spec's tricky problem states this directly: you do not have to include every don't-care condition. Forcing every X into a group can produce an unnecessarily large or even structurally awkward set of groupings without any actual benefit.
Treating a don't-care as a fixed, unknown-but-real value that must be logically consistent across the whole map.
Recognize that different groups may treat the same don't-care differently in the sense that unused don't-cares are simply left at 0, while used ones are folded in as 1 wherever that specific grouping benefits from it.
A don't-care condition means the design specification never requires a particular output for that input, so there is no real 'correct' value being hidden — the designer legitimately chooses whichever assignment minimizes the final expression.
[tricky] Must every don't-care (X) cell on a K-map be included in some group in the final minimized expression? A. No — a don't-care is included only when doing so helps form a larger group; otherwise it is simply left as 0 and ignored B. Yes — every X must be circled, or the simplification is considered incomplete C. Yes, but only in 4-variable maps; 2- and 3-variable maps do not have this requirement D. No don't-care may ever be included in a group; X cells exist only for documentation
A. No — a don't-care is included only when doing so helps form a larger group; otherwise it is simply left as 0 and ignored — The spec's tricky problem is explicit: you do not have to include every don't-care condition. Each X is evaluated independently for whether folding it in as a 1 enlarges a particular group; if it doesn't help, it is left out (treated as 0) with no penalty.
In algebraic minterm notation, what does d(6,7) mean when written alongside Σm(1,3,5)? A. Minterms 6 and 7 are don't-cares: their output is unconstrained and may be treated as 0 or 1, whichever simplifies the expression more B. Minterms 6 and 7 must always be treated as 1 C. Minterms 6 and 7 must always be treated as 0 D. d(...) denotes the derivative of the Boolean function, unrelated to don't-cares
A. Minterms 6 and 7 are don't-cares: their output is unconstrained and may be treated as 0 or 1, whichever simplifies the expression more — d(...) is the standard notation for the don't-care set in a Boolean function specification, listing input combinations whose output is unconstrained — free to be assigned 0 or 1 during minimization, chosen to produce the simplest possible expression.
F(A,B,C,D) = Σm(0,2,4,6) + d(1,3,5,7). Using a K-map, decide which don't-cares (if any) help produce the largest possible group, and give the minimized SOP.
Minterms 0,1,2,3,4,5,6,7 together are exactly the entire A=0 half of the map (all combinations of B, C, D with A=0). Treating every listed don't-care (1,3,5,7) as 1 merges the required 1s and the don't-cares into one full octet-sized block (8 cells, the whole A=0 half), eliminating B, C, and D entirely. Simplified SOP: F(A,B,C,D) = A'.
Required 1s are every minterm where A=0 (m0,m2,m4,m6). Don't-cares are every minterm where A=0 and D is arbitrary... check whether treating all listed don't-cares as 1 lets the entire A=0 half of the map merge into one large group.