
5.4 Logic Operations and Comparison Instructions
5.4.2 Inclusive OR (OR)
5-66
( 3 ) Programming Example
In the following programming example, a logical OR is performed on 12,345 (3039 hex) in input data A in MW00000
and 3,855 (0F0F hex) in input data B in MW00001, and the result is stored in the output data in DW00000.
0
Bit 0Bit 7Bit F Bit 3Bit B Bit 4Bit 8Bit C
MW00000 :
12,345 (3039 hex)
0 1 1 0 0 0 0 0 0 1 1 1 0 0 1
0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1
0 0 1 1 1 1 1 1 0 0 1 1 1 1 1 1
MW00001 :
3,855 (0F0F hex)
DW00000 :
16,191 (3F3F hex)
MW00000 | MW00001 → DW00000
Comentarios a estos manuales