Last modified on December 1, 2008, at 14:31

Unary operator

This is the current revision of Unary operator as edited by WesleyS (Talk | contribs) at 14:31, December 1, 2008. This URL is a permanent link to this version of this page.

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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.