[an error occurred while processing this directive]

Demorgan's Law

Sometimes it can be confusing to think about boolean expressions with not's and or's.

For example

If the value is not 2 or not 3 then ...
becomes the always true:
     if ((v != 2) || (v != 3)) ...
when we really want:
     if ((v != 2) && (v != 3)) ...

You can always use some tautologies to simplify things.

Demorgan's law

from the meaning of not

[an error occurred while processing this directive]
Sunday, 16-Feb-1997 11:57:15 EST