It is a two-terminal device that conducts current only in one direction.
The external voltage across the semiconductor diode is such a way that the p side is connected to the positive terminal of the battery.
And n-side connected to the negative terminal, then the semiconductor diode is forward bias.
In a P-N junction diode, the width of the depletion region decreases in forwarding bias. This is due to the electrons being attracted by the positive terminal of the battery, and hence the negative ions disappear.
Thus, the forward bias narrows the depletion region, due to the carriers from the battery terminals
The explanation for reverse bias:
Reverse bias
The external voltage across the semiconductor diode is in such a way that the n- side is connected to the positive terminal of the battery.
And p-side connected to the negative terminal, then the semiconductor diode is reverse bias.
The external voltage is the same as that of the barrier potential.
Reverse bias refers to the application of an external voltage across a semiconductor diode so that the positive terminal of the battery is linked to the n-side and the negative terminal is attached to the p-side of the diode.
The entire voltage barrier adds up when an external voltage is placed across the diode because the direction of the external voltage coincides with the direction of the barrier potential.
When the diode is reverse biased the majority charge carriers are pushed away from the junction and more ions are left at the junction. This widens the depletion region