A diode consists of a pair of assembled contaminated p- and n-type semiconductor crystals in which the depletion layer was formed . In fact, the diode is produced from a clear silicon crystal both half of which is contaminated separately.
Operation of a diode will be set forth more in details on the page The diode as an element of the electric circuit.
Key statements1. Following the assembly of the p- and n-type semiconductor crystals stray electrons would migrate (by diffusion) into a very narrow band of the p-layer following the attraction force of the acceptor holes found in the p-type crystal, where electrons recombine with the holes.
2. A shortage of electrons will be formed in the depletion layer of the n-type semiconductor, while surplus electrons will appear in the p-type layer.
3. The layer thus formed, poor in free charge carriers is called depletion layer.
4. Due to the upset charge equilibrium an Einternal electric field (built-in potential) fill be created in the depletion layer.
5. The Einternal will prevent further (thermal) diffusion of the electrons.