Pregunta de entrevista de onsemi

Explain what a voltage regulator does. What are the differences between a PMOS and NMOS?