Background: Math & Physics undergrad Reason for asking: So I was trying to understand semiconductor diodes and realized it all hinged on the PN junction which in turn is worthy of attention because of the effect created by the depletion zone. As I continued on studying up on this I began understanding why the depletion zone is important but then realized I didn't understand the mechanism behind the spontaneous formation of the depletion zone because I don't understand doping. Let me describe what I believe happens in doping and the PN junction, and you guys correct me: In doping we take a semiconductor, and add impurities to the semiconductor so that it has excess charge in the form of extra electrons or extra holes (is this where I'm wrong?). When we have P-type semiconductor (extra holes) and an N-type semiconductor (extra electrons) adjacent to each other we'll have a region we call the PN junction at their point of contact. Here is where the depletion zone forms spontaneously as holes and electrons diffuse across the artificial boundary (really just electrons right?). I get a little lose here because according to my sources, positive ions will form on the N side and negative ions on the P side due to diffusion, but here i thought when you recombine electrons and holes you have neutralization and so I would expect neutral atoms in this region (and worse this neutral region should spread across the whole material till all of it becomes locally electrically neutral). Ignoring this caveat, we will have an E-field due to the separation of ions going across the junction and this is what gives rise to the properties of a diode. Please correct me wherever I'm wrong, and throw in equations or further information if you find it interesting or relevant.