Ultra-basic question: where is the voltage in this simple circuit diagram? I'm trying to understand the role of pull-up resistors, and keep coming across this basic circuit diagram illustrating the "floating" condition.

I'm struggling to understand how the switch at S1 could make any difference whatsoever, since all I'm seeing is a Gnd at one end of the switch, and I have no idea what's happening after node #2. Is it to be assumed that there is some positive voltage at that end? That doesn't make sense given the direction of U1A's "arrow", which seems to indicate that positive voltage would be at #1. So I don't understand how this circuit is even a "thing" (obviously it needs a pull-up or pull-down resistor, but that's not the issue here).

Contrast diagram #1 with diagram #2 showing another undesirable condition where 5V is shorted to Gnd when the switch is closed. This one is more clear - Vcc is going into #1, through #2 and presumably at some point after #2 to Gnd. So what's the deal with diagram #1?

I would have thought that for the example, a circuit like this would be more accurate - please note, I'm not suggesting my circuit is a "good" circuit - I know it suffers from the same problems solved by the pull-up resistor. I'm specifically talking about how the first diagram doesn't show a positive voltage source, where mine explicitly does. (Please forgive me, that's my first time in circuit lab. I hope I used the right symbols) simulate this circuit – Schematic created using CircuitLab

• The input to the inverter might have some internal pull-up. And yes, it is supposed to have some hidden voltage source too. – Eugene Sh. Feb 14 '17 at 22:45
• Here is the datasheet. assets.nexperia.com/documents/data-sheet/74HC_HCT04.pdf Your first figure seems to be a sketchy design... Figure #2 is closer, but you need a resistor to prevent the switch from shorting Vcc to ground. – Daniel Feb 14 '17 at 22:55

Both Eugene's comment and Peter's answer are correct.

Many times we normally don't display Vin and GND on the schematic like your inverter. Particularly so when there are multiple devices in one IC. For example we will often break them apart on the schematic under A, B, C, and D for a quad package.

Often, inverters will contain internal pull up resistors along with schmitt triggers on the inputs. This makes using active_low logic much easier.

• Thanks! Your answer is the only one that sort of addresses my actual question - where is the voltage coming from in diagram 1? Maybe I should amend my questions' title. If I understand your answer, you're saying that diagram #1 is a bit of a "shorthand" and that there's other stuff going on that is meant to be assumed? – Tom Auger Feb 14 '17 at 23:08
• The power supply and ground connections on logic ICs are often not shown on schematics to reduce congestion, and the mess that results when you try to connect a couple of nets to all components. Everbody "knows" that ICs require a power supply, so we feel it is not necessary to explicitly show those connections. – Peter Bennett Feb 15 '17 at 0:29
• If you look at a data sheet like assets.nexperia.com/documents/data-sheet/74HC_HCT04.pdf, you see that there the 74HC04 has 6 separate inverters in a single 14-pin package. The input and output for each inverter use 12 of the 14 pins, and the other two are +Vcc and Ground for all six inverters. Often you can't draw that in any sensible way on a circuit diagram, because the 6 inverters may be used in different parts of the circuit, in different locations on the diagram. Sometimes there is a separate diagram which just shows the power supply connections to the whole circuit board. – alephzero Feb 15 '17 at 3:34
• Thanks for the extra clarifications. I'm disappointed that this diagram keeps showing up in references explaining electronics basics like a pull-up resistor. Why would they use a component with 14 pins as their example, when a simpler device would have sufficed? The point was to illustrate the flow of current and how a "floating" condition can occur at the pins when there is no voltage. To confuse the matter by selecting a component where its complexity is such that they can't reasonably illustrate where the voltage source is seems... ill-advised? – Tom Auger Feb 15 '17 at 14:06

The 74HC04 will have power (Vcc) and Ground connections - often not shown in schematics.

For the first diagram, with the switch closed, the input to the inverter will be grounded (at logic Low), and the output will be a logic High (we don't care what, if anything, is connected to the output).

The 74HC04 is a CMOS part, and has a very high input impedance. When the switch is open, the input to the 74HC04 can "float" around to any random value - the inverter does not force it to any defined state, so the input may be considered either high or low depending on the exact voltage, and the output will then be either low or high.

In the second drawing, the input will be a definite high with the switch open, but closing the switch will short-circuit the power supply - current will flow directly from Vcc, through the switch, to ground. The inverter can be ignored as it will have no power supply, hence won't work.

The correct circuit is: simulate this circuit – Schematic created using CircuitLab

In this circuit, with the switch open, the resistor will pull the input of the inverter up to Vcc, so the input will be seen as a High. As the input to the gate is a vdery high impedance, there will be no current through the resistor, hence no voltage drop across it. Closing the switch will pull the input to Ground, but the resistor prevents a short circuit between Vcc and Ground. In this case, there will be some current flowing in the resistor.