Author Topic: XOR gate problem with GND  (Read 451 times)

0 Members and 2 Guests are viewing this topic.

Offline FuldupTopic starter

  • Contributor
  • Posts: 16
  • Country: ch
XOR gate problem with GND
« on: April 24, 2024, 02:20:34 pm »
i was building a XOR gate and it seems to work, but when both the inputs are HIGH the current goes still goes through the output instead of going through the NAND gate transistor, which are connected to the GND. The NAND transistors are connected to the GND with a 1k ohm resistor (so the circuit works like an OR gate) if i use a normal jumper or a resistor with less resistance the circuit stops working, i don't undertstand why, but it has to do with the resistance of the output path and the GND path.

green jumpers: output of NAND gate and OR gate.
white jumpers : input of the swithces (connected with 10k ohm resistors)
black jumpers: connection to GND
red jumpers: connection to the power supply

in the picture:
both inputs are HIGH, but the light diode is still on

the marked resistor is the that has the problem
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12870
Re: XOR gate problem with GND
« Reply #1 on: April 24, 2024, 03:19:56 pm »
You expect anyone to figure out what you are even trying to do from crappy breadboard photos with half or more of the interconnect wiring going out of frame, unreadable component markings, and no schematic?

 Life's too short for that s--t! :-DD 

OTOH if you had provided a clear and conventionally drafted schematic (i.e. most positive power rail at the top, most negative at the bottom, signal flow left to right,  all interconnects drawn, not just net labelled), with part numbers, there are many here who would take an interest and help you figure it out.  You've been asked for schematics before, so *PLEASE* just take it as standard to provide them when ever you are asking a question about circuit theory, operation, and/or troubleshooting! ;)
« Last Edit: April 24, 2024, 03:27:09 pm by Ian.M »
 
The following users thanked this post: MK14

Offline FuldupTopic starter

  • Contributor
  • Posts: 16
  • Country: ch
Re: XOR gate problem with GND
« Reply #2 on: April 24, 2024, 03:38:17 pm »
this is a schematic of the XOR gate circuit
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12870
Re: XOR gate problem with GND
« Reply #3 on: April 24, 2024, 04:07:01 pm »
Wont work, cant work!
The inputs are effectively paralleled at the base of Q5   so it has no way of discriminating between either input active and both active.  Also with the Vce_sat of Q1 and Q2 in series and at least 0.7V drop across R4, they cant get Q4's base voltage low enough to turn it off.  The design is too broken to be easy to fix, and if not your own design, you should be very suspicious of any other circuits from the same source!

Try the attached circuit or sim it in LTspice
N.B. Vcc is the positive of your battery, and the input switches should be wired between that and InA, InB (without the pulse voltage sources).   To probe logic levels without disturbing circuit operation, use another NPN transistor as an emitter follower to drive the LED. (i.e. signal to base, collector to Vcc, emitter to a 1K resistor, to the LED anode, cathode to ground) 

Theory:  Q3,Q4 perform a NOR function and Q5 inverts that to an OR.  Q1, Q2 perform a NAND function which is wire-ORed* with the Q5 OR to make the output low when both inputs are high, thus giving XOR.

*wire-ORing refers to the operation of combining open drain or open collector outputs if the logic is active low.  For active high logic as in this circuit, the actual operation is AND.
« Last Edit: April 24, 2024, 05:26:31 pm by Ian.M »
 
The following users thanked this post: Fuldup

Online RFDx

  • Regular Contributor
  • *
  • Posts: 149
  • Country: de
Re: XOR gate problem with GND
« Reply #4 on: April 24, 2024, 05:13:32 pm »
XNOR gate with 2 transistors. Inputs must toggle between 5V and GND! LED is on when inputs are different and off when the same.
« Last Edit: April 24, 2024, 05:19:46 pm by RFDx »
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12870
Re: XOR gate problem with GND
« Reply #5 on: April 24, 2024, 05:23:34 pm »
That's clever, but the simplification makes it  non-cascadable and, as you noted,  not suitable for simple switch inputs.  Add two input buffers and an inverter on the output, to get XOR rather than XNOR, and and you are back up to five transistors.
« Last Edit: April 24, 2024, 05:27:53 pm by Ian.M »
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19546
  • Country: gb
  • 0999
Re: XOR gate problem with GND
« Reply #6 on: April 24, 2024, 09:51:31 pm »
Is the output inverter needed? The OP has it pulling down an LED.

I'd just stick a transistor on each input.
.
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12870
Re: XOR gate problem with GND
« Reply #7 on: April 24, 2024, 11:04:39 pm »
Certainly that's another way of implementing an XNOR which is all you need if the load is active low.

Before turning this into a Muntzing competition, please consider the need to maintain VOL and the implications for fan-in and fan-out.  A possible target to aim for could be to match 74xx TTL, which had a fan-in of four in all of AND, NAND, OR, and NOR simple gates (and eight for the 7430 NAND) and a fan-out of ten.  Obviously an unbuffered stacked BJT NAND is going to run into problems getting a low enough  VOL if you try for many more inputs.
« Last Edit: April 25, 2024, 12:21:19 am by Ian.M »
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8282
Re: XOR gate problem with GND
« Reply #8 on: April 25, 2024, 04:11:37 am »
Here is what a real RTL NOR gate looks like, from a 1968 databook.

They wouldn't use that many transistors if they didn't need to. Transistors were much more expensive back then too!
 
The following users thanked this post: Ian.M


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf