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)ORNOT(B)
NOT(A OR B)NOT(A)ANDNOT(B)
Implications
When neither A nor B is FALSE, A AND B condition cannot be met
- Only when
AisFALSEANDBis alsoFALSE,AORBwill beFALSE