Unary operator

From Conservapedia
This is an old revision of this page, as edited by Ed Poor (talk | contribs) at 14:15, December 1, 2008. It may differ significantly from current revision.
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

A unary operator has one operand. For example, the minus sign turns a positive number into a negative number. -10 degrees Fahrenheit means 10 degrees below zero. In logic, the negation operator produces the opposite of a Boolean value. If A is true, then ~A is false. If B is false, ~B is true.