When the input signal (sine wave) is fed into the anode of the diode,due to forward biasing caused by the positive half cycle of the signal and the anode,the barrier in the diode decreases,thereby allowing only the positive of the input signal to be shown at the outpu level