The process of adding impurities to a semiconductor is called doping. Doping can change the electrical properties of the semiconductor, such as its conductivity, by changing the number of free electrons or holes in the material.
There are two main types of doping:
p-type doping and n-type doping.
P-type doping involves adding atoms with one less valence electron than the semiconductor atoms to the semiconductor. This creates a net positive charge in the semiconductor, which leads to the formation of holes. These holes can move freely through the semiconductor, allowing it to conduct electricity.
N-type doping involves adding atoms with one more valence electron than the semiconductor atoms to the semiconductor. This creates a net negative charge in the semiconductor, which leads to the formation of free electrons. These electrons can move freely through the semiconductor, allowing it to conduct electricity.
When a semiconductor is doped with both n-type and p-type impurities, it creates a p-n junction. P-n junctions are the building blocks of transistors, which are used in a wide variety of electronic devices.