DeMorgans Law
DeMorgan's Law
if ! found_x && ! found_y; then # FAIL fi if !(found_x || found_y); then # FAIL fi
Rule
NOT(A AND B)
NOT(A)
OR
NOT(B)
NOT(A OR B)
NOT(A)
AND
NOT(B)
Implications
When neither A
nor B
is FALSE
, A AND B
condition cannot be met
- Only when
A
isFALSE
AND
B
is alsoFALSE
,A
OR
B
will beFALSE