The BCNT/BCNTP instructions both count bits. When the BCNT instruction is executed, the ON bits in S1 data are counted and the number of ON bits is saved in D1. The BCNT/BCNTP instructions always pass power. If the variables designated to operands S1 and D1 are not the same type, an error will occur when using the BCNT/BCNTP instructions.
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 Calculating Data in a Specified Array (Integer Variable Array)
Specify the array using Data [0] or Data [N] (N indicates an integer variable).
When operands S1 and D1 specify the entire array, an error will occur even if the specified variables are the same type.