evm_bit_count
Counts set bits in the complete 256-bit unsigned EVM word. Returns 0 for zero and 256 for UINT256_MAX. NULL input propagates to NULL.
Example
Local
{"id":"sample_j2y3kj","title":"Sample","code":"SELECT evm_bit_count('0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'::UINT256) AS result;\n-- => [{\"result\":128}]"}
Notebook ready in readonly mode.
API reference
Exact signatures with descriptions, requirements, inputs, returns, and examples.
Category and tags
- Category
- EVM utilities
- Tag
- Types
- Tag
- EVM