public int countBitsFaster(int num){
        //get 8 bits at a time and check count from count array
        int total = 0;
        int mask = (1<<8) - 1;
        for(int i=0 ; i < 4; i++){
            total += count[num & mask];
            num = num>>>8;
        }
        return total;
    }
http://www.geeksforgeeks.org/count-set-bits-in-an-integer/
src/com/interview/bits/CountBits.java