Electronics > Beginners

XOR gate problem with GND

(1/2) > >>

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

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! ;)

this is a schematic of the XOR gate circuit

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.

XNOR gate with 2 transistors. Inputs must toggle between 5V and GND! LED is on when inputs are different and off when the same.


[0] Message Index

[#] Next page

There was an error while thanking
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod