20 parity conversion (parity), 1 ) operation, 2 ) format – Yaskawa MP900 Series Ladder Programming Manual User Manual
Page 125: 3 ) programming example

5.3 Numeric Operation Instructions
5.3.20 Parity Conversion (PARITY)
5-56
5.3.20 Parity Conversion (PARITY)
( 1 ) Operation
The number of bits set to 1 (ON) in the input data is calculated in binary notation and stored in the output data.
( 2 ) Format
∗ C and # registers cannot be used.
( 3 ) Programming Example
In the following programming example, the number of bits set to 1 (ON) in 255 (00FF hex) in the input data A in
MW00000 is stored in the output data in MW00001.
Number of 1 bits in MW00000 (0FF hex) = 8
→ MW00001 = 8
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
Number of 1 (ON) bits in binary
notation of input data
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: PARITY
INFO