The two important processes involved in the formation of a p-n junction are:
(i) Diffusion
(ii) Drift
When p and n sides come in contact, then majority carriers diffuse from high concentration to low concentration. Electrons flow from n to p junction and combine with holes near the junction. Similarly, holes flow from p-side to n side and combine with electrons near the junction. As this happens, the region near the junction gets depleted of carriers and gets charged as shown in the figure. This diffusion of carriers leads to diffusion current.
The charge in the depletion region creates an electric field. This electric field leads to the flow of minority carriers across the depletion region. This is called the drift current.
The diffusion and drift currents are opposite in direction. In equilibrium, they are equal to each other, and the p-n junction is formed.
(B) A Zener diode is used as a voltage regulator.
The unregulated voltage is connected to the Zener diode through a series resistance such that the Zener diode is reverse biased. If the input voltage increases, the current through the Zener diode and resistance increases. Thus, the voltage drop over the resistance increases without a change in the voltage drop over the Zener diode. This is because, in the breakdown region, the Zener voltage remains the same irrespective of the current.
Similarly, if the input voltage decreases, the voltage and current over the resistance decrease without a change in the voltage across the Zener diode.