Avoiding the floating states of the input line
When using the GPIO pins for input, the HIGH state is active when the pin is receiving 3V, and LOW when it is grounded. GPIO inputs, however, are quite sensitive and can receive unintended HIGH signals from external factors, even self-noise produced from a prototype circuit. When a GPIO input pin can jump between 0 and 1 from influences outside of its control, it is said to be in a floating state. Fortunately, we can use the Raspberry Pi Zero's built-in circuitry or make our own to ensure that our inputs remain in a consistent state, unless our circuit and programming logic wants it to change.
Note
The actual voltages are given in the data sheet. Typically 2.5V (sometimes 1.8V) and above is consider logic HIGH, while below 0.8V is considered logic LOW. Voltages between this will cause input noise. This is because CMOS input circuitry typically does not employ hysteresis, unless the datasheet denotes the input buffer with a symbol. When a pin...