1
\$\begingroup\$

I imagined the simplest AND gate in context of a small microcontroller project operating at 3.3V with two input pins and two one output pin. This is not the case in reality though, I didn't find one AND gate chip that wouldn't also have VCC and Ground pins.

I'm trying to understand better (coming from programming side of things) and I'm assuming this is a design choice. Two questions related to this:

  • Can AND gates be built without VCC and GND be built (power from input pins) and does this even make sense in a arduino-like environment?
  • Why are GND and VCC usually needed?
\$\endgroup\$
15
  • \$\begingroup\$ Ah, the "inverter" logic gate has only one input: if you input "High", it returns "Low" and vice versa. \$\endgroup\$ – tlfong01 Jan 7 at 6:50
  • 1
    \$\begingroup\$ I think your question is, "Why do logic chips require power?" The power pins are not considered as inputs. \$\endgroup\$ – Transistor Jan 7 at 7:15
  • 3
    \$\begingroup\$ Consider the two input NAND or NOR gate. When both inputs are low the output must be high. This would not be possible in your scheme. Separate power is required. NAND and NOR are the backbone of all logic. \$\endgroup\$ – mkeith Jan 7 at 8:39
  • 4
    \$\begingroup\$ You need at least a GND as the reference, because voltages are differences of charge levels. I can think of an AND or OR that has no VCC, realized by diodes and a resistor. \$\endgroup\$ – the busybee Jan 7 at 8:40
  • 3
    \$\begingroup\$ You CAN make an AND gate with two diodes and a resistor and one power connection but it will have poor performance (input loading and fanout, and either low speed or high power consumption. \$\endgroup\$ – Brian Drummond Jan 7 at 15:14
3
\$\begingroup\$

Power pins are required for the gate to have gain, which is necessary for fan-out, meaning that one input can drive an output that (reliably and quickly) drives many more inputs on other gates (which may have high capacitance loading or current requirements). That's where the simplified textbook examples of gates typically fail the real-world usefulness test.

There's also no way for a gate without a power (ground) pin to source current if no inputs are high (and vice versa for sinking with all inputs high and no ground pin).

In some cases if the power connection is missing from a CMOS gate it can continue to function (albeit poorly) because the protection networks act as an "OR" gate, so if any input is high, the Vdd node sees that input voltage minus a diode drop plus. If there is a bypass capacitor, it may even continue to function even if all the inputs momentarily drop low.

This has fooled more than one person troubleshooting a circuit, since they might expect the gate to behave more passively without power deliberately applied. It's generally a very bad idea to do this intentionally, though there may be some cases where it is justified (and it is guaranteed to get clucks of disapproval and close inspection from 3rd parties). One of the issues is potential latchup. There are others.

\$\endgroup\$
2
\$\begingroup\$

I think you’re referring to standard 74-series logic ICs such as a 74HC00 with 14 pins and four NAND gates. Given that you need power and ground pins regardless of the number of gates, and back in the day you’d fabricate a lot of circuitry by connecting logic gates together, it makes sense to have several gates in one package. More recently (than the 1970s) you can get single gate ICs, often in SOT23-5 packages.

The reason for having VCC and GND (your question hints that you don’t know why) is that the gate needs to have these, not least so that it can output the logic states at the proper voltages and with a low impedance (required for high speed).

\$\endgroup\$

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