(seq, onb_max, reverse=True, deci=10)
ex.
    seq     = [1,3,4]
    onb_max = 6
            101100 -> 44
            001101 -> 13
ex.
    seq     = [1,3,4]
    onb_max = 6
            101100 -> 44
            001101 -> 13
ex . seq = [ 1 3 4 ] onb_max = 6 101100 - > 44 001101 - > 13
def conv_bi2dec(seq, onb_max, reverse=True, deci=10):
    """
    ex.
    seq     = [1,3,4]
    onb_max = 6
            101100 -> 44
            001101 -> 13
    """
    
    bi = [0]*onb_max
    for i in seq:
        bi[i-1] = 1
    
    if reverse:
        bi = ''.join(map(str, bi))[::-1]
    else:
        bi = ''.join(map(str, bi))
    
    if deci==10:
        return int(bi, 2)
    elif deci==2:
        return int(bi)
    elif deci==.2:
        return float(bi[0] + '.' + bi[1:])
    else:
        raise
def conv_bi2dec ( seq , onb_max , reverse = True , deci = 10 ) : bi = [ 0 ] * onb_max for i in seq : bi [ i - 1 ] = 1 if reverse : bi = '' . join ( map ( str , bi ) ) [ : : - 1 ] else : bi = '' . join ( map ( str , bi ) ) if deci == 10 : return int ( bi , 2 ) elif deci == 2 : return int ( bi ) elif deci == .2 : return float ( bi [ 0 ] + '.' + bi [ 1 : ] ) else : raise