Printer Friendly
The Free Dictionary
982,853,586 visitors served.
?
Dictionary/
thesaurus
Medical
dictionary
Legal
dictionary
Financial
dictionary
Acronyms
 
Idioms
Encyclopedia
Wikipedia
encyclopedia
?

DeMorgan's theorem

   Also found in: Wikipedia 0.01 sec.
(logic)DeMorgan's theorem - A logical theorem which states that the complement of a conjunction is the disjunction of the complements or vice versa. In symbols:

not (x and y) = (not x) or (not y) not (x or y) = (not x) and (not y)

E.g. if it is not the case that I am tall and thin then I am either short or fat (or both). The theorem can be extended to combinations of more than two terms in the obvious way.

The same laws also apply to sets, replacing logical complement with set complement, conjunction ("and") with set intersection, and disjunction ("or") with set union.

A (C) programmer might use this to re-write

if (!foo && !bar) ... as if (!(foo || bar)) ...

thus saving one operator application (though an optimising compiler should do the same, leaving the programmer free to use whichever form seemed clearest).

?Page tools
Printer friendly
Cite / link
Email
Feedback
? Mentioned in
 
Encyclopedia browser? ? Full browser
 
 
Encyclopedia
?

Disclaimer | Privacy policy | Feedback | Copyright © 2008 Farlex, Inc.
All content on this website, including dictionary, thesaurus, literature, geography, and other reference data is for informational purposes only. This information should not be considered complete, up to date, and is not intended to be used in place of a visit, consultation, or advice of a legal, medical, or any other professional. Terms of Use.