Created
October 13, 2018 10:47
-
-
Save gladchinda/6b20014bd28efea534e11ce05c677fd5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// NOT Conversion | |
!!A == A | |
!!B == B | |
!!C == C | |
// AND to OR Conversion | |
A && B == !(!A || !B) | |
// OR to AND Conversion | |
A || B == !(!A && !B) | |
// Removing nested AND | |
A || (B && C) == A || B && C | |
// Removing nested OR | |
A && (B || C) == !(!A || !B && !C) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For the last one,
A && (B || C) == !(!A || !B && !C)
, I would addA && (B || C) == !(!A || !B && !C) == A && B || A && C
(boolean algebra).Double negation can be difficult to understand sometimes.