XOR

Purpose:

Performs the logical XOR (exclusive OR) of two expressions.

Syntax:

XOR(val1, val2)

val1

-

A scalar, series, or table.

val2

-

A scalar, series, or table.

Returns:

A real, series, or table.

Example:

xor(W1, W2)

 

returns a series or table with zeros at points where both W1 and W2 are zero and non-zero, and ones at points where either W1 or W2 is zero, but not both.

 

xor({0, 1, 5, 7}, 1)

 

returns a series {1, 0, 0, 0}.

Example:

W1: {1, 2, 3, 4, 5}

W2: {0, 2, 0, -3, 1}

W3: xor(W1, W2)

 

Window 3 contains the series {1, 0, 1, 0, 0}.

Remarks:

See |^ to perform a bitwise XOR function.

See Also:

< <= > >= == != (Conditional Operators)

&& || ! AND OR NOT XOR (Logical Operators)

>> << & ~ |+ |^ (Bit Operators)

AND

FLIPFLOP

NOT

OR