# MATH_GetMostSignificantBit

## C Specification

      #include <nitro/math.h>

      u32 MATH_GetMostSignificantBit( u32 x );
      u32 MATH_MSB( u32 x );

## Arguments

`x` | Numeric value to perform calculation.

## Return Values

Returns the highest order bit set to 1.

## Description

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

`MATH_MSB` is another name for the `MATH_GetMostSignificantBit` function.

The lowest order bit set to 1 can be found with the `MATH_GetLeastSignificantBit` function.

## See Also

`MATH_GetLeastSignificantBit MATH_ILog2
`

## Revision History

12/22/2005 Initial version.

CONFIDENTIAL