Not gate that differentiates between 0V and GND
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.