Number Properties

Common bit manipulation tricks and properties.

Ndec: 7
7
0
6
0
5
0
4
0
3
0
2
1
1
1
0
1
Status: Enter a number and run
Speed
1function countSetBits(n):
2 count = 0
3 while n > 0:
4 n = n & (n - 1)
5 count++
6 return count