I only have a basic knowledge of electronics so I apologise if this is a stupid question.
I've created a NOT gate using a 2N2222 NPN transistor shown below:
When the switch is open, the LED is on and when it is closed the LED is off.
I understand that in parallel circuits all branches receive the same voltage, regardless of what is happening in other branches.
My issue is that the transistor and the LED + resistor are in parallel to each other. Hence, according to the parallel circuits rule, the LED should always receive the same voltage (and, as resistance is constant, the same current), and therefore be on, regardless of whether the transistor is conducting or not.
If that was the case the LED would be on whether or not the switch was closed or open and the NOT gate would not work.
Could you please explain why this is not the case?
I hope my question makes sense and thanks in advance.