0
\$\begingroup\$

I just started building some logic circuits for gaining some experience in the summer while waiting for the next semester and I learnt about the concept of pull-up and pull-down resistors. The concept is understandable; for the case of pull-down resistors, they are for connecting a logic gate to the LOW state without causing the HIGH state to short to the ground and damaging the circuit when the logic circuit is switched to HIGH state with a switch.

What I don't understand is: why instead of connecting the logic gate to the ground permanently to get a LOW state and switching the HIGH state ON and OFF to change its state, why aren't we using an SPDT switch to switch between LOW and HIGH states without needing any resistor? Such comparison below: enter image description here

\$\endgroup\$

2 Answers 2

4
\$\begingroup\$

If this is a break before make switch, in the very short period while the switch is changing from one side to the other the input will be floating and can rapidly change state several times. In some instances this would be undesirable.

As pointed out in the comments below, even with a non-floating input, switch bounce can still occur. Depending on the type of switch, this can also cause a period of rapid state changes when the switch is operated. There are numerous answers covering ways of overcoming switch bounce on this site.

\$\endgroup\$
4
  • \$\begingroup\$ That makes sense actually since every mechanical switch has some delay to make contact and it's not an instant action, thanks for the quick reply! \$\endgroup\$
    – Berk
    Jun 15, 2021 at 12:21
  • 2
    \$\begingroup\$ Some switches are make before break. However if you installed one in the schematic you have drawn, there would be a brief period where the power supply would be shorted when operating the switch. \$\endgroup\$
    – HandyHowie
    Jun 15, 2021 at 12:22
  • \$\begingroup\$ Your answer reads like a switch with a pulldown can't 'rapidly change state several times'. Switch bounce is real, and sometimes a problem if ignored. \$\endgroup\$
    – Neil_UK
    Jun 15, 2021 at 12:33
  • \$\begingroup\$ @Neil_UK I have added to my answer. Thanks. \$\endgroup\$
    – HandyHowie
    Jun 15, 2021 at 12:57
0
\$\begingroup\$

A line going to the input of a digital logic gate should always be in a known state, either high or low. The alternative is "floating", which means it could be anything at all and is not being driven. In which case, you have an antenna and unpredictability attached to your input. Fortunately quite a few such chips have a high value resistor internally pulling up or down to stop this happening. But don't rely on it.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.