How to solve a simple diode gate question from Sedra and Smith (Exercise 4.4)?

This question asks me to find the current and the voltage. I get the general idea behind diodes so far; if you apply a positive voltage across it, then the diode becomes a short circuit, and if you apply a negative voltage across it, the diode becomes an open circuit.

With this question, I'm just not sure how to deal with the fact that there's three different voltages going in, and how to use that to calculate the I and V. Furthermore, say I applied an input voltage of 0 Volts to all the inputs of the OR gate. How do I know whether the voltage across is positive or negative to see if it conducts? Can I use the fact that there's ground linked with the resistor somehow to calculate this? Same idea with the AND gate. I know that if the voltage is HIGH on all three inputs, then the output voltage stays HIGH at 5 volts as well. But why? How do the inputs being HIGH make the diodes open circuits or closed circuits?

It seems like such a basic concept, but I might be overthinking it and confusing myself.

I did find basically the same example I have linked here over here: diodes exercise logic gates? but I don't get why the 3 Volt is the correct? Aren't they all positive relative to the resistor and ground, so they'd all be conducting? I'm not sure

As a further edit, the second response to the question I linked in the previous paragraph is this:

In the left diagram, the diodes connected to 1 & 2 volts are reverse-biased and so the only current flowing is from the 3 volt source.

In the right diagram, the diodes connected to 2 & 3 volts are reverse-biased and so the only current flowing is into the 1 volt source.

How does one figure out that some of these diodes are reversed biased and others aren't?

• Yes, you are overthinking it. Given the answers, I assume it is not accounting for any $V_f$. If you want to figure out what is going on here, take the circuit and look at it one diode at a time with the others taken out, and then think about what would happen to each of those circuits with one more diode in it. I think the answer will be more obvious then! – Daniel Sep 8 '16 at 0:07
• Also, please only ask one question at a time on this site. That's the format. And be warned that you should tread carefully with homework questions, although it seems like you've done a good amount of thinking about this. Showing effort is key. – Daniel Sep 8 '16 at 0:09
• Hi @Daniel, thank you for the reply! Regarding breaking the circuit down and analyzing it one diode at a time--I think with the OR gate, each of the diodes would conduct when looking at it one at a time, since you have a positive voltage being applied at the + end of the diode. With all three together, the +3 V diode would just cover over the +2 and +1 (since the 3 is the biggest), so that's why the final answer has the 3mA and +3 V. I'll try the same logic in a second with the AND gate, but is my logic for why the diode is conducting correct? – Yuerno Sep 8 '16 at 0:24
• Yeah. I mean, if you have an area of higher voltage, it's always trying to push into an area of lower voltage. So that 3V diode is pushing through to the middle node and causing the other diodes to close off. Because you're using an ideal diode model, that comes out to exactly 3V and 3mA through the resistor. – Daniel Sep 8 '16 at 0:50
• @Daniel: After doing some further research, it seems like the proper way to go about solving these diode circuits is to make assumptions and then test them all till you find the one that works. So for the OR gate, I'd try first with assuming only one of the diodes are on at a time. With the 3 V diode, it makes perfect sense, since when the output is 3 V, the other two diodes have a negative voltage across them, which means they're off. If I had only the 2 V diode turned on, there'd still be a positive voltage across the 3 V diode, which means my assumption is wrong. Is this the correct way? – Yuerno Sep 8 '16 at 1:47

It does sound like you're over-thinking things a little, but that's probably because you're struggling to reconcile several seemingly contradictory principles in your head. Don't feel bad. This stuff is hard.

One thing I think you're getting caught up in is the difference between "applying a voltage across a diode" vs implicitly calculating the voltage across a diode. If all you had was a 3V power supply and a diode, then you'd be explicitly applying 3V across that diode:

simulate this circuit – Schematic created using CircuitLab

But that kind of circuit almost never happens and is hardly useful. In fact, if you ever tried that circuit, you'd probably learn very quickly what silicon smells like when it burns up.

A much more realistic (and useful) circuit might look like this:

simulate this circuit

In this circuit, you can't apply a voltage across the diode as you did above. The voltage at NODE1 is a function of the diode and the resistor. Like a balanced ecosystem, everything in a circuit can affect everything else.

So will the diode conduct? Assuming an ideal diode, you can answer that purely on observation without doing any math. The anode of the diode is directly connected to the highest potential point in the circuit: 3V. The cathode (NODE1) is connected to a resistor which is connected to ground. The diode is clearly positively biased and current will flow through it. Since this is an ideal diode, there is no voltage drop across the diode, so NODE1 will also be 3V. Now that we see 3V at NODE1, we can forget about the diode and just use Ohm's Law on the resistor. A 3V drop across a 1k$\Omega$ resistor will result in 3mA through the resistor.

Now let's introduce a circuit with two diodes and one resistor.

simulate this circuit

I like to approach circuits like this by imaging time slowing way down and watching what happens in super slow motion. Before the voltages were applied, NODE1 was resting at 0V, so we'll start there. The 2V and 3V supplies are attached to the inputs and current starts flowing. At that first instant, both diodes are positively biased: there's a positive voltage on their anodes (3V and 2V, respectively) and their cathodes are both at 0V. You can imagine those first couple of electrons starting to flow through both diodes. But that will cause the voltage at NODE1 to begin to rise.

Lets say a tiny fraction of a second later the voltage at NODE1 has raised to 1V. The anode of D1 is 3V and the cathode is 1V. Positively biased. The anode of D2 is 2V and the cathode is 1V. Also positively biased. Current still flowing through both diodes. Another tiny fraction of a second later, the voltage at NODE1 raises just above 2V. For D1, this is no problem, it's still positively biased. But now D2 has a slight higher voltage on its cathode than its anode. D2 suddenly becomes reversed biased and stops conducting. Now D2 can be ignored from the circuit as D1 continues to conduct. Eventually, the voltage of NODE1 will become 3V since D1 is the only diode that is still conducting.

Red arrows indicate current flow.

simulate this circuit

All that happens in a timespan measured in millionths or billionths of a second. But it shows that both diodes do conduct at first. But eventually, the diode with the larger voltage on its anode dominates the diode with the lower voltage. You should be able to easily apply that same reasoning to a circuit with 3 diodes and a resistor.

You can use the same slow motion technique on problem E4.4(f) in your question. In that case, assume the voltage at the top of the resistor was 0V and then suddenly switched on to 5V. Initially, the anodes of all 3 diodes will be 0V and then begin to rise. Which diode will start to conduct first? Once that diode is conducting, will the voltage at the anodes continue to rise or will it stop there? If it continues to rise, what happens to the amount of current going through the resistor (use Ohm's Law)? How does that resistor affect whether the voltage continues to rise or stops at the first diode?

• This is incredibly awesome, thanks so much for taking the time to write out such a thorough answer! Now, as for the AND gate, I believe the only conducting diode will be the 1 V diode, because having solely either the 2 V or 3 V diodes on would violate the diode rules (since if you tried to say only 2 V is on, that still means the 1 V diode HAS to be on, since there's a positive voltage across it). It doesn't make sense to have a 2 V and 1 V or 3 V and 2 V diodes on at the same time, since you'd have conflicting voltages. Therefore, 1 V is the only one that can be on. – Yuerno Sep 8 '16 at 3:43
• Also, when the voltage rises at the anodes, the 1 V will begin to conduct first, at which point I believe it would stop because that's when you have the least voltage drop across the resistor (which I think is what you want?). If the voltage kept going up, the current would obviously drop. – Yuerno Sep 8 '16 at 3:44

I really liked Daniel's first comment to your question. Right out of the gate he told you how to look at it in the best way one can do in a comment. Looking at your latest comment (to Daniel), I can now see where your brain is at and how you might need some additional information.

You say that you completely understand the result if you start out thinking that the $3V$ diode is turned on. You recognize that the other diodes will be reverse-biased and therefore those other ones will be off. That's a great starting point. Then you seem confused about then thinking over the situation where the $2V$ diode is instead turned on. Then you think that the $3V$ diode is also turned on and that confuses you because then you have two different voltages hooked up to the same line and you don't know which one would win, or why.

But the answer comes when you take just a little bit of a closer look at the situation there. You've forgotten all about the $1k\Omega$ resistor! Now let's factor that into your thinking.

So, start out with the $2V$ diode turned on. (Assuming no diode drop for now -- I guess these are ideal diodes.) This should pull the line over the resistor to $2V$. You already know this. But the current will be $2mA$, right? Now, let's turn on that $3V$ diode. What happens? Well, the current rapidly starts to rise as the $3V$ diode now starts to flood in current from its $3V$ source. This additional current will force a higher voltage drop across the $1k\Omega$ resistor as this new added current rushes in. This forces the resistor's voltage drop to increase, thus forcing that side of the resistor upward towards the voltage from the $3V$ diode. Quite quickly, you can see, the voltage across the resistor will increase above $2V$ and the $2V$ diode will simply turn off now, yielding control over to the $3V$ diode. Once the voltage drop across the resistor reaches $3V$ then that diode will stop increasing its current flow at just the right point. And all the other diodes will now be off.

As you can see, the $3V$ diode will, in effect, force all of the lower voltage diodes to be turned off. Even if they were on before.

A similar (but reversed) thinking process answers the other question, too.

Does that help make sense of it?

• Minor point, current will not be infinite because there is no current flow across the diode except what goes through the resistor. There is no capacitor or parasitic capacitance to make that the case. It simply goes from 0mA to 3mA instantly out of the 3V source. – Daniel Sep 8 '16 at 3:04
• @Daniel: Good point. I was speaking elliptically in a way to get him to imagine the sudden change. I've edited it out. – jonk Sep 8 '16 at 3:09
• Thank you very much for the detailed reply, this is very helpful! – Yuerno Sep 8 '16 at 3:40

In positive diode logic "high-man wins"

In negative diode logic "low-man wins"

Now apply this logic to diode OR circuit.

• Would you be able to clarify what the high-man and low-man statements mean? – Yuerno Sep 8 '16 at 0:48