A don’t-care condition is an input combination for which the function’s output value doesn’t matter — either because the input can never occur, or because nothing downstream cares what comes out for it. Don’t-cares are flexible: in a Karnaugh Map you can treat each one as or , whichever makes simplification easier.

Marked as (or sometimes ) in the K-map cell. A function that has any don’t-care conditions is called incompletely specified.

Why they exist

Two common reasons:

  1. Impossible inputs. Some input combinations physically can’t happen given how the circuit is wired up. The classic example is BCD (binary-coded decimal) — only through are valid digits. Combinations through never appear, so the output for those rows is a don’t-care.

  2. Outputs nobody reads. Maybe an output is only sampled when an enable signal is high; for the cycles when enable is low, the output is unobserved. You can let it be whatever’s cheapest to produce.

Either way, you get free flexibility to choose the output that simplifies the circuit.

How to use them

When grouping s on a K-map for an SOP solution, include don’t-cares in groups when doing so makes a group bigger (so it covers more, and the resulting product term has fewer literals). Skip a don’t-care if including it doesn’t help.

The same flexibility works for POS — include don’t-cares in groups of s when convenient.

For a BCD-input circuit, suppose we want to be 1 for digits 0, 2, 4, 6, 8 (the even decimal digits). The 4-variable K-map then has minterms at , zeros at the other valid BCD codes, and don’t-cares () at :

Karnaugh map (rows = , columns = , both in Gray-code order):

\ 00011110
001001
011001
11dddd
1010dd

Treat the cells in the bottom rows as 1s. Now the entire column reads as 1 (or don’t-care). One eight-cell group covers it: . Without the don’t-cares, the same minterms would simplify only to or similar two-term forms. Don’t-cares cut it to a single literal.

[Note: this matches the standard convention for BCD don’t-cares. If your course taught it differently, defer to your course materials.]

What you don’t get

Don’t-cares aren’t free in real hardware — the gate still produces some output for every input, even the impossible ones. The flexibility is purely in which output you let it produce. If an “impossible” input ever sneaks through (a fault, an unexpected timing race), the don’t-care output is whatever your simplification happened to leave it as. So in safety-critical designs, you may not actually want to take advantage of don’t-cares: pinning unspecified outputs to can be more predictable, even if more expensive.

For most undergraduate-level designs, exploit them freely — the K-map savings can be substantial.