1

I'm trying to analyze some functions with PyEDA. Is there a way to convert expressions in DNF to use XOR operations if it makes them simpler? For example:

>>> import pyeda.inter
>>>
>>> a,b=map(pyeda.inter.exprvar,'ab')
>>> x = a&~b | ~a&b
>>> assert (a^b).equivalent(x)
>>> x.simplify()
Or(And(~a, b), And(a, ~b))

It seems like there should be some way to coerce an expression into a simpler form using XORs, at least for low-complexity expressions.

Jason S
  • 184,598
  • 164
  • 608
  • 970

0 Answers0