number of bit changes to make two integers equal
Code


# Code
```python3 []
class Solution:
    def minChanges(self, n: int, k: int) -> int:
        ml=max(len(format(n,'b')),len(format(k,'b')))
        nb = format(n, f'0{ml}b')
        kb=format(k,f'0{ml}b')
        c=0
        ans=""
        for i in range(len(nb)):
            if nb[i]=='1' and kb[i]=='0':
                ans+='0'
                c+=1
            else:
                ans+=nb[i]
        if ans==kb:
            return c
        else:
            return -1
```
['Python3']