with n-doped semiconductors having a higher Fermi energy and p-doped semiconductors having a lower energy. At the interface between an n-doped and p-doped region in a semiconductor, band bending will ...