For situations where the supply rail is positive and limited, a passive approach using resistors is an alternative to the active techniques from Figure 1
Figure 2. For situations where the supply rail is positive and limited, a passive approach using resistors is an alternative to the active techniques from Figure 1