XORΒΆ

The IEC Operators and additional, norm-extending \ functions Bitwise XOR of bit operands. The operands should be of the type BOOL, BYTE, WORD or DWORD.

Note

Note the behaviour of the XOR function in extended form, that means if there are more than 2 inputs. The inputs will be checked in pairs and the particular results will then be compared again in pairs (this complies with the standard, but may not be expected by the user).

Example in IL:

Var1 :BYTE;
LD 2#1001_0011
XOR 2#1000_1010
ST  Var1 (* Result is 2#0001_1001 *)

Example in ST:

Var1 := 2#1001_0011 XOR 2#1000_1010

Example in FBD:

../_images/790f44ad6a16885a0a317d31373182f9