Advertisement
Guest User

Untitled

a guest
Aug 17th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.16 KB | None | 0 0
  1. uint64_t countBits(uint64_t input){
  2. uint64_t counter;
  3. for(counter=0; input > 0; counter++)
  4. input &= input - 1; /*clear the set lsb*/
  5. return counter;
  6. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement