Find the number of 1 in binary.
int upperBit(x) { int count = 0; while(x) { count++; x = x & (x-1); } return count; }