AND gate not giving correct output

Also not a bad idea to add a 10uF (or more) tantalum capacitor (at least 16V!) to each power bus (on your breadboard). Make sure to get the polarity right or you'll get a rude awakening! This helps to overcome voltage loss due to contact resistance, and the resistance in the wires leading to the breadboard's bus lines. voltage loss, due to current surges.

Electrolytic capacitors can be used, too (6.3V or above). They don't react as quickly (because of internal inductance), but they'll do.

But, this is a minor detail, so don't sweat it, if don't have an "tants" or electrolitics lying around. :wink: