def zf_bin(n, width):
    """Zero-filled bin() of specified width.

    >>> zf_bin(1, 8)
    '00000001'
    >>> zf_bin(255, 8)
    '11111111'
    >>> zf_bin(256, 8)
    '00000000'
    """
    return bin(n)[2:].zfill(width)[0 - width:]
