Exclusive or (xor), Using arithmetic status bits – Rockwell Automation 1747-PT1, D1747NP002 Hand-Held Terminal User Manual
Page 307

Chapter 21
Move and Logical Instructions
21–7
Exclusive Or
XOR
Output Instruction
(XOR)
XOR
BITWISE EXCLUS OR
Source A
B3:0
0001010110100001
Source B
B3:1
0010000000100101
Dest
B3:2
0011010110000100
F1
F2
F3
F4
F5
ZOOM on XOR –(XOR)– 2.3.0.0.2
NAME: BITWISE EXCLUSIVE OR
SOURCE A: B3:0 0001 0101 1010 0001
SOURCE B: B3:1 0010 0000 0010 0101
DEST: B3:2 0011 0101 1000 0100
EDT_DAT
HHT Ladder Display:
HHT Zoom Display:
Ladder Diagrams and APS Displays:
(online monitor mode)
The value at source A is Exclusive ORed bit by bit with the value at source B
and then stored in the destination.
Truth Table:
R = A XOR B
A B R
0 0 0
1 0 1
0 1 1
1 1 0
A: Source A bit
B: Source B bit
R: Destination bit
Using Arithmetic Status Bits
C always reset
V always reset
Z set if the result is zero; otherwise reset
S set if the result is negative (most significant bit is set); otherwise reset
Exclusive Or (XOR)