Skip to main content

SignificantBit

SignificantBit

DEBRUIJN_SEQ

uint256 DEBRUIJN_SEQ

DEBRUIJN_INDEX

bytes DEBRUIJN_INDEX

leastSignificantBit

function leastSignificantBit(uint256 x) internal pure returns (uint8)

Finds the index of the least significant bit.

Parameters

NameTypeDescription
xuint256The value to compute the least significant bit for. Must be a non-zero value.

Return Values

NameTypeDescription
[0]uint8ret The index of the least significant bit.

mostSignificantBit

function mostSignificantBit(uint256 x) internal pure returns (uint8)