Logic gate GND = constant power wasting?

Thread Starter

NathanielZhu

Joined Dec 5, 2011
50
I've been confused about something for a while.
So logic gates work by basically controlling how current moves from Vcc to either GND or OUTPUT.

Like for example, a NOT gate with input 0 properly moves the Vcc current through the OUTPUT to power for example a LED.
But, if the input is 1, then it flows into GND....and the LED is off.
But the LED is off and current is still flowing.
The sounds like a huge waste of power to me. It sounds like basically a short circuit to me.

I understand putting a resistor before GND but this resistor always has to be smaller than the OUTPUT resistor otherwise the current will just follow the path of least resistance and go out through the OUTPUT. That basically means that GND (off mode) will always waste more power than the OUTPUT path. That just doesn't seem right....

So what do you do about that?

And another thing I do not get is this:
Are logic gates ever completely on or completely off?
Or does it depend on the type of transistor being used? Like I think bjt's aren't usually completely on or off but mosfets can.
 
Last edited:

Papabravo

Joined Feb 24, 2006
21,159
TTL gate outputs don't source very much current. They can sink considerably more than they source. A TTL input will source 1.6 mA since it is the emitter of a transistor. There is nothing at all that you can do about what you consider wasted power except use LS parts which only source one-forth of that amount or 400 μA. You could also use CMOS parts if you are that concerned about it. You didn't think there was such a thing as a free lunch -- did you?
 

WBahn

Joined Mar 31, 2012
29,978
It sounds like you don't understand how logic gates work.

Let's consider a NOT gate. When the input is LO, it will provide a relatively low impedance path between Vcc and the output and a relatively high impedance path between GND and the output. Conversely, when the input is HI, it will provide a relatively high impedance path between Vcc and the output and a relatively low impedance path between GND and the output.

Other than the current being sourced/sunk at the output, CMOS gates consume virtually no power except when switching states.
 

sailorjoe

Joined Jun 4, 2013
364
Examine the circuit diagram of a typical TTL logic gate, a simple inverter.
If you ground the input, resistor R1 will limit the current from Vcc to GND. If you use a resistor to GND, you have to be careful because now you have a voltage divider, and depending on the voltage, you could put the circuit into an undefined state, which is the most power you can draw.

As wbahn described, the point of the gate is to switch on either Q3 or Q4, but not both at the same time. If Q4 is on, it sinks current to ground from the load, not from Vcc. If Q3 is on, it sources current from Vcc to the load, limited by R4 and D2.

For extra credit, study how a NAND gate operates next.

For your last question, transistors can be completely on or off, but all physical electrical components exhibit some amount of leakage when they're off. And all electrical components exhibit some amount of resistance even when they're fully on, which is why transistors can explode if they carry too much current. In both cases, the amount is generally quite small. Datasheets will tell you a lot if you really them carefully.

image.png
 

hp1729

Joined Nov 23, 2015
2,304
I've been confused about something for a while.
So logic gates work by basically controlling how current moves from Vcc to either GND or OUTPUT.

Like for example, a NOT gate with input 0 properly moves the Vcc current through the OUTPUT to power for example a LED.
But, if the input is 1, then it flows into GND....and the LED is off.
But the LED is off and current is still flowing.
The sounds like a huge waste of power to me. It sounds like basically a short circuit to me.

I understand putting a resistor before GND but this resistor always has to be smaller than the OUTPUT resistor otherwise the current will just follow the path of least resistance and go out through the OUTPUT. That basically means that GND (off mode) will always waste more power than the OUTPUT path. That just doesn't seem right....

So what do you do about that?

And another thing I do not get is this:
Are logic gates ever completely on or completely off?
Or does it depend on the type of transistor being used? Like I think bjt's aren't usually completely on or off but mosfets can.
Either way you are correct. Power does get wasted. CMOS wastes far less power than TTL.
 

sailorjoe

Joined Jun 4, 2013
364
Nathaniel, the comments above are absolutely correct. In fact, since the invention of the integrated circuit, one of the problems that has to be solved over and over again is how to reduce the power requirements of logic gates, so that many more gates can be put on a chip and the chip won't burn itself up. That's why there are logic gates based on different types of transistors. There has been a constant search for transistors and gates with lower power use yet faster operation.
The circuit I showed above is one of six gates on a single chip. Multiply that by about a million, and the problem becomes a big deal. One thing we've seen in the past decade is moving from mostly 5 V logic to 3.3 V, and down to 1.3 V in some cases. Less voltage, less power consumption.
I hope all these responses have helped to clear up your understanding of logic gates.
 
Last edited:

Thread Starter

NathanielZhu

Joined Dec 5, 2011
50
As always thanks for taking the time to answer my questions.
I was wondering, how did you guys start getting good at electronics.

Here's what I do.
1. Read a book that covers most electronic parts in general
2. *as I read, I google everything that makes no sense one at a time
3. Skip all the math at this point
4. Find a diagram of the pinouts, check voltage ratings, and practice some simple circuits I find by searching " simple ____ circuit"
5. Imagine current flow

But I feel like most of the information that I read doesn't make much sense to me. Because, it feels like many given explanations require it's own explanation. And the cycle drags all the way down to me asking "well what does the internal circuit of the chip look like"? I find a schematic of the internal circuit but it usually have so many parts to it that I can't figure out where to begin.

ANother thing that gets me most is that I get a high number of ppl confirming my suspicion that I learn things incorrectly. How do I know what I know is true? Because I assume incorrect assumptions of theory may STILL result in me making circuits that function. But frequently as I am reading the explanations, it only appears to confirm what I already believe. So either I am just not properly explaining my problems or I have a serious bout of confirmation bias.

Here's another thing I still am wondering. What you learn from one IC....do you find the knowledge transferable for example to every IC of the family. For example, If I knew how to use 1 opamp, are all/most other opamps used the same way?
Like is there an industry standard for every family (timer, amp, etc) of IC?
 

#12

Joined Nov 30, 2010
18,224
Like is there an industry standard for every family (timer, amp, etc) of IC?
Somewhat, yes. There are several families of logic chips which contain pretty much the same inventory in each family. An op-amp is an op-amp as far as I'm concerned. Just, each one has different limitations. Series regulators, shunt regulators, comparators, timers and counters...Still, there are thousands of one-purpose-only chips. That's what datasheets are for. Even if you're working in a well known category or family, you have squat without the pinout and limitations of the chip in your hand.
 

WBahn

Joined Mar 31, 2012
29,978
I started by wanting to make a circuit that accomplished something. The first one was a code practice oscillator for learning Morse code -- that introduced me to astable 555 circuits in high school. Then I wanted to put in a secondary battery system in my truck but be able to isolate them from each other but still charge both from the alternator. That introduced me to diodes and LEDs and relays. As a freshman in college I wanted to build a Jeopardy-style quiz controller for three teams and that introduced me to 7400 logic. It also introduced me to the world of surplus electronic stores and also an appreciation for current draw and how long a 9V battery will last in a circuit containing 9 7400 NAND gates, all of which are used, an a 555 timer.

Find something simple that you want to make. Then focus on learning just the things you need to overcome to make your project work.
 

Papabravo

Joined Feb 24, 2006
21,159
I studied other designs until one day I up and designed a single board z80 computer to run an engraving table. This was about 15 years after graduation(ca. 1985). Having the first PCB turn go into production was a rush I still remember to this day. Before that I designed memory and I/O boards that I wire wrapped for a KIM-I computer (ca. 1977-1981).

https://en.wikipedia.org/wiki/KIM-1
 
Last edited:

sailorjoe

Joined Jun 4, 2013
364
PB, I still have my KIM-1. Still looking for a good project for it around the house. Ha!

Nathaniel, everyone learns differently, so find your personal path. Also, you may be starting out with books that are too advanced, and assume some background you don't yet have. Consider finding a club of people who can work with you on explanations of circuits. i found it helpful to read electronics magazines where they gave detailed explanations of how circuits work. Not sure they're available any more, but web sites have taken their place. Here's a great place to start: http://www.allaboutcircuits.com/education/ Don't overlook the math, learning it gives you tools to understand a circuit far better. You need trigonometry at least, and eventually basic calculus. Also, learning binary arithmetic will help a lot with digital circuitry.
Keep at it. If it was easy, you would have learned it in the third grade. But really, it's a lifetime learning adventure.
 

crutschow

Joined Mar 14, 2008
34,283
One additional point.
Don't shy away from data sheets about a product. I know they can appear intimidating, but they contain just about everything you need to know to use the device.
Many questions on these forums are about device operation that could be answered by the op if he read the data sheet.
 
Top