Connect with us

XOR gate using only diodes

Discussion in 'General Electronics Discussion' started by aakash, Jun 26, 2011.

Scroll to continue with content
  1. aakash

    aakash

    6
    0
    Jun 26, 2011
    This is an XOR gate using only diodes. The first four diodes(from left) implement (p.q' + p'.q) and the other four are a rectifier circuit because the output of the first four diodes belongs to {-1,0,1} and so we have to rectify the negative output to a positive output. Good for first/second year projects :)
     

    Attached Files:

    • xor.JPG
      xor.JPG
      File size:
      15 KB
      Views:
      9,268
    Last edited: Jun 27, 2011
  2. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,384
    2,771
    Jan 21, 2010
    It works after a fashion, but unfortunately the inputs and output do not share a common reference voltage.

    One could achieve the same thing by eliminating the 4 diodes and the 2 resistors at the left and connecting the 2 inputs directly up to the bridge rectifier.

    In fact, depending on how you define logic 1 at the output, you could simply wire the inputs directly to the outputs.
     
    Last edited: Jun 26, 2011
  3. aakash

    aakash

    6
    0
    Jun 26, 2011
    Hi Sir ....whoops Steve,
    Well I tried your solution on multisim but it does'nt work. I mean it does but not as an XOR gate ...lol
    Regards.
     
  4. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,384
    2,771
    Jan 21, 2010
    Then you need to work on your use of multisim. Or think instead of believing what a simulator tells you.

    Consider wiring both inputs up as the outputs. If one is logic 1 and the other logic 0, current can flow between them. If you place a lamp thee it will light iff both inputs have different values. This is essentially a restatement of XOR.

    If you want one output to be positive with reference to the other, then you can simply use a bridge rectifier and when the inputs have a different logic level (connected to the AC input of the bridge) then the output of the bridge rectifier will be a +ve voltage. In all other cases the outputs are effectively at the same potential.
     
    Last edited: Jun 26, 2011
  5. poor mystic

    poor mystic

    1,061
    30
    Apr 8, 2011
    Hi Aakash
    I apologise for my lack of understanding. How is this circuit expected to function, please?

    I have attached an amended version of your circuit, which includes a load resistor. I have attempted to trace out a path by which current may flow through the load in the Exclusive OR case; I have imagined that a binary '1' is represented by 5V and a binary '0' by the associated 0V rail.

    An obvious path for current is from 5V on either input, through the 1st set of diodes and resistors, and to 0V. However in order to be useful as an XOR calculator, current must flow through the load, so I have tried to find a path for current from either input at binary '1' to the other input at binary '0'. It looks to me as if no such path exists.
    Looking at the output terminals of the circuit, I find that they follow the input terminals, so that o/p terminal 1 is a mimic of V1, and so for V2.

    As far as I can see this circuit does nothing.

    Would you please explain my mistake, if I have made one?
     

    Attached Files:

  6. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,384
    2,771
    Jan 21, 2010
    The bottom left 2 diodes are around the wrong way. I think this is what lead him to place those 2 resistors in the circuit.

    I missed that as well. I "read" it as I think it may have been intended.
     
  7. poor mystic

    poor mystic

    1,061
    30
    Apr 8, 2011
    Thanks Steve.
    Umm, the attached circuit is also an XOR gate using only diodes.

    PS
    Sorry, I missed that you have already noted this.
     

    Attached Files:

    Last edited: Jun 26, 2011
  8. duke37

    duke37

    5,360
    765
    Jan 9, 2011
    That is not a bridge rectifier, it is a diode ring and you can only get 1.2V across it. The diode ring is often used as a frequency mixer in better radios with a two windings, connected across the ring for the two inputs and the output taken from the centre taps of the windings
     
  9. poor mystic

    poor mystic

    1,061
    30
    Apr 8, 2011
    A ring-bridge modulator huh? I would have said that not only the transformers but also the amplitude modulating function were essential to the definition of that circut.

    PS? have you seen quad diode units designed for ring-bridge use? (Amazed)
     
    Last edited: Jun 26, 2011
  10. duke37

    duke37

    5,360
    765
    Jan 9, 2011
    Sorry. I was wrong, will have to get my brain cell connected. I thought the diodes were chasing their tails.
     
  11. poor mystic

    poor mystic

    1,061
    30
    Apr 8, 2011
    an easy mistake to make, duke, if this thread is any evidence
     
  12. aakash

    aakash

    6
    0
    Jun 26, 2011
    Hmm...I see how it works with 4 diodes...thnx...and I should have connected the resistor at the output. I was thinking in terms of potential instead of current :)
     
  13. poor mystic

    poor mystic

    1,061
    30
    Apr 8, 2011
    Yes, it's an odd one isn't it - there's a hidden change in the coding as you go through the circuit, because you start out using voltages to encode your binary and finish with an indicating current.
     
  14. aakash

    aakash

    6
    0
    Jun 26, 2011
    One thing though, were the bottom-left (or top-left) two diodes connected wrongly? because it seems to be working correctly if we connect the two inputs and the resistor at the end properly.
     
  15. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,384
    2,771
    Jan 21, 2010
    I would say that they are entirely superfluous.

    To see if they are wired up incorrectly, do what Poor Mystic did. Trace the current flow through the circuit. You will find (as he did) that there is a problem.
     
  16. aakash

    aakash

    6
    0
    Jun 26, 2011
    As you might've guessed...the attached image is the original design approach but with the problem of {-1,0,1} being the possible outputs. Then I put a rectifier to sort this out and turns out the rectifier itself was enough...that's learning!
     

    Attached Files:

    • 2.JPG
      2.JPG
      File size:
      7.3 KB
      Views:
      1,675
  17. TBennettcc

    TBennettcc

    292
    2
    Dec 4, 2010
    ...I don't see the solution...?

    The diodes aren't doing anything. See for yourself. Start out at the top of V_1. Follow that down the outside wire of the loop, disregarding the tap points for V_out. Now you get to the bottom of V_2, and the diode is pointing INTO V_2. Then it goes through another diode, also pointing forward, and then it goes up the inside leg, across another diode, and back to V_1. A loop. A short-circuit with no load. Labeling the diodes from top to bottom, either (D1 AND D2) OR (D3 AND D4) need to be turned to face the opposite way. That HAS to be done at minimum. Otherwise, you're going to cook your voltage sources.

    Also, when discussing things like this, and when looking at a schematic, it helps IMMENSELY to label ALL PARTS of the schematic. That way, we can give intelligent advice and directions to you, and it will be easier for all parties involved to discuss a certain component. Right now, you have two resistors labeled 'R1'. So if somebody mentions 'R1', which one will they be referring to?
     
  18. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,384
    2,771
    Jan 21, 2010
    I would remove all the components you just retained. Just keep the bridge rectifier and see what that gives you!
     
  19. aakash

    aakash

    6
    0
    Jun 26, 2011
    I'm not questioning anyone's knowledge here but I actually tried this circuit in a simulator and then practically and it was working! I had used similar batteries as voltage sources. Vo is the potential difference between the two loops that I measured using a multimeter. Don't know what's going on :confused:
     
  20. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,384
    2,771
    Jan 21, 2010
    Try drawing current from it. Place the meter on a current range -- the resistors will limit the current.

    Trace the path of the current when one input is more positive than the other. You are probably relying on leakage through a diode (or you've connected the diodes up differently)

    The way you've drawn it, one output will be at about 1/2 Vcc (assuming inputs are Vcc and 0v). The other is effectively isolated.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-