Two Diode AND Gate - New to EE

  • #1

Main Question or Discussion Point

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:
  • Like
Likes M Danial Khan

Answers and Replies

  • #2
dlgoff
Science Advisor
Gold Member
3,814
1,741
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
 
  • #3
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:
  • #4
berkeman
Mentor
57,322
7,314
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:
  • #5
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?
 
  • #6
berkeman
Mentor
57,322
7,314
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?
 
  • #7
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.
 
  • #8
berkeman
Mentor
57,322
7,314
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.
 
  • #9
dlgoff
Science Advisor
Gold Member
3,814
1,741
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:
  • #10
davenn
Science Advisor
Gold Member
2019 Award
9,196
7,375
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

  • #11
dlgoff
Science Advisor
Gold Member
3,814
1,741
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.
 
  • #12
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?

http://www.allaboutcircuits.com/vol_3/chpt_3/10.html" [Broken] made more sense than the first link
 
Last edited by a moderator:
  • #13
berkeman
Mentor
57,322
7,314
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?

http://www.allaboutcircuits.com/vol_3/chpt_3/10.html" [Broken] made more sense than the first link
You got it. Good job!
 
Last edited by a moderator:
  • #14
Thank you VERY much
 
  • #15
163
0
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
 
  • #16
berkeman
Mentor
57,322
7,314
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.
 

Related Threads on Two Diode AND Gate - New to EE

  • Last Post
Replies
7
Views
13K
  • Last Post
Replies
3
Views
3K
  • Last Post
Replies
6
Views
5K
  • Last Post
Replies
1
Views
14K
Replies
17
Views
1K
  • Last Post
Replies
3
Views
694
  • Last Post
Replies
4
Views
849
  • Last Post
2
Replies
25
Views
1K
Replies
3
Views
1K
  • Last Post
Replies
8
Views
4K
Top