def int_to_binary(integer: int, num_bits: int) -> str:
    """Convert an integer to a certain length bit string

    Args:
        integer (int): Integer
        num_bits (int): Amount of bits in bit string

    Returns:
        str: Integer as bit string
    """
    return f"{integer:0{num_bits}b}"