# Finding number of don't care conditions

I'm new to these forums and have very little background in electrical engineering.

I'm trying to figure out the number of "don't care conditions" based on an input of two numbers, each 0-9, for designing a digital system to implement the multiplication table. The output would be the product of the two numbers.

I don't have a very good understanding of what "don't care conditions" are. My understanding is that they are based on inputs that are "unlikely".

Are the number of don't care conditions 9(since we "don't care" about the product of any number and zero)?

Each of your inputs would be represented by four bits - but four bits can represent 15 different values. You would be interested in the bit patterns that represent values from 0 to 9, but would not be interested in those that represent values of 10 - 15, as those shouldn't exist in your inputs. Those values or bit patterns would be your "don't care" conditions.

Related (but perhaps too advanced for you): When do truth tables use the "don't care" term?

Don't-care conditions normally describe illegal combinations of inputs. In your example, you're only allowing numbers from 0-9, but you need four bits to hold those numbers. That means it's possible to represent inputs from 10-15 as well. Since you don't want to allow those inputs, you say that the output for those conditions is a don't-care -- it can be any number. This allows you to use the simplest logic that generates correct outputs for the valid inputs.

In your example, you'd have a don't-care output whenever either input is 10 (1010), 11 (1011), 12 (1100), 13 (1101), 14 (1110), or 15 (1111). By my count, that's 6 x 16 don't-cares for the first input plus another 6 x 10 for the second, which gives 6 x 26 = 156 don't-cares.

Sometimes don't-cares are used for inputs. This is a kind of shorthand that means the input has no effect on the output. For example, you could give the truth table for an AND gate like this:

A B   A*B
0 X   0
X 0   0
1 1   1


See the answer I linked above for a more complex example using a multiplexer.