I'm starting a project using logic gates for the first time and I can't figure out why my AND gate always gives a HIGH output regardless of the input.
Any thoughts?
*voltage is regulated from 9v-->5v
Here's the gate's info
>>1113455
you dont have Vcc or Gnd connected to your AND chip
>>1113459
I don't? Aren't the yellow and blue the ground and the Vcc (bottom left and top right of the chip)?
>>1113462
one of your inputs is floating
>>1113465
How so?
Sorry I'm pretty new to this kind of stuff...
>>1113469
You need to switch between vcc and ground for your inputs. Not vcc and nothing.
>>1113473
I don't understand. Could you explain please?
>>1113476
Sorry, there was no power in the first picture
Connect a 10k resistor from each input to ground.
>>1113481
Thank you! That worked. I think I understand how the gates work now, I originally thought that the IC already grounded the inputs.
>>1113484
Typically only higher level chips have regulated/buffered inputs ie ADCs and stuff.
>>1113484
With TTL, the inputs are actually trying to send current into a ground (for a zero). If they can't, they treat that input as high (one).
Floating inputs aren't reliable (electrical noise, etc.) so common practice is to have a switch to ground and a resistor to +5V, or the other way around. Switch to +5V and resistor to ground.
For reasons of noise, speed and driving multiple inputs, the pull up resistor (10K to +5V) plus a switch to ground is usually preferred.
>>1113455
Welcome to the world of (obsolete but still very useful) digital electronics!
This is how you will want to connect your switches. Pic is a shift register circuit, try it out when you get a chance :)
>>1114857
Oh, and try to find a through-hole resistor pack like these. Makes things way simpler.
>>1114861
forgot pic