Construct an integer consisting of the following bits.
>
|
|
| (1) |
There are 9 bits in num that are equal to 1.
We can see this by adding the entries of bits, too.
In fact, PopCount(n) = add(Split(n)) for all positive integers n. It is more efficient to compute PopCount(n) than add(Split(n)).