def _get_signed_params(conv):
    """
    Fill the sign-dependent params of the conv structure in case of signed 
    conversion
    @param conv: the structure to be filled
    """
    conv["sign_mask"] = 2 ** (conv["bits"] - 1)
    conv["int_min"] = -1 * (2 ** (conv["bits"] - 1 - conv["bin_point"]))
    conv["int_mask"] = sum([2 ** i 
        for i in range(conv["bin_point"], conv["bits"] - 1)])
    conv["int_max"] = sum([2 ** i for i in range(conv["bits"] -
        conv["bin_point"] - 1)])
def _get_signed_params ( conv ) : conv [ "sign_mask" ] = 2 ** ( conv [ "bits" ] - 1 ) conv [ "int_min" ] = - 1 * ( 2 ** ( conv [ "bits" ] - 1 - conv [ "bin_point" ] ) ) conv [ "int_mask" ] = sum ( [ 2 ** i for i in range ( conv [ "bin_point" ] , conv [ "bits" ] - 1 ) ] ) conv [ "int_max" ] = sum ( [ 2 ** i for i in range ( conv [ "bits" ] - conv [ "bin_point" ] - 1 ) ] )
Fill the sign-dependent params of the conv structure in case of signed 
    conversion
    @param conv: the structure to be filled