FreeMat

- Main Page
- Related Pages

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 multi-dimensional unsigned integer arrays. The and 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 xor'ed with that scalar. Otherwise the two arrays must match in size.

# Example

    --> bitand(uint16([1,16,255]),uint16([3,17,128]))

    ans =
       1  16 128

    --> bitand(uint16([1,16,255]),uint16(3))

    ans =
     1 0 3