BITXOR Bitwise Boolean Exclusive-Or (XOR) Operation

Section: Bitwise Operations

Usage

Performs a bitwise binary xor operation on the two arguments and returns the result. The syntax for its use is
   y = bitxor(a,b)

where a and b are unsigned integer arrays. The xor operation is performed using 32 bit unsigned intermediates. Note that if a or b is a scalar, then each element of the other array is xored with that scalar. Otherwise the two arrays must match in size.

Example

Here we XOR some arrays together
--> bitxor([3 4 2 3 10 12],5)

ans = 

  6  1  7  6 15  9 


This is a nice trick to look for odd numbers

--> bitxor([3 4 2 3 10 12],1)

ans = 

  2  5  3  2 11 13