Loading

BITCOUNT

bitset binary

Returns the logical size and the cardinality of a BitSet.

The BITCOUNT function consumes a bitset on the top of the stack and push back its logical size and its cardinality.

  • The logical size is the index of the highest bit set to true plus one.
  • The cardinality is the number of bit set to true.
BITCOUNT is available since version 1.0.6.

See also

Signatures

Examples

'0010110001000101' BIN-> BYTESTOBITS // Create a bitset with a string as input BITCOUNT // Get the bit count