A p–n junction is a combination of two types of semiconductor materials, p-type and n-type, in a single crystal. The "n" (negative) side contains freely-moving electrons, while the "p" (positive) side contains freely-moving electron holes. Connecting the two materials causes creation of a depletion region near the boundary, as the free electrons fill the available holes, which in turn allows electric current to pass through the junction only in one direction. [1]