Go Down

Topic: Understanding NAND (Read 3850 times) previous topic - next topic

p1ne

Regarding transistor circuits, I can see how the output of AND circuit works, but I'm not seeing how/why closing both switches turns the NAND circuit off (output above series transistors). Please lend some insight. Thanks.


CrossRoads

Output only goes LOW if both inputs are HIGH. Both transistors need to be turned on.
INs     AND    NAND
0  0     0        1
0  1     0        1
1  0     0        1
1  1     1        0
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

CrossRoads

Depending on the Vce of the transistors, that LOW could be as much as 1 to 1.4V. Have to be careful about mixing technology types.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Grumpy_Mike

Quote
but I'm not seeing how/why closing both switches turns the NAND circuit off
If both transistors are turned on, the the output is effectively connected to ground so the output is low or a logic zero. I would not call that off but you could make a case for calling it that. In my mind the output is actively sinking current.

If one of both transistors are off the output is connected to 5V ( through R3 ).

MarkT

Logic signals are 1/0 true/false, high/low, active/inactive.  On and off is perhaps confusing in this context,
unless its some output device like an LED.  On/off usually applies to current flowing, most logic families
are voltage-level defined.
[ I DO NOT respond to personal messages, I WILL delete them unread, use the forum please ]

p1ne

If both transistors are turned on, the the output is effectively connected to ground so the output is low or a logic zero.
Please explain how if both transistors are turned on, the output goes to ground. That's the part I'm not understanding. Thanks.

septillion

And if you think of it as one transistor?

If the transistor is turned on (aka, on A or B there is a voltage) then there is a path through the transistor which leads to GND.
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

Grumpy_Mike

A transistor can be thought of as a switch. When a little current flows through the base a lot of current can flow between the collector and emitter. So the emitter and collector can be thought as being connected together like a switch. So when a transistor is on the collector is connected to the emitter and the emitter is connected to ground. So anything connected to the emitter is also connected to ground.

MarkT

The transistors are either in cutoff or saturation when used as a switch, neither is much to do
with normal transistor action as used in amplifying a signal, which happens in the active region.
Think of it as a mechnical switch controlled by the base current being present or absent.
[ I DO NOT respond to personal messages, I WILL delete them unread, use the forum please ]

Grumpy_Mike

#9
Jan 20, 2017, 12:34 pm Last Edit: Jan 20, 2017, 12:34 pm by Grumpy_Mike
This is the equivalent circuit with switches. The switches are closed when current is applied to them.
The flashlight bulb only light up when both switches are closed.


p1ne

Thanks for replies and good to be reminded transistors can work as switches. Grumpy Like, following that example with both switches closed = light on, in 2 transistor example, why does all voltage run to ground and not power led when circuit is closed? In my thinking the voltage should hit the light even before it gets to transistors, unless closing 2 switches blocks ground, which does not seem to be the case.

The light being ahead of the transistors seems to be a key factor here that I'm not getting. Thanks for more explanation.

Grumpy_Mike

Quote
The light being ahead of the transistors seems to be a key factor here that I'm not getting.
If you are thinking that the order of the components matter in a series circuit then you are not getting to grips with how electricity works.

A circuit has to be considered as a whole electricity does not hit anything first.

Quote
why does all voltage run to ground and not power led when circuit is closed?
What circuit are we talking about here, that last one of mine or your original one.
For mine
The circuit is from the battery positive, through the flash lamp thus lighting it up, through one switch, through the other switch and then to the battery negative.

For the original one there is no LED in it and I don't know where you have it connected, but with both transistors on the current goes to ground and the voltage on the collector of the top transistor is at ground. So an LED connected from the top transistor's collector to ground will have no voltage across it and so will not light up.
However if the LED were connected to the collector of the top transistor and to 5V then when that collector was connected to ground the LED would light up.

There are two ways to control an LED the first is called sourcing current and the second is called sinking current
Note all LEDs must also have a series resistor. That is why I draw a flashlight bulb to make things simple.

Note to everyone except the OP. I am simplifying this by assuming that Vsat is zero, it isn't but that fact doesn't matter at this stage in the argument.

p1ne

Why is the output above the transistors in a NAND circuit, and below the transistors in AND circuit?

CrossRoads

#13
Jan 20, 2017, 05:05 pm Last Edit: Jan 20, 2017, 05:06 pm by CrossRoads
Does this help?
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

MarkT

Why is the output above the transistors in a NAND circuit, and below the transistors in AND circuit?
I think its time to try this out on paper, figuring out what combinations of inputs causes the output
to be high or low.  Worth looking add wired-and and wired-or diode-resistor circuits too.
[ I DO NOT respond to personal messages, I WILL delete them unread, use the forum please ]

Go Up