In a controller I found a HFE4050BT that used to implement a level translator for a 24 VDC input signal.
How does this work? The HFE4050BT is only specified for 15V max. Unfortunately I do not have a schematic, only a photo of the board.
Looks like R4 (2Meg?) is providing hysteresis by positive feedback from buffer output to input. This makes the buffer into a Schmitt trigger - good for handling signals that change slowly.