I just check 32 bits of the integer and count. But the output is always 1 less than the Expected. Can anyone point where is wrong?

```
public class Solution {
// you need to treat n as an unsigned value
public int hammingWeight(int n) {
int count=0;
while(n!=0){
if(n%2==1){
count++;
}
n>>>=1;
}
return count;
}
```

}