Do you have 24 Volts of do you want to squeak 5 up to 24?

If you have 24V how about and op-amp wired as a comparator. If it's a data signal go for a high slew rate.