FindMSB

Finds the highest-numbered bit.

Synopsis

int FindMSB( uint32 bits )

Description

This procedure finds the highest-numbered bit that is set in the argument. The least-significant bit is bit number 1, and the most-significant bit is bit 32.

Arguments

bits
The 32-bit word to check.

Return Value

The procedure returns the number of the highest-numbered bit that is set in the argument. If no bits are set, the procedure returns 0.

Implementation

Convenience call implemented in clib.lib V20.

Associated Files

clib.lib
ARM Link Library

See Also

FindLSB(), ffs()