Question: how npn transistor works as a switch?
Answer: NPN Transistor as a Switch Based on the voltage applied at the base terminal of a transistor switching operation is performed. When a sufficient voltage (Vin > 0.7 V) is applied between the base and emitter, collector to emitter voltage is approximately equal to 0. Therefore, the transistor acts as a short circuit.