# 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? –  user159676 Jun 23 '14 at 15:09
@user, I outlined that below. Don't Care conditions simplify design but such states become undefined. –  sherrellbc Jun 23 '14 at 15:12
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. –  Ignacio Vazquez-Abrams Jun 23 '14 at 15:23
@IgnacioVazquez-Abrams, you got me. I was speaking in terms of undefined by design intent. –  sherrellbc Jun 23 '14 at 15:40

"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 appropraite 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 (max terms?), it becomes a 1. This of course is also true for don't care conditions and grouping with 0s (min terms?). I don't recall exactly the terminology used to describe the groups.

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.

-
+1 for the "use different letters" thing. –  Vladimir Cravero Jun 23 '14 at 15:52