DeMorgan transformations
From Sidvind
Initial expression | Code | Equivalent expression | Code |
---|---|---|---|
not A and not B | !A && !B | not ( A or B ) | !( A || B ) |
not A and B | !A && B | not ( A or not B ) | !( A || !B ) |
A and not B | A && !B | not ( not A or B ) | !( !A || B ) |
A and B | A && B | not ( not A or not B ) | !( !A || !B ) |
not A or not B | !A || !B | not ( A and B ) | !( A && B ) |
not A or B | !A || B | not ( A and not B ) | !( A && !B ) |
A or not B | A || !B | not ( not A and B ) | !( !A && B ) |
A or B | A || B | not ( not A and not B ) | !( !A && !B ) |