The BIT_POPULATION function returns the number of set (non-zero) bits in its integer argument.
The following statement displays the number of bits in an IDL long integer:
Result = BIT_POPULATION( Value )
BIT_POPULATION returns the number of set (non-zero) bits in Value. If Value is an array, the result is an array with the same structure, where each element contains the count of non-zero bits in the corresponding element of Value.
A scalar or array of any integer type.
Thread Pool Keywords
This routine is written to make use of IDL’s thread pool, which can increase execution speed on systems with multiple CPUs. The values stored in the !CPU system variable control whether IDL uses the thread pool for a given computation. In addition, you can use the thread pool keywords TPOOL_MAX_ELTS, TPOOL_MIN_ELTS, and TPOOL_NOTHREAD to override the defaults established by !CPU for a single invocation of this routine. See Thread Pool Keywords for details.
Bitwise Operators, ISHFT, IDL_Variable::FromBits, IDL_Variable::ToBits