If m != n, then m - n >= 1. So the last bit must be 0. Then count this digit, and simply move m and n for one bit, and judge again...

```
public class Solution {
public int rangeBitwiseAnd(int m, int n) {
int count = 0;
while (m != n) {
m >>= 1;
n >>= 1;
count ++;
}
return m << count;
}
}
```