int NumberOfSetBits32(int i) {
i = (i & 0x55555555) + ((i >> 1) & 0x55555555);
i = (i & 0x33333333) + ((i >> 2) & 0x33333333);
i = (i & 0x0F0F0F0F) + ((i >> 4) & 0x0F0F0F0F);
return (i*(0x01010101))>>24; }
Can someone explain this code ,which finds the number of set bits in a number . I am completely unable to understand it.