2-217
2 Instructions
CP1E CPU Unit Instructions Reference Manual(W483)

Logic Instructions

2

COM/COML

Sample program
When CIO 0.00 is ON in the following example, the status of each bit D100 will be reversed.When CIO 0.00 is ON in the following example, the status of each bit in D100 and D101 will bereversed.
D100 1001000100010001
0123456789151413 12 11 10
D100 01 1 0 1 1 1 0 1 1 1 0 1 1 1 0
0123456789151413 12 11 10
COM
D100
0.00
COML
D100
0.00 D100 10 0 1 0 0 0 1 0 0 0 1 0 0 0 1
0123456789151413 12 11 10
D100 01 1 0 1 1 1 0 1 1 1 0 1 1 1 0
0123456789151413 12 11 10
1 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1
0123456789151413 12 11 10
0 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0
0123456789151413 12 11 10