Simple C code with XOR operation solutions
Code

# Code
```c []
int minChanges(int n, int k) {
    int tmp = n ^ k;
    int ans = 0;

    if( (tmp & k) == 0)
    {
        while(tmp>0)
        {
            if(tmp&1)
            {
                ans++;
            }
            tmp=tmp>>1;
        }
        return ans;
    }

    return -1;
}
```
['C']