Move/Logical Instructions (MOV, MVM, BTD, MVMT, BTDT, CLR, SWPB, AND, OR, XOR, NOT, BAND, BOR, BXOR, BNOT)
Bitwise Exclusive OR (XOR)
dest := sourceA XOR sourceB
The XOR instruction performs a bitwise XOR operation by using the bits in Source A
and Source B and places the result in the Destination.
To perform a logical XOR, see
Operands:
Relay Ladder
Operand
Source A
Source B
Destination
Structured Text
Use XOR as an operator within an expression. This expression evaluates sourceA XOR
sourceB.
See
Structured Text Programming
structured text.
Function Block
Operand
XOR tag
Rockwell Automation Publication 1756-RM003N-EN-P - October 2011
page
337.
Type
Format
SINT
Immediate
INT
Tag
DINT
A SINT or INT tag converts to a DINT value by zero-fill.
SINT
Immediate
INT
Tag
DINT
A SINT or INT tag converts to a DINT value by zero-fill.
SINT
Tag
INT
DINT
for information on the syntax of expressions within
Type
FBD_LOGICAL
Description
Value to XOR with Source B
Value to XOR with Source A
Stores the result
Format
Description
Structure
XOR structure
Chapter 7
323