Electronic – How the pull-up resistor settles the logic level

resistors

According to Wikipedia,
"Pull-up resistors are used in electronic logic circuits to ensure that inputs to logic systems settle at expected logic levels if external devices are disconnected or high-impedance is introduced."

enter image description here

and in the above figure,
When the switch is open the voltage of the gate input is pulled up to the level of Vin. When the switch is closed, the input voltage at the gate goes to ground.

What is the point of using the pull-up resistor anyway in this circuit ?

For example, If i were to remove the pull-up resistor from the circuit above, and the switch is open, still the voltage of the gate is pulled up the level of Vin.
Why use the Pull-up resistor then ?

Best Answer

For example, If i were to remove the pull-up resistor from the circuit above, and the switch is open, still the voltage of the gate is pulled up the level of Vin.

There are two ways of interpreting this sentence, both of which lead to problems in the circuit.

If we replace the resistor with an open, the input will be floating when the switch is open. You do not want floating inputs on CMOS inputs as that can lead to increased power consumption and possibly damage the input stage.

If we replace the resistor with a short, the input will indeed be pulled high when the switch is open. But if the switch is closed then you will short out your supply which is a Very, Very Bad Thing.

In both cases the solution is to have a resistor to the positive supply and a switch to ground, or vice versa depending on what you want the default input logic level to be.