Cheatsheet Logic
Boolean operators
"negation" (not \( a \)):
\( a \) | \( \lnot a \) |
---|---|
0 | 1 |
1 | 0 |
"and" also known as "conjunction" (\( a \) and \( b \)):
\( a \) | \( b \) | \( a \land b \) |
---|---|---|
0 | 0 | 0 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 1 |
"inclusive or" also known as "disjunction" (\( a \) or \( b \)):
\( a \) | \( b \) | \( a \lor b \) |
---|---|---|
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 1 |
"exclusive or" (\( a \) xor \( b \)):
\( a \) | \( b \) | \( a \oplus b \) |
---|---|---|
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 0 |
"implication" (if \( a \), then \( b \)):
\( a \) | \( b \) | \( a \Rightarrow b \) |
---|---|---|
0 | 0 | 1 |
0 | 1 | 1 |
1 | 0 | 0 |
1 | 1 | 1 |
"iff" also known as "bi-implication" (if and only if \( a \), then \( b \))
\( a \) | \( b \) | \( a \Leftrightarrow b \) |
---|---|---|
0 | 0 | 1 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 1 |
Derivation Rules
negation