### __cnttz8 -- Count Trailing Zero Bits in 8 Byte Value

Format

>     #include <builtin.h>

>     unsigned int __cnttz8(unsigned long long num)

Language Level: None
__cnttz8 calculates the number of trailing (ie. least significant) zero bits in the 8 byte unsigned value num.

Return Value
Returns the number of trailing zero bits. If num is zero, then 64 is returned.

Example
This example calculates the number of trailing zero bits in the 8 byte value 0x0004000000000000.

    #include <stdio.h>
    #include <builtin.h>

    unsigned long long input = 0x0004000000000000ULL;

    int main(void)
    {
       printf("The number of trailing zero bits in %.16llx is %u.\n",
              input, __cnttz8(input));

       /**************************************************************
          The output should be:

          The number of trailing zero bits in 0004000000000000 is 50.
       **************************************************************/

       return 0;
    }

__cntlz4 -- Count Leading Zero Bits in 4 Byte Value
__cntlz8 -- Count Leading Zero Bits in 8 Byte Value
__cnttz4 -- Count Trailing Zero Bits in 4 Byte Value