How to create a logical OR with logical AND, and logical NOT?
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