I'm learning electronics and testing different ICs among other things, but this is confounding me and I could use some help pointing out exactly what's happening here.
I have an HD74HC21P IC which is a dual 4-pin AND gate with the following layout.
First question I have is what is the NC pin? I get that being a 4-input AND gate. If 1A, 1B, 1C, and 1D are high, then 1Y (the output) will be high. I have no idea what the NC pin is and I don't see it referenced in the
HD74HC21 datasheet.
I just wanted to mess around with it so I setup a circuit using it, a 4 position dip switch, and an LED in basically this configuration. (ignore the IC label as Eagle doesn't have the HD74HC21P)
So based on the above. All four dip switches should be on for the LED to light up.... Well, if I do that they do, but sometimes (see below) they light up anyhow. Testing the voltage and they are off when off, but yet the IC still supplies power to the LED (sometimes not, sometimes only when my hand is close to the dip switch!)
So the question is, am I wrong that a four pin AND gate requires all the pins to be high for it to supply power to the 1Y gate? That is what the datasheet shows (below), but as you can see in my breadboard above, I have all dips off except dip 1 and yet the LED is lit.