Easy solution Python3 ✅
\n# Code\n\nclass Solution:\n    def minChanges(self, n: int, k: int) -> int:\n        n_bits = []\n        k_bits = []\n        \n        while n > 0:\n       
\n# Code\n```\nclass Solution:\n    def minChanges(self, n: int, k: int) -> int:\n        n_bits = []\n        k_bits = []\n        \n        while n > 0:\n            n_bits.append(str(n&1))\n            n = n >> 1\n        while k > 0:\n            k_bits.append(str(k&1))\n            k = k >> 1\n        \n        if len(k_bits) > len(n_bits):\n            rem = len(k_bits) - len(n_bits)\n            for i in range(rem):\n                n_bits.append("0")\n        elif len(k_bits) < len(n_bits):\n            rem = len(n_bits) - len(k_bits)\n            for i in range(rem):\n                k_bits.append("0")\n        n_bits = n_bits[::-1]\n        k_bits = k_bits[::-1]\n        \n        Num_of_change = 0\n        for i in range(len(k_bits)):\n            if k_bits[i] == n_bits[i]:\n                continue\n            elif n_bits[i] == "1":\n                n_bits[i] = \'0\'\n                Num_of_change += 1\n            elif n_bits[i] == "0":\n                break\n        return Num_of_change if n_bits == k_bits else -1\n        \n```
['Python3']