The physics of semiconductor devices