# Integrate Circuit Logic Gates Ground Question

1. ## Integrate Circuit Logic Gates Ground Question

Hello there.
I have one question that buggs me.
Why for some ICs, you need to connect the A/B logic gate inputs to the ground (-) through a rezistor for the output to come out right, and for some others you can just plug the (+) rail into the input and you get the right output?
Thanks.

•

2. ## Re: Integrate Circuit Logic Gates Ground Question

Some gates invert their output.
A dual input "OR" gate like a CD4071: with either or both inputs high, the output will be high.
A dual input "NOR" gate like a CD4001: with either or both inputs high, the output will be low.
The difference is the NOR inverts the output. There are also AND and NAND gates.

You do not need a resistor to ground, you can connect a gate input directly to ground to make it a logic low.
Why don't you study about logic gates and look at their datasheets?

3. ## Re: Integrate Circuit Logic Gates Ground Question

It does not matter what kind of gate, nor, or, xor, nand etc. What I mean is : an input takes 0 or 1. Low or high. For most gates, low is between 0 and ~1V. High is ~3...5V. I use dip switches to turn the inputs high. But if I don't connect the input to (-) rail through a resistor when I turn the input high the gate doesn't work right. If I measure the voltage drop on the resistor I have .6V for low input. Why I can't just leave the low input to 0V (not connected)?

4. ## Re: Integrate Circuit Logic Gates Ground Question

Which logic family are you talking about?

5. ## Re: Integrate Circuit Logic Gates Ground Question

Hi,

All logic gates need supply: You always need to connect VCC and GND
AND... Very important: All logic gates need a true voltage at ALL (used or not) of their inputs (*1) . They must not be left floating.
So, when an input is not used: connect them either to VCC or GND, you can do this with or without a resistor.

(*1): Unless otherwise noted in the datasheet.

Klaus

6. ## Re: Integrate Circuit Logic Gates Ground Question

Many standard cell libraries offer (and rules require) use of
"tie1" and "tie0" (or whatever name the library creators
picked) "gates" for tying off unused inputs. The purpose
being to make a FET gate connection with proper potential
but not directly attached to power rails, which are a global
ESD threat to the core (unlike external pads which have a
whole different set of design constraints / rules).

7. ## Re: Integrate Circuit Logic Gates Ground Question

Originally Posted by editheraven
For most gates, low is between 0 and ~1V. High is ~3...5V.
Only for old fashioned 74xx TTL logic, not for newer CD4xxx Cmos logic.

I use dip switches to turn the inputs high. But if I don't connect the input to (-) rail through a resistor when I turn the input high the gate doesn't work right. If I measure the voltage drop on the resistor I have .6V for low input. Why I can't just leave the low input to 0V (not connected)?
Again you are talking about old TTL. Its datasheet says its maximum input current (going positive) is 1.6mA so its input will be +0.6V if the resistor to ground is 0.6V/1.6mA= 375 ohms. If you leave the input disconnected then its 1.6mA of input current will pull it up to a logic high.

8. ## Re: Integrate Circuit Logic Gates Ground Question

You were right. I was talking about this ICs : SN74LS86A or SN74LS32 which needds to have a low input voltage (not floating) vs CD4011B which can work with floating low input. The first are TTL and the last nand gate is cmos. I guess I was just ignorant enough to believe that TTL chips are not manufactured today.
I'll study more about ttl logic gates.
Thank you.

9. ## Re: Integrate Circuit Logic Gates Ground Question

TTL and LSTTL is still manufactured these days, but not used for new designs.

As already stated, you don't need a resistor to pull the inputs to ground, and for forced low level there's no difference to CMOS logic inputs which aren't allowed to float either.

Floating TTL inputs are read as high level, but it's not recommended to leave it floating. Standard TTL 74xx and 74Sxx inputs are sensitive to overvoltage, thus design rules suggested to connected it to VCC only through a resistor, e.g. 4K7. 74LSxxx has input diodes and higher input voltage rating, so inputs can be tied to VCC without problems.

10. ## Re: Integrate Circuit Logic Gates Ground Question

Hi,

vs CD4011B which can work with floating low input.
CD4011 is a CMOS IC. Especially here it is not allowed to leave inputs floating.

--> connect ALL inputs.

Klaus

•

11. ## Re: Integrate Circuit Logic Gates Ground Question

Then if I want to build larger projects, what should I do? I learn and follow youtube projects and people there manage to build for instance, a 4 bit full adder, with no input resistors. But I have problems while doing that. ICs even turn from positive logic to negative logic when input is floating. For larger (tutorial) projects how can I avoid using resistors for every input. It costs space. A lot.

12. ## Re: Integrate Circuit Logic Gates Ground Question

Originally Posted by editheraven
Then if I want to build larger projects, what should I do? I learn and follow youtube projects and people there manage to build for instance, a 4 bit full adder, with no input resistors. But I have problems while doing that. ICs even turn from positive logic to negative logic when input is floating. For larger (tutorial) projects how can I avoid using resistors for every input. It costs space. A lot.
How many times does it have to be repeated...

Connect the unused inputs directly to either Vcc or Gnd depending on which way disables that input

e.g. AND gate to disable one of the inputs connect that input to Vcc. An OR gate to disable one of the inputs tie that input to Gnd.

You don't need a resistor.

13. ## Re: Integrate Circuit Logic Gates Ground Question

I am not talking about the unused inputs. I am talking about the inputs that are manually set to high or low manually, from a dip switch. When the switch is open, the input it's undefined. I am talking about the inputs that at some point will be high.

14. ## Re: Integrate Circuit Logic Gates Ground Question

Originally Posted by editheraven
Then if I want to build larger projects, what should I do? I learn and follow youtube projects and people there manage to build for instance, a 4 bit full adder, with no input resistors.
You did not give a link so I found a 4 bit adder on You Tube that uses DIP switches and wrongly uses no resistors. You can learn a lot of wrong things on You Tube and on Instructables.

What does an old fashioned TTL logic input do when it is not connected to anything (the DIP switch is off)? We told you. It either floats high or it picks up all kinds of interference.

15. ## Re: Integrate Circuit Logic Gates Ground Question

Originally Posted by editheraven
I am not talking about the unused inputs. I am talking about the inputs that are manually set to high or low manually, from a dip switch. When the switch is open, the input it's undefined. I am talking about the inputs that at some point will be high.
Okay then use double throw DIP switch and leave out the resistors.

16. ## Re: Integrate Circuit Logic Gates Ground Question

Analogue circuits usually need a lot more components than microcontroller circuits, that's life. Resistors or push-pull type control, the second is more parts than the resistor. Maybe different inputs that will use the same input signal can be tied high or low sharing one resistor between them, I do that with unused inputs to save on resistors.

Another option could be tri-state dip switches, high - nothing - low.

•

17. ## Re: Integrate Circuit Logic Gates Ground Question

DIP switches are single pole on and off. If a DIP switch sets a logic low when it is ON then a resistor to the positive supply is supposed to be used to provide a logic high.
The You Tube video shows the array of DIP switches connected to the logic inputs and ground, not the positive supply voltage.

18. ## Re: Integrate Circuit Logic Gates Ground Question

Originally Posted by Audioguru
DIP switches are single pole on and off. If a DIP switch sets a logic low when it is ON then a resistor to the positive supply is supposed to be used to provide a logic high.
The You Tube video shows the array of DIP switches connected to the logic inputs and ground, not the positive supply voltage.
They also make DIP switches that have a common point and two other connections, so the common goes to your input and one throw goes to Vcc and the other throw goes to Gnd. SPDT switch e.g. Grayhill 78J04T, which makes this switch an on-on switch there is no off position (or in the OPs case a logic 0 or 1)

19. ## Re: Integrate Circuit Logic Gates Ground Question

Yes, Digikey has some of the Grayhill 4 position SPDT DIP switches in stock for "only" \$3.81US each.

20. ## Re: Integrate Circuit Logic Gates Ground Question

Originally Posted by Audioguru
Yes, Digikey has some of the Grayhill 4 position SPDT DIP switches in stock for "only" \$3.81US each.
Hey I'm sure if you go on Alibaba or such, one can find a cheap Chinese SPDT DIP switch that will work say 100 times before failing

Actually I just posted that particular switch as an example of the type of switch that would do the job, it was one of the first ones that came up when searching for a SPDT. I didn't even look at any of the other brands of course I probably should have with all the cheapskates on this forum who want to buy everything from resistors to ASICs for \$0.01

--[[ ]]--