32.21.3.3 Explanation of the ENCO and ENCOP Instructions
The ENCO/ENCOP instructions encode values. The value in S1 is
encoded and saved in D1. Among the 32 bits of S1, the position of
the ON bit is output to D1 as a binary value. When multiple bits
are ON in S1, the uppermost bit position is output. The ENCO/ENCOP
instructions always pass power.
When using ENCO/ENCOP instructions, an error will occur if the
variables specified in operands S1 and D1 are not the same type.
Designate the same variable type in all operands S1 and D1.
Refer to the following for specifying a constant.
When operand D1 is an integer variable
When operand D1 is an integer variable and
you want to input hexadecimal values in operand S1.
When 0x (zero and lower case "x") is input, the following values
become hexadecimal values.
When Converting Data in a Specified Array
(Integer Variable Array)
you can either specify the entire array with operands S1 and D1,
or specify the array elements individually.
|