1

I am using sympy library. I can compute SOP using min-terms

>>> from sympy.logic import POSform
>>> from sympy import symbols
>>> w, x, y, z = symbols('w x y z')
>>> minterms = [[0, 0, 0, 1], [0, 0, 1, 1], [0, 1, 1, 1], [1, 0, 1, 1], [1, 1, 1, 1]]
>>> dontcares = [[0, 0, 0, 0], [0, 0, 1, 0], [0, 1, 0, 1]]
>>> POSform([w, x, y, z], minterms, dontcares)
And(Or(Not(w), y), z)

I need help in calculating min terms from a Boolean expression.

Pratik
  • 204
  • 2
  • 14

1 Answers1

1

Check the link Simplification and equivalence-testing and under Simplification and equivalence-testing you can find function simplify(). I hope it will help you with your problem.

Damodharan_C
  • 313
  • 1
  • 2
  • 11