Re: A CMOS question
"What If in a 2 input nand CMOS I short the drain and source of one pmos transistor, what would be the behaviour of the nand gate?"
As I see it, first you'll no longer have a NAND gate. In fact, the only gate I'll see you having is a gate that, upon certain condition, takes out your 5v source.
If one of the p-channel MOSFETs is shorted from drain to source, without a doubt the NAND's output will be stuck high. However, if both inputs are high, this turns on both n-channel MOSFETs (which produces the low output of x=(ab)'); hence, that output that's stuck high will try to remain high through the two on MOSFETs, very low resistances. This will pull a lot of current from the 5v source (I=5/1=5A, as ballpark est.) Hence, assuming your 5v source remains cranking out the current, you'll likely have your gate get hot and pop like a fuse. Then your output will really be stuck high, as the low impedance shorting it out, when the inputs are high, will be gone via the destruction of one or both of the n-channel MOSFETs, due to excessive Id's.
In practice though, your supply will probably go into current limiting whenever the inputs to the defective gate are highs, for this will pull down your supply. But, it is likely that the same supply for your output is the same supply for your inputs, so look for them to go down as well, could even pulse between low and a higher low depending on your driver circuitry, as the inputs barely turn on the n-channels which short the supply, which turns off the n-channels, which raises the supply, which turns on the n-channels, and so on.
Come to think of it, have some fun and build it. Take a CMOS NAND and tie the output to Vdd. Go for the max pyrotechnics option and use a high current Vsource. Otherwise, you'll probably just get the boring oscillator or pop the circuit breaker. Be sure to rig up two switches for the NAND's inputs of course, as the fun will only begin with A=B=1.
ABX
001
011
101
110
Yeah, the one one is what you want.
What are these horns growng from my skull about? ;-)
Hmm... Can I spare a CMOS NAND gate?...
Added after 5 minutes:
I just gotta do this.
All I need is a battery, a bread board, jumper wires, and a CMOS NAND.
I'll let you know what happens.
Added after 29 minutes:
Sorry, can't spare a NAND...
But I can spare a NOR, which is an inverted NAND. (The two p-channels to Vdd are now n-channels to Vss, and the two n-channels to inputs are now p-channels to inputs. The NAND circuit's been inverted.)
Where the NAND was to be shorted high, blowing its cookies via a one one, the NOR will be shorted low and blow via a zero zero combinaton.
Other than that, it's the same thing.
I predict, as I'll be using a battery, my battery gets hot with the zero zero combination only and that the gate pops if I leave its output shorted to ground long enough, which will leave the output low, through hard shorted n-channels and blown open p-channel(s).
Deliberate destruction of defenseless parts, will I have to see a priest after this?
Added after 36 minutes:
Well, I must have left something out of the mix somewhere.
Given a 6v, 5 or so amp supply, a defenseless 4001, with a=b=0 and x=0, I got a wopping 8mA draw and a 4001 that's no worse for wear (although I won't use it again for anything real.)
So where did I get 6v/8mA=750Ω of limiting resistance?
I tested the NOR both before and after the experiment and it worked. I didn't know that CMOS gates have current limiting. That's nice to know, especially with me at the wheel. But where did that R come from?
Added after 16 minutes:
No answers yet but I have found that the NOR internal circuit is actually a NAND with inverted inputs and outputs. But still that CMOS inverter at the output had an on p-channel shorted to Vss??
Is the on p-channel's Rds_on=750Ω??