summaryrefslogtreecommitdiff
path: root/progs/a562.py
blob: 9cf91d4c4908fb210dbbb5d7be09d0fa03ec1ab0 (plain)
1
2
3
4
5
6
7
def highest_Power_of_2(n): 
    res = 0; 
    for i in range(n, 0, -1):  
        if ((i & (i - 1)) == 0): 
            res = i; 
            break;      
    return res;