Substances whose conductance lies in between that of metals (conductors) and insulators are called semiconductors.
Two main types of semiconductors are n-type and p-type.
(i) n-type semiconductor: When a silicon crystal is doped with atoms of group-15 elements, such as P, As, Sb or Bi, then only four of the five valance electrons of each impurity atom participate in forming covalent bonds and fifth electron is almost free to conduct electricity. Silicon that has been doped with group-15 element is called n-type semiconductor.
(ii) p-type semiconductor: when a silicon crystal is doped with atoms of group-13 elements, such as B, Al, Ga or In, each impurity atom forms only three covalent bonds with the host atoms. The place where the fourth electron is missing t is called a hole which moves through the crystal like a positive charge and hence increases its conductivity. Silicon that has been doped with group-13 element is p-type semiconductor.