def decint2binstr(n):
    """Convert decimal integer to binary string.
    """
    if n < 0:
        return '-' + decint2binstr(-n)
    s = ''
    while n != 0:
        s = str(n % 2) + s
        n >>= 1
    return s or '0'