Difference between revisions of "Unary operator"

From Conservapedia
Jump to navigation Jump to search
(New page: 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...)
 
m (cats)
 
Line 1: Line 1:
A [[unary operator]] has one [[operand]].  
+
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.
 
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.
 
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.
 +
[[Category:Mathematics]]
 +
[[Category:Logic]]

Latest revision as of 14:31, December 1, 2008

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.