1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<HTML>
3<HEAD>
4<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
5<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows">
6<META http-equiv="Content-Style-Type" content="text/css">
7<TITLE>MATH_CountTrailingZeros</TITLE>
8<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css">
9</HEAD>
10<BODY>
11<H1 align="left">MATH_CountTrailingZeros<img src="../../image/NTR.gif"align="middle"><img src="../../image/TWL.gif" align="middle"></H1>
12<H2>Syntax</H2>
13<DL>
14  <DD>
15  <PRE><CODE>#include &lt;nitro/math.h&gt;</CODE></PRE>
16  <PRE><CODE>u32 MATH_CountTrailingZeros( u32 x );
17u32 MATH_CTZ( u32 x );
18
19  </CODE></PRE>
20</DL>
21<H2>Arguments</H2>
22<TABLE border="1">
23  <TBODY>
24    <TR>
25      <TD><B><I>x</I></B></TD>
26      <TD>The value to scan</TD>
27    </TR>
28  </TBODY>
29</TABLE>
30<H2>Return Values</H2>
31<P>Returns the number of consecutive bits set to 0, starting from the lowest-order bit.</P>
32<H2>Description</H2>
33<P>This function finds the number of bits set to 0 starting from the lowest-order bit when x is expressed as a binary 32-bit value. For example, a value of 0x80000000 will return 31, and a value of 0 will return 32. This is an inline function that uses the <CODE><a href="MATH_CountLeadingZeros.html">MATH_CountLeadingZeros</a></CODE> function.</P>
34<P><CODE>MATH_CTZ</CODE> is another name for the <CODE>MATH_CountTrailingZeros</CODE> function.</P>
35<P>To count the number of consecutive <code>0</code>'s from the beginning, you can use the <CODE><a href="MATH_CountLeadingZeros.html">MATH_CountLeadingZeros</a></CODE> function.</P>
36<H2>See Also</H2>
37<P><CODE><A href="../bit/MATH_CountLeadingZeros.html">MATH_CountLeadingZeros</A>, <A href="../int/MATH_ILog2.html">MATH_ILog2</A><BR></CODE></P>
38<H2>Revision History</H2>
39<P>
402005/12/22 Initial version.
41</P>
42<hr><p>CONFIDENTIAL</p></body>
43</HTML>
44