Berserk Docs
Scalar FunctionsMath Functions

bitset_count_ones

Return the number of set bits in the two's-complement representation

Syntax

bitset_count_ones(value)

Parameters

Prop

Type

Returns: long

Examples

Example 1

print bitset_count_ones(tolong(255)), bitset_count_ones(tolong(- 1))
print_0 (long)print_1 (long)
864

On this page