In its Application Note AN571A, Motorola suggests several applications for the 4N26 optical coupler. One of them is that of a pulse amplifier, shown in figure 1. (2006)
Note that it is possible to obtain pulses compatible with TTL logic, with 5 V amplitude from pulses of 2 V amplitude, obtained from another logic as long as they have a current capacity of at least 15 mA. he great advantage of this circuit lies in the insulation provided by the presence of the optical coupler that reaches thousands volt.
The circuit also has the characteristic of speed and can work with pulses of only 4 us of duration, as attested by the waveforms shown in the same diagram.
The MPS6515 transistor can be replaced with a switching equivalent such as 2N2222.