OBS: Just change the switches, don't change the 5v supplies!
1) No resistor. The logic gate will send 0v when switch is on, but when switch is off, it does not see 5v because it is linked to nothing, bringing unknown results to the circuit.
2) Pull Down resistor: When switch is off, the logic gate can "discharge" on resistor, sending a correct 5v on its output.
3) Pull up resistor: The most common. When switch is on, logic gate sees 0v in its input ("discharging" on ground), and current flows across resistor towards ground.
|