This document discusses doping and ion implantation in semiconductor fabrication. It describes how dopants such as boron, arsenic, and phosphorus are introduced through diffusion or ion implantation processes to create n-type and p-type semiconductors. The mathematics of diffusion are presented, including Fick's laws and the solution of the diffusion equation. Experimental setups for diffusion and ion implantation are shown. Ion implantation involves accelerating dopant ions into the semiconductor to reach a projected range and Gaussian distribution. Post-implantation diffusion may be needed to activate the implanted dopants.