To remove s bits from the significand of a binary floating-point number x and round the remaining bits, use Veltkamp’s algorithm:
Let factor = 2**s + 1.
Let c = factor * x.
Let y = c - (c-x).
Each operation above should be computed with floating-point arithmetic, including rounding-to-nearest with the same precision as x. Then y is the desired result.
Note that this will round a single number to a shorter significand. It will not generally reproduce the results of computing with shorter significands. E.g., given a and b, computing a•b with greater precision and then rounding to lesser precision will not always have the same result as computing a•b with the final precision.
To decrease the exponent range, you can merely compare a value to thresholds for the new exponent range and declare underflow or overflow as appropriate.