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 AisFALSEANDBis alsoFALSE,AORBwill beFALSE