Sample program, 2 instructions – Omron SYSMAC CP CP1E-N@@D@-@ User Manual
Page 226
2 Instructions
2-190
CP1E CPU Unit Instructions Reference Manual(W483)
Sample program
When CIO 0.00 is ON in the following example, NEG(160) calculates the 2’s complement of the content
of D100 and writes the result to D200.
1
D100
2
3
4
E
D
C
B
=
E
D200
D
C
C
0
0
0
0
E
D
C
C
NEG
D100
D200
0.00
1
2
3
4
Add 1
Actual
calculation
Equivalent
subtraction
Reverse bit status
This manual is related to the following products: