Why Use Resistors When Pulling Up or Down?

resistors

When pulling something up or down why is a resistor used and it not just connected straight to the +V or 0V rail?

Best Answer

It limits current to protect the switch (transistor, etc.) and allows signal sources with limited driving capability to change that node's voltage. Rails generally have high drive capability, or low resistance. Think voltage divider, including source impedance of signal and rail, then let the rail impedance be 0-ohms for simplicity.

Other factors, other than operating current and voltage drops, to determine the pull resistance is charge time and substrate leakage. A 2M-ohm pull-down resistor on a top layer exposed to humidity and salts won't do anything due to sub-1M-ohm electrical resistance of grime layer.