$xor

From Scriptwiki
Revision as of 19:49, 9 May 2008 by Daveoh (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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 either 5 OR 6, BUT NOT BOTH.

Returns: 3 (00000011)