Difference between revisions of "$xor"
From Scriptwiki
m (Spelling error) |
|||
Line 1: | Line 1: | ||
− | Performs a bit-wise | + | Performs a bit-wise EXCLUSIVE OR comparison against two numbers |
$xor(number 1, number 2) | $xor(number 1, number 2) | ||
Revision as of 19:43, 9 May 2008
Performs a bit-wise EXCLUSIVE OR comparison against two numbers
$xor(number 1, number 2)
Examples
$xor(5,6)
Binary values of each:
00000101 00000110
Leaving the bits which are in 5 OR BUT NOT BOTH 6
Returns: 3 (00000011)