def de2bin(x):
    """convert decimal to binary
    input: 15
    output: 11110000
    """
    bstr = ''
    x = int(x)
    n = 7
    while n >= 0:
        re = x / 2 ** n
        if re == 1:
            x = x % 2 ** n
        n = n - 1
        bstr = bstr + str(re)
    return bstr
