I want to convert truth table to boolean expression : for example , this is the table
a b a+b>0
0 1 1
1 0 1
I want to get the following output: (¬a ^b ) ∨ (a ^¬b)
I am thinking about using replace, :
if (value == str(0)):
table= table(str(value), 'not x')
else:
table= table.replace(str(value), ' x')
it is not correct ,,
how can I replace the value with the column name and then check if the value is 0 or 1 ?
I am using python
How did you use SOPform? I get