# What is a simple explanation of a NOT gate circuitry that fits with the binary representation?

How is it that a NOT gate sets the output voltage based on the input voltage?

Is it possible to get a simple, maybe diagramatic, explanation of this?

For example, in the "transistor switch" of NOT gate diagram, I understand the rest of the parts but not what the transistor switch does. I don't quite see how this "inversion" happens physically.

• I think that should say $Q=\overline A$ Commented Feb 24, 2023 at 12:15

It's all about using the transistor as a switch:

simulate this circuit – Schematic created using CircuitLab

If you press the button, the switch closes and shorts the OUT node to the ground. Therefore OUT becomes 0. Likewise, if you release the button, the OUT node will be disconnected from the ground. Since there's nothing connected to the OUT node (i.e. OUT node is not loaded with another resistor connected between OUT and GND) no current will flow through the resistor so the OUT node voltage will be equal to +V, hence 1.

Pressing the button is the control signal here (Press for 1, release for 0). So if you press (apply 1) you'll get 0, and vice versa.

Now, transistor is basically a replacement of the mechanical switch in our example. They can be used as a switch as well as a controllable (not totally but sort of, for the sake of simplicity) resistance. They are used as switch here. So, with enough voltage (and therefore, enough base current) the transistor's collector and emitter nodes form a short circuit, so acts as an electronic switch.

• Why does OUT take the value of 0 and not Vcc value when we press? Commented Feb 24, 2023 at 10:57
• @MahNeh The top end of the resistor is Vcc, and the bottom end is GND. The OUT is taken from the bottom end. So, as I stated in my answer, when the button is pressed the button shorts the bottom end to GND, hence we get 0. Commented Feb 24, 2023 at 11:00
• But the cable is connected to both, why does it take the value from the bottom? Commented Feb 24, 2023 at 11:01
• @MahNeh the cable is not connected to both. Vcc and GND are the names that represent the positive and negative ends of the supply (e.g. battery). Check the updated schematics. Commented Feb 24, 2023 at 11:07
• When you close the circuit in B though what is B? There are labels under the circuits, use them. is it just a name for the pole? GND is a reference node. In your case, the reference is the negative terminal of the supply, so it's 0V. The positive end of the supply has, depending on the battery type, 1.5V or 5V or 9V or whatever, with respect to the reference node. Maybe you should study basic electrical circuits to fully understand the topic here. Commented Feb 24, 2023 at 11:31

Here's my advice: learn Kirchhoff's Voltage and Current Laws (KCL & KVL), and Ohm's law. I mean REALLY LEARN THEM. There's absolutely no point moving beyond that before you know what voltage and current are, how they are related, how to measure and calculate them.

Get all that sorted first, because everything, absolutely everything depends on it, even plumbing. Those principles underlie what you are asking here.

Here's an answer I wrote to a related question: What does a pull-up or pull-down resistor actually "pull"

I was tipsy at the time, and got carried away, but it'll give you some pointers.

Here are another couple of my answers, illustrating the application of all three laws in simple scenarios:

How to find the value of R

Why does the voltage not change when the resistance of the resistor changes?

To keep this short and simple, it all depends on the current flowing through R2. When the voltage at node A is high, transistor turns on, that enables current to flow through R2 which causes voltage at 'out' to swing low, Vcc-(drop through R2). When voltage at node A is low, transistor turns off. Almost no current flows through R2 and the voltage at 'out' is high, Vcc-(no drop across R2). Result: A LOW ... OUT HIGH A HIGH ... OUT LOW