Unary operator
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.
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.