summaryrefslogtreecommitdiff
path: root/progs/a665.py
blob: 0a0047ef5c5a3533207cfc000e1eef3e182fc3b0 (plain)
1
2
3
4
5
6
7
8
9
def set_Bit_Number(n): 
    if (n == 0): 
        return 0; 
    msb = 0; 
    n = int(n / 2); 
    while (n > 0): 
        n = int(n / 2); 
        msb += 1; 
    return (1 << msb)