The SN754410 suggested above is compatible with low level CMOS voltages so should be ok with a modern pp. It also I think has in effect a Schmidt trigger input. I notice from the data sheet that it's going obsolete though RS have them in stock at about £1.40 each. It only does one way though, for 24v to pp I'd just use a single npn transistor with the 24v on the base through about 100k and a 4k7 pull-up to the pp Vcc in the collector. Remember it will invert the logic level.