Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

this is probably right forum to post this question

I am currently working on a application where there is a requirement to generate binary combination of input signals in a truth table.

The signal can be either '0' , '1' or 'X' (don't care). The requirement is to generate the input combination dynamically so that all the possible combinations are covered with minimal entries. What makes it difficult is the don't care ('X') condition.

Examples: if we consider 3 bit signal "X X X" covers all combinations and it is the minimal

X | X | X

but if user changes "X X X" to "X X 0" then the application has to insert new entry "X X 1", so that all possible combinations are covered.

X | X | 0

X | X | 1

again if the user changes "X X 0" to "X 1 0", then I have to generate new entry X 0 0

X | 1 | 0

X | X | 1

X | 0 | 0

Now if the user changes entry X 0 0 to X X X then all other entries have to be removed. Ultimately the table should be minimal with all combinations covered.

I have to do this programmatically in Java, is there a mathematical way of doing this?


share|cite|improve this question
In simple words, a way to determine all possible binary input combinations(including don't care values 'X') are covered in a truth table, if not add/remove combinations to make it complete and minimal – Dinesh Oct 12 '12 at 9:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.