Try it Live
Run Uint examples in the interactive playground
Uint.bitLength(value: BrandedUint256): number
Get number of bits required to represent value (position of highest set bit + 1).
Parameters:
value: BrandedUint256- Value to measure
number - Bit length (0-256)
Example:
See Also
- leadingZeros - Count leading zero bits
- popCount - Count set bits

