Don't-Care Conditions
Up to now every cell in the map has been a 0 or a 1. Real circuits have a third case: input combinations that cannot occur, so their output genuinely does not matter.
These are don't-care conditions, written X on the map. They are not a shortcut or an approximation. They are a statement that the specification never says what should happen for that input, which leaves you free to pick whichever answer makes the circuit smaller.
Where they come from
The most common source is a code that does not use its full range.
| Situation | Inputs that never occur |
|---|---|
| Binary-coded decimal: 4 bits holding one decimal digit | 1010 through 1111, since digits stop at 9 |
| A 7-segment display driven from BCD | The same six patterns |
| A one-hot signal where exactly one line is high | Every combination with two or more high |
| A state machine with unreachable states | Any encoding no transition can produce |
In each case the hardware will never see those inputs. Forcing the output to 0 there is a choice, and usually a needlessly expensive one.
Worked example: is the digit 5 or more?
Four bits ABCD carry one BCD digit, so only 0000 through 1001 ever appear. The output should be 1 when the digit is 5 or more, which means minterms 5, 6, 7, 8 and 9.
First, the cautious version. Treat the six impossible inputs as 0, because that feels safe:
F = A'BD + A'BC + AB'C'
5 ones, covered by 3 groups. This grouping is the only minimal one.
That gives A'BD + A'BC + AB'C': 3 terms and 9 literals. Every group is boxed in by the zeros around it.
Now mark those six as don't-cares instead, and watch what the groups do:
F = BD + BC + A
5 ones and 6 don't-cares, covered by 3 groups. This grouping is the only minimal one.
Now it is BD + BC + A: 3 terms and 5 literals. Same circuit behaviour for every input that can actually happen, built from noticeably less logic.
The groups were able to expand into the X cells because nothing stops them there. A group is only illegal if it covers a 0.
The rules
| Cell | Must be covered? | May be covered? |
|---|---|---|
| 1 | Yes, by at least one group | Yes |
| 0 | No | Never |
| X | No | Yes, whenever it helps |
That middle row is the one to internalise. A don't-care is worth including when it enlarges a group, and worth ignoring when it does not. A group made entirely of don't-cares is legal but pointless: it covers nothing that needed covering, and adds a term to your expression for no reason.
The catch
Don't-care means the input cannot occur, not that you have not thought about it. Those are very different claims, and confusing them produces a circuit that behaves arbitrarily on inputs that turn out to be reachable after all.
If a malformed input is merely unlikely rather than impossible, it is not a don't-care. Decide what should happen and write that down as a 0 or a 1. The extra gate is cheaper than the bug.
Try it
This map has don't-cares in it. Group it yourself, then check whether you used them to your advantage.
No groups yet.
5 cells to cover. Bigger groups mean fewer literals, so always take the largest legal group you can.