# Karnaugh Maps - What is the purpose of a "don't care" condition?

I've got a problem and was stuck for whole day..

I'm designing an octal to 7 segment common cathode decoder which only octal digits 2 to 7 are applied to the inputs of the decoder so combination for digits 0 and 1 are never applied.

I understand that X don't care conditions can be 1 or 0

For my input A

But When i tried to set input A, it lights up when 1 is switched on?

I just wanted it to show 2,3,4,5,6,7 digits only

What's the purpose don't care conditions?

• If you want the display to be blank for digits "0" and "1", then you "care" what the segment's outputs are (all 0); therefore you have no "don't cares". Your table does not match your desired behavior.
– Tut
Jun 23 '14 at 14:55
• Then what is the point of don't care condition for this case? Is it because i have the choice to pick either 1 or 0 but i taught don't care condition is to simplify more further? Jun 23 '14 at 15:09
• There is no such thing as "undefined behavior" in an implementation, only in a specification. All behavior in an implementation must be defined, even if it is degenerate. Jun 23 '14 at 15:23
• @IgnacioVazquez-Abrams, you got me. I was speaking in terms of undefined by design intent. Jun 23 '14 at 15:40
• @IgnacioVazquez-Abrams: Genuinely-undefined behaviors can exist in asynchronous logic that includes feedback loops. Consider the circuit X=Y nand (A nand E); Y=X nand (B nand E). If A, B, and E are all high, both X and Y will be high. If A goes low and then E, X will go low and stay low while Y stays high. If B goes low and then E, Y will go low and X stay high. If E goes low first, however, circuit behavior will be undefined. Jun 25 '14 at 14:50

"Don't Care" conditions still exist in your design, you are just saying that you don't care what happens when this input set occurs. When you map the resulting truth table and perform appropriate grouping (either 1s or 0s), you effectively establish what the don't care outputs will be.

Namely, if you group a don't care condition with 1s (minterms), it becomes a 1. This of course is also true for don't care conditions and grouping with 0s (max terms).

For example, your input C'B'A is now a 1 since you have grouped it as such. The point of this is to relax restrictions on the output for states that don't really matter to you so that you have increased freedom when mapping.

You must either establish what happens when this undesirable input occurs (i.e. turn the segment off by driving all LEDs off), or ensure that such input combinations never occur in your product as it will elicit undefined behavior.

Whenever input A is set to 1 you want output A to light as shown in the diagram below. There's nothing wrong with output A lighting because the diagram shows that's exactly what you want.

The reason output A is a don't care for 001 is because you stated you will never have 001 as an input. In your testing, you see that output A is lit when input A is set to 1 because that's exactly the functionality you're after.

The purpose of the don't care is to simplify the amount of logic you need. Which it has done here. You don't have to special case output A to worry about whether B and C are set when A is set. For input A, output A only cares about what input A is.

If you cared about 001, then your output logic for output A would be:
A = B + CA
Rather than:
A = B + A
You would need an extra AND gate for C*A. Having that don't care reduces the amount of gates you need to get your output properly.

Lastly, it would be a bit less confusing if you used a different naming convention between input and output. Something like input = XYZ and output = ABCDEFG or input = ABC and output = abcdefg.

By marking don't care terms in your Karnaugh map you can decide, when using the map to simplify you logic, to either have them as 1 or 0 - whichever would produce the simpler logic expression. If you unnecessarily constrained them to be either 1 or 0 you would not have that flexibility.