When P and N semiconductors are joined to make the PN junction semiconductor diode, the electrons near the PN junction jump from N to P and holes near the junction jump from P to N. This phenomenon creates a depletion
To obtain V-I characteristics of PN Junction Diode – Electronics Practical
