Electronic – How Does This NOT Gate Work

not-gatetransistors

I think this question may have already been answered, in a way… But I am not satisfied.
I'm reading this book about creating a NOT gate and it mentions that electricity flow from the collector to LED2 connected directly to ground stops when the transistor begins conducting.

Question is, why would LED2 stop if it is connected in parallel? enter image description here

Best Answer

Current only flows into the base of the transistor, not out. When the switch is closed, the circuit acts like this:

schematic

simulate this circuit – Schematic created using CircuitLab

LED2 is shorted out. With no voltage across it, it doesn't conduct. All of R2's current goes straight to ground.

With the switch open, the circuit acts like this:

schematic

simulate this circuit

The transistor is now off (no collector -> emitter current), so 6 volts is put across R2 and LED2 in series. This allows LED2 to turn on and conduct, with R2 limiting the current.