def _binary(i, width=4):
    """Convert `i` to a binary string of width `width`.

    >>> _binary(0)
    '0000'
    >>> _binary(1)
    '0001'
    """
    str = bin(i)[2:]
    return '0' * (width - len(str)) + str
