def int_to_bitstring(x: int) -> str:
    """ Function to convert an integer to AT LEAST a 32-bit binary string.

    For integer less than 32 bits, it will pad the integer with extra bits of 0s until it is of size 32bit.
    If the integer is greater than 32-bits, then return the binary representation with the minimum number of bits to
    represent the integer.

    Parameters
    ----------
    x: int
        Integer to convert to bitstring

    Returns
    -------
    str
        Bitstring of AT LEAST size 32-bits.

    Notes
    -----
    Here are some example cases.

    .. highlight:: python
    .. code-block:: python

        >>> int1 = 2
        >>> int_to_bitstring(int1)
        00000000000000000000000000000010
        >>> int2 = 9999999999999
        >>> int_to_bitstring(int2)
        10010001100001001110011100101001111111111111

    In the first example, the binary representation of 2 is simply 10. Hence, the function pads the bitstring with
    30 0s on the left to return a 32-bit bitstring. In the second example, 9999999999999 in binary consist of > 32-bits,
    hence the function returns the full binary representation.
    """
    return '{:032b}'.format(x)