def dec_to_bin(number: int, bits: int) -> str:
    """Converts an integer to a binary string with a certain bit length

    Parameters
    ----------
    number: int
       The integer to convert
    bits: int
       The amount of bits that can be used

    Returns
    -------
    str
       The binary string
    """

    return ('0' * bits + bin(number)[2:])[-bits:]