16 one’s complement (com), 1 ) operation, 2 ) format – Yaskawa MP900 Series Ladder Programming Manual User Manual
Page 121: 3 ) programming example

5.3 Numeric Operation Instructions
5.3.16 One’s Complement (COM)
5-52
5.3.16 One’s Complement (COM)
( 1 ) Operation
The one’s complement of the input data is stored in the output data.
This instruction inverts the 0’s and 1’s in the binary representation of the input data and stores the result in the
output data.
( 2 ) Format
∗ C and # registers cannot be used.
( 3 ) Programming Example
In the following programming example, the one’s complement of -3,856 (F0F0 hex) in the input data in MW00000 is
stored in the output data in MW00001.
MW00000 = -3,856 (F0F0 hex)
→ MW00001 = 3,855 (0F0F hex)
When performing operations with different data types, the result of the operation will depend on the data type of the output reg-
ister.
Refer to 4.4.2 ( 3 ) Precautions When Using Local Registers within a User Function for details.
Output data
Input data
One’s complement
Parameter Name
Applicable Data Types
B
W
L
F
A
Index
Constant
Input data (Src)
×
{
{
×
×
{
{
Output data (Dest)
×
{
*
{
*
×
×
{
×
Input data
Output data
Icon:
Key entry: COM
INFO