h3lladvocate said:
For testing the OR, im actually connecting nothing at all to the inputs. The LED it connected with the anode end connected to the output, and the cathode to 0 V. I can try actually giving the input 0 V instead of no current at all.
Howdy,
You're not doing much testing if you're never manipulating the inputs! Also, many such logic gates cannot source the required current to drive an LED directly, as you're doing it. Many can sink it (meaning tying the cathode to the output, and the anode to Vcc), but not source it. You need to look at the datasheets for the respective parts you're using.
As the previous fellow said, open inputs on TTL are usually defined as High. (Unused inputs float at threshold, meaning they usually simulate H.) So, you're getting exactly what you should be: with two open inputs (H), you get H on the output, and (apparently) an illuminated LED. So, when you say you can give an input "0V instead of no current at all," you're misleading yourself. No current in this case means H. So, for real testing, tie the respective inputs to either GND or Vcc; don't leave 'em floating. And finally, once you're done testing and you finally build something, tie all unused inputs to Vcc through a resistor, 3.3k is good. (That is, a pullup, not a pulldown, as previously suggested.)
Regarding the LED, I've looked up a 74LS32, which is likely the OR gate you're using. It can source less than 1mA, and sink 8mA. These values are likely the same for the other gates. (So, I don't know how you're getting your LED to light given it's hooked up the way you say!) Connect the LED with the cathode to the output, and a 330R resistor in series with the anode to Vcc. That way you won't damage your outputs by drawing too much current. But, realize that an illuminated LED will now indicate a Low.
If it must indicate a High, you ought to add a buffer to the output of each gate you test, like a 74LS37, and have it drive the LED. Then it'll indicate a High. Do this by tying the LED cathode to the buffer output, and use a resistor in series with the anode to Vcc, between 150-270R, depending on how bright you want it. The '37 can sink 24mA...
Good luck,
Corey