If p-type semiconductor and n-type semiconductor of a diode are equally doped, and if the diode is forward biased, then holes will move toward the n-type semiconductor and electrons will move toward the p-type semiconductor and they will diffuse with each other. Then will there be any electron that will go to the positive terminal of the battery if all of them have diffused with each other? I can't understand, please help me!
FORWARD BIAS OF A P-N JUNCTION
As the electrons move towards the positive terminal and the holes towards the negative, they will come to the depletion layer. This is a very narrow layer around the junction (i.e. around the interface of the two semiconductors.) In the depletion layer, electrons and holes can recombine, but the recombination rate is not high enough so as not to allow electrons to reach the positive terminal. This recombination effect takes place in the diodes of solar photovoltaic cells as well, and it is an interesting field of research in how to reduce its effectiveness. The recombination rate is smaller for larger energy gaps. By the way, these recombination processes are what generate the emitted light in LEDs, where the energy gap of the diode is arranged to be visible light of a desired colour.
When the p-n junction is forward biased, the electrons move from the negative battery terminal to the positive battery terminal. When one electron moves from one hole to the next, it leaves a hole behind (just like in chinese checkers), so it appears that the holes are moving in the opposite direction of the electrons, but the only things that "really" move, are the electrons. The rate at which the electrons diffuse through the p-n junction is determined by several factors such as the material, thickness, width, length, etc., of the junction, but the electrons are not "eliminated" by the holes. The electrons and holes do not diffuse/combine together and disappear!
When the p-n junction is reverse biased, the barrier resistance is increased, so little or no electron current flows. When forward biased, the barrier resistance is decreased, and a larger electron current flows. This property is used to make diode rectifiers. In the case of LEDs, some of the barrier electrons are "excited" to the point of producing photons (light), but depending on the efficiency of the junction, usually only a small portion of the current gets changed into light.
Reverse Bias of P-N junction When the voltage is applied this way round it tends to pull the free electrons and holes apart, and increases the height of the energy barrier between the two sides of the diode. As a result it is almost impossible for any electrons or holes to cross the depletion zone and the diode current produced is virtually zero. A few lucky electrons and holes may happen to pick up a lot of thermal (kinetic) energy. This gives them enough 'go' to cross the barrier, hence the reversed biassed current is not zero, just very, very small.
In forward bias, the holes in the p-region are shifted to the n-region and electrons in the n- region shifted to the p-region because of repulsion with battery terminals. As a result, the thickness of the depletion layer is decreased because the intensity of +ve and -ve ions is decreased in the depletion layer because the electrons are came into this layer through the connecting wires and goes near to the +ve ions and hence +ve ions disappeared similarly at -ve ions. The electrons are attracted by battery +ve terminal and hence -ve ions disappeared.
Thus, the depletion layer thickness decreases as a result of the charge carriers easily cross that layer. Hence conduction exist through the pn junction diode.