# Why don't pull-up/pulldown resistors prevent microcontroller I/O pins from changing state?

Apologies for the vague title, wasn't sure how to summarize the question. I've been struggling with this for two days and feeling a bit desperate.

This is how I understand simple CMOS gates work in principle.

I also understand that microcontroller inputs should not be left floating since due to their high impedance they can self bias if so. So we use pull-up/down resistors. What I struggle to understand is, for example in the below we are providing a constant connection to Vcc. Why doesn't that permanently peg the input high, or at least cause issues since a 10K resistor is a comparatively low value considering the input impedance of the microcontroller?

My understanding is something like this would happen in principle (although of course the pins on the microcontroller would have a somewhat different design than an inverter gate)

Is this correct? If so in principle, unless there are some system specific restrictions, you could choose to design your circuit with either pull-up or pulldown resistors and appropriate switches, as you see fit?

I would really appreciate your input.

• The pull-up forms a voltage divider with the resistance of whatever is driving it. When input is low, the result of the voltage divider be below the turn-off threshold, including tolerances, and above the turn-on threshold when input is high. I.e. V_IL(min) and V_IH(max) listed in the datasheet for the chip in the "electrical specifications" section. The pull-up/down should be neither too weak nor too strong, and depends on the application. The range of pull-up values is something like 5K-33K, 10K is very typical. Commented Jan 29, 2021 at 14:14
• Modified your title to say what you are asking. Commented Jan 29, 2021 at 14:36
• Because the pullups are resistors. Generally, rather high resistors (10K or more), and therefore pretty weak pullups that can easily be overcome by output transistors, swiches, etc. Short that signal to ground, and 0.5mA or less (5V, 10K) will flow. No big deal ... unless you're trying to get a year's life out of a coin cell.
– user16324
Commented Jan 29, 2021 at 15:33
• Thank you for the answers. So in principle my understanding is correct? When the switch is in the low position, the path to Vcc (to which we've attached the pull-up resistor) still has an influence on the input pin, however it's is so small that the transistors still bias correctly and the input pin registers the correct value. Commented Jan 29, 2021 at 18:52