Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

cpu_core.h/cpu_core.c

Prototypes

Code Block
languagecpp
          CPU_INT08U  CPU_PopCnt32 (CPU_INT32U  value)


Arguments

val

Data value to count the number of bits set.

Returned Value

Number of contiguous, least-significant, trailing zero set bits in val.

Required Configuration

None.N/A

Notes / Warnings

  1. For non-zero values, the returned number of contiguous, least-significant, trailing zero bits is also equivalent to the bit position of the least-significant set bit.

...

N/A

Example Usage

Code Block
languagecpp
          CPU_DATA  val;
          CPU_DATA  pop;
           
          val  = 0x0643A718;
          pop = CPU_PopCnt32(val);