+-------------------------------IBM Extension--------------------------------+
Purpose
Population parity.
Determines the parity for a data object.
Class
Elemental function.
Argument Type and Attributes
Result Type and Attributes
Default integer.
Result Value
Returns 1 if there are an odd number of bits set.
Returns 0 if there are an even number of bits set.
Examples
INTEGER | BIT REPRESENTATION | POPPAR |
0 | 0000 | 0 |
1 | 0001 | 1 |
2 | 0010 | 1 |
3 | 0011 | 0 |
4 | 0100 | 1 |
Related Information
+----------------------------End of IBM Extension----------------------------+