This is what I do for the former:
floor( nextafter( 256, 255 ) * value )
Oh very nice idea to get rid of the min operator.