# Two Diode AND Gate - New to EE

extremepilot
Hi, I am new to EE.
On this page - http://hyperphysics.phy-astr.gsu.edu/hbase/electronic/diodgate.html#c1" - the very first circuit shows a diode-resistor AND gate. How does that work? I understand the OR gate shown right below it, but... the two inputs on this AND gate are connected to reversed diodes meaning charges can't flow. Doesn't this mean the input is useless? How does this work?

Last edited by a moderator:
M Danial Khan

Gold Member
With both A and B in a low state, you would need both A and B in a high state to get a high state output. As long a one input is low, that diode will be conducting. A diode drop in voltage is ~0.6v hence a low state.

Welcome to PF

extremepilot
Thanks!

The first part is basically the definition of an and gate, but could you please elaborate on

"As long a one input is low, that diode will be conducting. A diode drop in voltage is ~0.6v hence a low state." ?

If one diode is conducting it would be conducting towards the input (since it can't conduct the opposite way), turning the input into an output. That's all I understand from this circuit. Hope this clears up my understanding of it so you can see what I'm not understanding, heh.

Last edited:
Mentor
Hi, I am new to EE.
On this page - http://hyperphysics.phy-astr.gsu.edu/hbase/electronic/diodgate.html#c1" - the very first circuit shows a diode-resistor AND gate. How does that work? I understand the OR gate shown right below it, but... the two inputs on this AND gate are connected to reversed diodes meaning charges can't flow. Doesn't this mean the input is useless? How does this work?

Thanks!

The first part is basically the definition of an and gate, but could you please elaborate on

"As long a one input is low, that diode will be conducting. A diode drop in voltage is ~0.6v hence a low state." ?

If one diode is conducting it would be conducting towards the input (since it can't conduct the opposite way), turning the input into an output. That's all I understand from this circuit. Hope this clears up my understanding of it so you can see what I'm not understanding, heh.

No, the inputs are still inputs. Either input low will pull the output low. So both inputs have to be high for the output pullup resistor to be able to pull the output high. That's an AND function from inputs to output.

Last edited by a moderator:
extremepilot
No, the inputs are still inputs. Either input low will pull the output low. So both inputs have to be high for the output pullup resistor to be able to pull the output high. That's an AND function from inputs to output.

Ok I actually understand - if any of the diodes are grounded they conduct charge through them and away from the output preventing a 1 - then is the output also grounded? if not which part of the circuit gets grounded?

Mentor
Ok I actually understand - if any of the diodes are grounded they conduct charge through them and away from the output preventing a 1 - then is the output also grounded? if not which part of the circuit gets grounded?

In logic, you inputs and outputs get "pulled" high and low, either by transistors, diodes or resistors. So you aren't really "grounding" anything, just pulling to logic high or low.

So if you had two of these AND gates in a row, with the output of the first one driving one of the inputs of the second one, do you see how the low and high logic states can propagate along?

extremepilot
I think I actually understand and don't know why this didn't occur to me before. But in the linked schematic the output gets connected to ground, correct? I am working with a breadboard and understand that you can't just have (lets say 5v) power connected with no ground connected whatsoever, so going off this fact alone... output gets grounded correct? I'm extra unsure since the schematic on that site shows ground just floating by itself, not connected to anything.

Mentor
I think I actually understand and don't know why this didn't occur to me before. But in the linked schematic the output gets connected to ground, correct? I am working with a breadboard and understand that you can't just have (lets say 5v) power connected with no ground connected whatsoever, so going off this fact alone... output gets grounded correct? I'm extra unsure since the schematic on that site shows ground just floating by itself, not connected to anything.

I think I see what is confusing you. For each of the circuits shown, they show how power and ground are used by the circuit. For the diode-based AND circuit, no actual ground connection is needed, since the inputs being pulled low will pull the output low,without any actual in-gate connection to ground. If it were TTL totem-pole logic, then yes, there are transistors connected to power and to ground, to be able to actively pull the output high and low.

Gold Member
Also note what a logical 0 or 1 voltage range is.

In both of these gates, we have made the assumption that the diodes do not introduce any errors or losses into the circuit. This is not really the case; a silicon diode will experience a forward voltage drop of about 0.65v to 0.7v while conducting. But we can get around this very nicely by specifying that any voltage above +3.5 volts shall be logic 1, and any voltage below +1.5 volts shall be logic 0. It is illegal in this system for an output voltage to be between +1.5 and +3.5 volts; this is the undefined voltage region.

http://www.play-hookey.com/digital/electronics/dl_gates.html" [Broken]

Last edited by a moderator:
Gold Member
2021 Award
hi guys,

ok I thought I understood this till I looked further into that link and saw this diag
showing the transistor and the diode version side by side.

what puzzles me now is, in a floating input state, the transistor version the output is pulled low via the 4k7 resistor but the diode version is pulled hi by the resistor to +V so they are opposite.
That is correct isnt it ?

Inferring that one would have to take that into consideration if making discrete component gates?

Dave

#### Attachments

• and2.gif
4.1 KB · Views: 764
Gold Member
hi guys,

ok I thought I understood this till I looked further into that link and saw this diag
showing the transistor and the diode version side by side.

what puzzles me now is, in a floating input state, the transistor version the output is pulled low via the 4k7 resistor but the diode version is pulled hi by the resistor to +V so they are opposite.
That is correct isnt it ?

Inferring that one would have to take that into consideration if making discrete component gates?

Dave

There are both pull-up and pull-down resistors in logic gates, but the logic is the same. The only difference in the states are the voltage ranges for the high and low states.

extremepilot
Thank you

One more stab at it ... the output is pulled low if either or both of the inputs are grounded (low/'0'). If both inputs are high (connected to voltage over +3.5v) the output is not 'pulled down' and is high. Right? Also can you simply disconnect the input end of both diodes to prevent the output from being pulled down?

Last edited by a moderator:
Mentor
Thank you

One more stab at it ... the output is pulled low if either or both of the inputs are grounded (low/'0'). If both inputs are high (connected to voltage over +3.5v) the output is not 'pulled down' and is high. Right? Also can you simply disconnect the input end of both diodes to prevent the output from being pulled down?

You got it. Good job!

Last edited by a moderator:
extremepilot
Thank you VERY much

amaresh92
I think I see what is confusing you. For each of the circuits shown, they show how power and ground are used by the circuit. For the diode-based AND circuit, no actual ground connection is needed, since the inputs being pulled low will pull the output low,without any actual in-gate connection to ground. If it were TTL totem-pole logic, then yes, there are transistors connected to power and to ground, to be able to actively pull the output high and low.

is it correct that in AND gate the output is taken across the diodes or parallel to diode.so when diode conduct we measure the voltage drop of 0.6v.
thanks

Mentor
is it correct that in AND gate the output is taken across the diodes or parallel to diode.so when diode conduct we measure the voltage drop of 0.6v.
thanks

No. In real AND gates, diode logic is not used. The example is for teaching purposes only.