POPPAR

Elemental Intrinsic Function (Generic): Returns the parity of an integer.

Syntax

result = POPPAR (i)

i
Integer.

Results:

The result type is the same as i. If there are an odd number of 1 bits in the binary representation of the integer I, the result value is 1. If there are an even number, the result value is zero.

The model for the interpretation of an integer value as a sequence of bits is shown in Model for Bit Data.

Example

If the value of I is B'0...00011010110', the value of POPPAR(I) is 1.