Bitwise operations
Code\npython3 []\nclass Solution:\n    def minChanges(self, n: int, k: int) -> int:\n        changes = 0\n        while n or k:\n            n1, k1 = n & 1, k &
# Code\n```python3 []\nclass Solution:\n    def minChanges(self, n: int, k: int) -> int:\n        changes = 0\n        while n or k:\n            n1, k1 = n & 1, k & 1\n            if n1 > k1:\n                changes += 1\n            elif n1 < k1:\n                return -1\n            n >>= 1\n            k >>= 1\n        return changes\n```
['Python3']