How to make logical OR with AND,and NOT?
问题 How to create a logical OR with logical AND, and logical NOT? 回答1: Check De Morgans's laws. You are looking for the Substitution form . P OR Q = NOT( (NOT P) AND (NOT Q) ) 回答2: It's De Morgan's Law: A OR B = NOT ( NOT A AND NOT B ) Truth table for A OR B: A B X 0 0 0 0 1 1 1 0 1 1 1 1 Truth table for the De Morgan equivalent: A B !A !B (!A AND !B) !(!A AND !B) 0 0 1 1 1 0 0 1 1 0 0 1 1 0 0 1 0 1 1 1 0 0 0 1 回答3: Like not (not x and not y) ? 回答4: Pretty simple: A || B = !(!A && !B) 回答5: Using