CE2704 · Digital Logic Design
Theme 3 · Making logic smaller

Don't-care conditions

Some input combinations can never happen. Marking them "don't-care" is free freedom — it lets your K-map groups grow bigger and your circuit get smaller.

Built from first principles.

Before you start

What you need first

  • Karnaugh maps — filling the grid and grouping the 1s.

What you'll be able to do

  • Recognise a don't-care row and mark it X.
  • Use Xs in a K-map to grow groups — without being forced to cover them.
  • Simplify a real example (BCD "is it even?") to one literal.

Free freedom

In many designs some input combinations cannot occur, or their output genuinely doesn't matter. Those rows are don't-cares, written X. Common reasons:

  • Physically impossible — e.g. two interlocked switches that can't both be on.
  • Invalid by spec — e.g. BCD digits use only 0000–1001; 1010–1111 never appear.
  • Ignored — the output is only read when some other enable is active.
The good news: you may treat each X as either 0 or 1, whichever helps. Don't-cares often let groups grow much larger.

Using don't-cares in a K-map

  1. Plot all 1s, 0s, and Xs from the truth table.
  2. When grouping, you may include any X that makes a group bigger.
  3. You are not forced to cover every X — use only the ones that help.
  4. Never make a group of only Xs — that adds a term for no benefit (the output never has to be 1 there).
Rule of thumb: include an X only if it makes the group at least twice as big. Otherwise leave it as 0.
📐 Worked example

"Is this BCD digit even?"

Inputs A B C D are a 4-bit number. F = 1 if the digit is a valid BCD digit (0–9) and even (0, 2, 4, 6, 8). The codes 1010–1111 are invalid BCD → don't-cares.

AB \ CD00011110
001001
011001
11XXXX
1010XX

Blue = the two D = 0 columns (CD = 00 and 10), using the helpful Xs → one group of 8

The 1s (even digits 0,2,4,6,8) all have D = 0. Treating the Xs in those two columns as 1 makes the whole D = 0 half a single group of 8. A, B, C all vary and drop; only D stays.

$$ F = D' $$
An even number always ends in 0 — so "even" is simply D = 0. The don't-cares turned a messy function into one inverter.

✏️ Try it yourself

(a) What symbol marks a don't-care row? (b) Must every X be covered by some group? (c) Why is a group made only of Xs useless? (d) Name one real situation that creates don't-cares.

(a) X. (b) No — use an X only if it grows a group; otherwise ignore it. (c) the output never has to be 1 there, so an all-X group just adds a term for nothing. (d) e.g. invalid BCD codes 1010–1111, or two switches that can't both be pressed.

Recap — the whole topic on one screen

IdeaWhat you own now
Don't-carea row that can't occur / doesn't matter, marked X
Freedomtreat each X as 0 or 1, whichever helps grouping
Disciplinedon't cover Xs you don't need; never an all-X group
Payoffbigger groups → fewer literals → smaller circuit

Next topic · Theme 4

The combinational design method

You can now specify, write, and minimise any logic function. Next we put it to work: the 4-step recipe to design a real combinational circuit — the launchpad for adders, the ALU, and the rest.

→ The combinational design method