Pull-up resistor
In electronic logic circuits, a pull-up resistor (PU) or pull-down resistor (PD) is a resistor used to ensure a known state for a signal. More specifically, a pull-up resistor or pull-down resistor ensures that a wire will have a high logic level or low logic level, respectively, in the absence of a driving signal. It is typically used in combination with components such as switches and transistors, which physically interrupt the connection of subsequent components to ground or to VCC. A closed switch creates a direct connection to ground or VCC, but without a PU or PD, when the switch is open, the rest of the circuit would be left floating (i.e. it would have an indeterminate voltage), which is generally undesirable.
For a switch that is used to connect a circuit to ground, a pull-up resistor (connected between the circuit and VCC) ensures a well-defined voltage (i.e. VCC) when the switch is open. For a switch that is used to connect a circuit to VCC (e.g. if the switch is used to transmit a "high" signal when closed), a pull-down resistor connected between the circuit and ground ensures a well-defined ground voltage (i.e. logical low) across the remainder of the circuit when the switch is open.
| Switch output voltage/signal | Switch opened | Switch closed | 
|---|---|---|
| With pull-up resistor | Positive supply voltage Input signal (high or low) | Ground voltage Low signal | 
| With pull-down resistor | Ground voltage Low signal | Positive supply voltage Input signal (high or low) | 
| Without pull-up or pull-down resistor | Indeterminate voltage | Switch input voltage/signal |