quine-mccluskey
quine-mccluskey copied to clipboard
Generating list of don't cares
Hi, i'm not sure if this is already possible with the library, but it would be nice to automatically generate a list of "don't cares". For example, if I have string-encoded inputs
ones = ['010', '001']
zeros = ['110', '101']
And when I simplify the expressions I get
qm.simplify_los(ones) # {'001', '010'}
However, I desire output {'0--'}
based on the above data. At this moment I can achieve this by generating all states that are not inside ones
or zeros
, but it would be nice to have this functionality built in to the library. For example as follows
dc = qm.generate_dc_los(ones, zeros) #
qm.simplify_los(ones, dc) # {'0--'}
Let me know if more people desire this, then I will create a PR :)