MATH_GetLeastSignificantBit

C Specification

#include <nitro/math.h>
u32 MATH_GetLeastSignificantBit( u32 x );
u32 MATH_LSB( u32 x );

Arguments

x Numeric value to perform calculation.

Return Values

Returns the lowest-order bit set to 1.

Description

This function looks for the lowest bit that is set to 1 when x is expressed as a binary 32-bit value. 10(01010b) is 2(010b), and 0 is 0.

MATH_LSB is another name for the MATH_GetLeastSignificantBit function.

The highest-order bit set to 1 can be found with the MATH_GetMostSignificantBit function.

See Also

MATH_GetMostSignificantBit MATH_ILog2

Revision History

12/22/2005 Initial version.