fundamental approach ,using (if...else statement only) python
IntuitionApproachComplexity
Time complexity:

Space complexity:
Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity:
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```python3 []
class Solution:
    def minChanges(self, n: int, k: int) -> int:
            # 1 can change to 0 only.

        count=0
        s=""
        m=""
        if(n !=k):
            while(n>0):
                r=n%2
                s=s+str(r)
                n=n//2
            s=s[::-1]
            while(k>0):
                r=k%2
                m=m+str(r)
                k=k//2
            m=m[::-1]
            if(len(m)==len(s)):
                for i in range(0,len(s)):
                    if(m[i]!=s[i] and s[i]=="1"):
                        count=count+1
                    elif(m[i]!=s[i] and s[i]=="0"):
                        return -1
                        break
            else:
                if(len(m)<len(s)):
                    while(len(m)<len(s) ):
                        m="0"+m
                    for i in range(0,len(m)):
                        if(m[i]!=s[i] and s[i]=="1"):
                            count=count+1
                        elif(m[i]!=s[i] and s[i]=="0"):
                            return -1
                            break
                else:
                    while(len(s)<len(m)):
                        s="0"+s
                    for i in range(0,len(m)):
                        if(m[i]!=s[i] and s[i]=="1"):
                            count=count+1
                        elif(m[i]!=s[i] and s[i]=="0"):
                            return -1
                            break
        
        return count
        
        
        
        

            
        
```
['Python3']