def convert_digout(value: int, bits: int, lrv: float, urv: float, offset: float = 0.0):
    """
    Converts a digital output value (fixed point format) into float value corresponding to the given limits.

    :param value: Digital output value.
    :param bits: Number of bits used in the fixed point format.
    :param lrv: Lower range limit.
    :param urv: Upper range limit.
    :param offset: Zero offset. Default is 0.0.
    :return: Float value.
    """
    # calculate scaling limits
    dig_min = 0.25 * (lrv - offset) / max(abs(lrv - offset), abs(urv - offset))
    dig_max = 0.25 * (urv - offset) / max(abs(lrv - offset), abs(urv - offset))
    # check if negative
    if value & (1 << (bits - 1)):
        value = ((~value + 1) & (2 ** bits - 1)) * -1
    fixed_point = value / (2 ** bits)
    return (urv - lrv) * fixed_point / (dig_max - dig_min) + offset