User Profile
Collapse
-
I need to find it without using any loops... -
Checking how many bits are set in an integer
Hi All,
I want to check how many bits are set in an integer .
For example,
int a = 10;
The binary form of 10 is 1010.
There are two bits set to 1 in the number 10.
Like that i have check how many bits are set to 1 in an integer.
Can anyone help me in this....
Thanks in advance,
Anand.
No activity results to display
Show More
Leave a comment: