快速统计二进制中1的数量

int BitCount5(unsigned int n)
{
    unsigned int tmp = n - ((n >>1) &033333333333) - ((n >>2) &011111111111);
    return ((tmp + (tmp >>3)) &030707070707) %63;
}
rush!
原文地址:https://www.cnblogs.com/LH2000/p/15256304.html