De Morgan's Laws show how to negate AND and OR expressions. Named after Augustus De Morgan, who formulated them in the 1840s.
First law: . In code: !(a && b) equals !a || !b. Negate an AND by negating each part and changing AND to OR.
Second law: . In code: !(a || b) equals !a && !b. Negate an OR by negating each part and changing OR to AND.