omron — BXOR operator

BXOR operator BXOR operator Syntax ... value BXOR value ... Function Perform the binary exclusive-OR operation on two values. Usage Considerations The BXOR operation is meaningful only when performed on integer values. Only the integer parts of real values are used. Any fractional parts are ignored. Details The BXOR operator can be used to perform a binary exclusive-OR operation on two values on a bit-by-bit basis, resulting in a real value. NOTE: This operation is meaningful only when performed on integer values. Specifically, the BXOR operation consists of the following steps: 1. Convert the operands to sign-extended 32-bit integers, truncating any fractional part. 2.

Perform a binary exclusive-OR operation (see below). 3. Convert the result back to a real value. During the binary exclusive-OR operation, c = a BXOR b the bits in the resultant C are determined by comparing the corresponding bits in the operands A and B, as indicated in the following table. eV+Language Reference Guide, v2.x, 18319-000 Rev A Page 102 For each bit in: a b c 0 0 -> 0 0 1 -> 1 1 0 -> 1