demorgan's theorem

Computing Dictionary

DeMorgan's theorem definition

logic
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).
(1995-12-14)

The Free On-line Dictionary of Computing, © Denis Howe 2010 http://foldoc.org
Cite This Source
Explore Dictionary.com
Previous Definition: demoralize
Next Definition: demos
Words Near: DeMorgan's theorem
More from Thesaurus.com
Synonyms and Antonyms for DeMorgan's theorem
More from Reference.com
Search for articles containing DeMorgan's theorem
Dictionary.com Word FAQs

Dictionary.com presents 366 FAQs, incorporating some of the frequently asked questions from the past with newer queries.

Copyright © 2014 Dictionary.com, LLC. All rights reserved.
  • Please Login or Sign Up to use the Recent Searches feature
FAVORITES
RECENT

;