Simple C++ Solution ✅✅
Code\n\nclass Solution {\npublic:\n    int minChanges(int n, int k) {\n        int use=n&k;\n        if(use!=k){\n            return -1;\n        }\n        int
# Code\n```\nclass Solution {\npublic:\n    int minChanges(int n, int k) {\n        int use=n&k;\n        if(use!=k){\n            return -1;\n        }\n        int temp=n^use;\n        int ans=0;\n        while(temp>0){\n            if(temp%2==1){\n                ans++;\n            }\n            temp=temp/2;\n        }\n        return ans;\n    }\n};\n```
['Bit Manipulation', 'C++']