Easiest Logic || Beats 100% in C++
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    int minChanges(int n, int k) {\n        \n        if(n == k)\n            return 0;\n\n        int ops = 0;\n\n        while(n)\n        {\n            int a = n % 2;\n            int b = k % 2;\n\n            n = n >> 1;\n            k = k >> 1;\n\n            if(a == 0 && b == 1)\n                return -1;\n\n            if(a == 1 && b == 0)\n                ops++;\n        }    \n\n        if(k > 0)\n            return -1;\n\n        return ops;\n    }\n};\n```
['C++']