-2

For my program, I need to simplify boolean expressions, and I can do this using Quine–McCluskey's algorithm, however the end result only contains NOTs, ANDs, and ORs, but no XORs, and the involvement of XORs is crucial for my program - if the result derived from the algorithm contained an expression that can be converted into an XOR, how would I go about doing that?

Thank you.

flamebull5
  • 17
  • 4
  • To make sure I understand what you’re saying - is your goal to convert an expression made just of AND, NOT, and OR into something as simplified as possible by introducing the XOR connective? – templatetypedef Mar 30 '19 at 03:26

1 Answers1

0

I use:

def xor(x,y):
    return(not (y and x) and not (not(y or x)))
Djaro
  • 31
  • 7