Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
In this article
Applies to: ✅ Azure Data Explorer ✅ Azure Monitor ✅ Microsoft Sentinel
Returns the number of set bits in the binary representation of a number.
bitset_count_ones(
value)
Learn more about syntax conventions.
Name | Type | Required | Description |
---|---|---|---|
value | int |
✔️ | The value for which to calculate the number of set bits. |
Returns the number of set bits in the binary representation of a number.
// 42 = 32+8+2 : b'00101010' == 3 bits set
print ones = bitset_count_ones(42)
Output
ones |
---|
3 |