Unary operator

From Conservapedia

Jump to: navigation, 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.

Personal tools