# What size does my resistor have to be for the IC input?

I am testing some logic gate ICs to include in future projects. However, even when both of my switches are off, my logic IC is still sending a logical HIGH to my LED.

I think my problem is the same as this question. I would like to follow the second answer and put the right pull-up resistor in place.

Using the single gate pull-up resistor value calculation on this website, I got the resistor value to be 5MΩ. However, I don't have a 5MΩ resister (Arduino comes with 1MΩ max, but that is too small I think), and I don't want to waste my money if my problem is something different.

Other than the IC, I have tested all of my other parts, and I know that they work.

My circuit is below. Unfortunately my camera is not very good. Let me know if you want anything else from me :)

• 5M ohm sounds so random.
– jay
Commented Nov 24, 2021 at 5:23
• please add a schematic diagram Commented Nov 24, 2021 at 5:24
• Where do you get 5 MΩ from? Pullup resistors don't need much thought unless you're concerned about power consumption; just stick a hundred k and it'll probably work. Commented Nov 24, 2021 at 5:30
• it appears that you have the switches and resistors wired incorrectly. The switches should be between the input pin and Ground/negative, while the pull-up resistors go between the input pin and Vcc/positive. It appears that you have teh switches in series between the input pin and the resistors, wit the resistors going to Vcc. 10K or so is a common value for pull-up resistors. Commented Nov 24, 2021 at 5:36
• @JD9999 But that's the problem, you don't use those values, at least not like that, to come up with a value for a pull-up resistor. Commented Nov 24, 2021 at 8:52

Those resistors are just in series with the switches, either the switch connects IC pins via resistors or completely disconnects IC pin. So they are not pull resistors.

Also the 1Mohm or larger resistance value seems far too high to be of practical use, but you did not mention why you think it is the right value.

Just use 4k7 pull-up which connects to IC pins, and have the switches pull the IC pins directly to ground.

Your switches are in series with resistors so they don't acts as pull-up.

For learning purpose I recommend use schematic below where resistor are connected as pull-down. During switch off the inputs are grounded (Low) and after switching on you connect input to 5V.

It's more clear for beginners when activation of switch sets input high rather than low. Using pull-up makes this reversed.

simulate this circuit – Schematic created using CircuitLab

• Just a note that it might work in this case where there is a CMOS chip used. But it will not work in a case if there is a TTL chip. So it will just be a simpler and more general solution to have resistor pull-ups to supply and buttons to ground. Commented Nov 24, 2021 at 10:43