# Not gate that differentiates between 0V and GND

A not gate typically just inverts the signal, so that V would turn into GND, and GND into V. Is there a not gate using transistors that would switch GND into V, but not switch 0V into V? (preferably using common transistors like npn and pnp)

By GND I mean having it connected to the ground pin of the power supply, and by 0V I mean not having it connected to anything at all.

• You're going to have to elaborate on what you mean here. 0V and GND are the same thing. – Hearth Oct 24 '18 at 12:46
• We usually refer to your "0V" as "floating" or "open-circuit", and (at least superficially) the solution to your problem would be to use a pull-up resistor on the input. – brhans Oct 24 '18 at 12:57
• So what do you want the output to be if the input is not connected? – Elliot Alderson Oct 24 '18 at 16:12

You need to have a pull up resistor at the input to the NOT gate connected to $$\V_{DD}\$$. This means that when the input is floating (i.e. not connected), it will be registered as a HIGH input. The driver of the input must have a low enough impedance to overcome the pull up resistor when you want to drive the input LOW. For that reason, the pull up resistor value is usually fairly large (10K upwards) - this is a gross simplification, but will get you started.