Problem "Number of 1 Bits ", My solution is :

```
public class Solution {
// you need to treat n as an unsigned value
public static long hammingWeight(long n) {
//get the last 32 bit
n = n & 0xFFFFFFFFL;
int num = 0;
while(n>0){
int lastBitNum = (int) (n&0x1);
num += lastBitNum ;
n = n>>1;
}
return num;
}
}
```

accoring to the Hamming weight ,this solution will be wrong with input 789012340567 ,why ?