Mechanism of Formation of P N Junction