I had a few minutes to spare the other night so I decided to build myself a quick transistor NOT gate. I will be adding other gates to the breadboard and posting their functions on the site but this is something to keep you occupied for now.
First of all, let’s have a look at the schematic of the circuit itself.
The NOT gate is often called an inverter. Basically, you give it either a 1 or a 0 (on or off) and the output will be the opposite of the input. e.g. if you connect and switch to the input and an LED to the output, when you turn the switch ON, the LED will be OFF. If you turn the switch OFF, the LED will be ON.
Here is a quick picture of the of the circuit I built on a breadboard. (Click the image to get a larger version)
Excuse the untidy wiring, I never have time to trim cables and make things look neat, especially on a breadboard. At the top left corner of the board I’ve got a 9v battery connected to a 5v regulator. That then feeds 5v into a 555 timer. The timer is used purely to supply a pulsing on-off signal. I could have easily used a manual switch but I had a 555 chip nearby so I thought I might as well use it. (Same for the voltage regulator). The transistor and resistors lower down on the board are the NOT gate.
When the 555 timer sends an ON signal, the red LED lights up. In the image, you can see that the green LED is currently lit. This is because the red led is NOT on.
When the red LED is lit, the green LED is NOT on. Simple.
Here is a truth table to show a NOT gate.