Kelly Services Interview Question: How to find the number of bit... | Glassdoor

Interview Question

Intern Interview San Diego, CA

How to find the number of bits in an integer

Answer

Interview Answer

1 Answer

0

Logical AND the number with 1. if the result is 1 then increases the counter. else right shift the number and continue the loop.

Interview Candidate on Apr 5, 2012

Add Answers or Comments

To comment on this, Sign In or Sign Up.