Bitmask | C, C++, Python3
CC++Python3
# C
```c []
int minChanges(int n, int k) {
    if(k & ~n) return -1;
    return __builtin_popcount((n & ~k));
}
```

# C++
```cpp []
class Solution {
public:
    int minChanges(int n, int k) {
        if(k & ~n) return -1;
        return __builtin_popcount((n & ~k));
    }
};
```

# Python3
```python3 []
class Solution:
    def minChanges(self, n: int, k: int) -> int:
        if k & ~n:
            return -1
        return (n & ~k).bit_count()
```
['Bit Manipulation', 'C', 'Bitmask', 'C++', 'Python3']