Fundamentals of semiconductor theory and device physics