Doping involves adding a small amount of foreign atoms into the semiconductor material. For example, adding phosphorus (which has five valence electrons) to silicon (which has four) will create an n-type semiconductor. Conversely, adding boron (which has three valence electrons) to silicon will create a p-type semiconductor. These introduced atoms create either free electrons or holes that act as charge carriers, thereby increasing the material's conductivity.