Simple NAND Gate Circuit using Transistors is very important in digital logic.
It work opposite of AND gate.
Output is HIGH when any input is LOW.
NAND gate is called “universal gate” because we can make all other gates like AND, OR, NOT using it.
Circuit Working:

Parts List:
Component Type | Description | Quantity |
---|---|---|
Resistors | ||
10k 1/4 watt | 2 | |
220Ω 1/4 watt | 2 | |
470Ω 1/4 watt | 1 | |
Semiconductors | ||
Transistors 2N2222 | 2 | |
Input LEDs 5mm 20mA | 2 | |
Output LED 5mm 20mA | 1 | |
Push buttons | 2 |
Power to First Transistor Q1:
We give power Vcc to Q1 at its collector.
Resistor R5 is put between Vcc and Q1 to control current.
Connecting the Transistors:
Q1s emitter goes to Q2s collector.
This link helps NAND gate to work.
Getting the Output:
Q1s collector also goes to output LED1.
This is where final output signal comes.
Inputs Handling:
First input push button1 goes to Q1s base through resistor R1.
R1 limits current to base.
Same for second input push button2, it goes to Q2s base with resistor R2.
Why NAND is Different Than AND:
AND gate takes output from Q2s emitter.
NAND gate takes output from Q1s collector.
This small change makes logic different.
Output Behavior:
If both inputs are HIGH then both push buttons is pressed and both Q1 and Q2 is ON.
Current flows to ground not to output.
So output LED gets LOW.
If any input is LOW then any push button is not pressed then one transistor is OFF.
Current cant go to ground and so it flows to output.
Output LED gets HIGH.
Summary:
NAND gate gives HIGH output when any input is LOW.
Formulas:
Transistor Base Resistor:
To turn ON transistor well find base resistor Rbase:
Rbase = (Vin − Vbe) / Ib
where,
- Vin is the input voltage which is mostly 9V
- Vbe is the base-emitter voltage to about 0.7V for 2N2222
- Ib is the base current to make transistor ON for saturated
LED Current Limiting Resistor:
To stop too much current in LED use RLED:
RLED = (Vsupply − VLED) / ILED
where,
- Vsupply is the power voltage for 9V
- VLED is the LED forward voltage for around 2V
- ILED is the LED current for about 20mA for normal LED
Pull-Up Resistor for Push Buttons:
To keep logic HIGH when button is not pressed then use pull-up resistor:
Rpull-up = Vsupply / Ipull-up
where,
- Ipull-up is the current needed when button is open
We can use 2N2222 transistors, resistors, LEDs and push buttons to make NAND gate.
Change values as needed for our own circuit.
How to Build:
To build a Simple NAND Gate Circuit using Transistors follow the below mentioned steps for connections:
- Connect Q1 collector to positive (Vcc) through resistor R5.
- Connect Q1 base to push button1 through resistor R1.
- Connect Q1 emitter to Q2 collector.
- Connect output LED1 anode between Q1 collector and R5.
- Connect LED1 cathode to ground.
- Connect Q2 base to push button2 through resistor R2.
- Connect Q2 emitter to ground.
- Between push button1 and R1 add resistor R3 and input LED1.
- Between push button2 and R2 add resistor R4 and input LED2.
Extra Info:
- Resistor values may change with transistor type and power supply.
- This is simple circuit and can change design if needed.
- Be careful when working with electronics and follow safety rules.
Conclusion:
This Simple NAND Gate Circuit using Transistors is small but useful.
It gives HIGH output only when any input is LOW.
Very important part of digital logic systems.
Leave a Reply