Transistor Logic Basics: Buffer, NOT, AND & NAND (Part 1 of 2)

In This Lesson

In this lesson, we explore how transistors can be used to create logic circuits.

We will cover:

  • NPN transistor basics (2N2222)
  • Buffer circuit
  • Inverter (NOT gate)
  • AND gate
  • NAND gate
  • Truth tables
  • Basic resistor calculations

Watch Video:


πŸ”Œ NPN Transistor Basics

We are using an NPN transistor (2N2222).

It has three terminals:

  • Base (B)
  • Collector (C)
  • Emitter (E)

πŸ‘‰ A transistor acts like a switch:

  • No base current β†’ OFF
  • Base current present β†’ ON

⚑ Transistor as a Switch

There are three main operating regions:

  • Cutoff β†’ OFF
  • Active β†’ Partially ON
  • Saturation β†’ Fully ON (used for switching)

πŸ‘‰ For digital logic, we mainly use:

  • OFF (cutoff)
  • ON (saturation)

πŸ” Buffer Circuit

A buffer simply copies the input to the output.

Truth Table

Input Output
0 0
1 1

πŸ‘‰ Output follows input exactly.

Simulation:

Β 


πŸ’‘ LED Resistor Calculation

Using:

  • Supply = 5V
  • Transistor drop β‰ˆ 0.2V
  • LED drop β‰ˆ 2V

Voltage across resistor:

5V βˆ’ 0.2V βˆ’ 2V = 2.8V

If desired current = 10mA:

R = V / I = 2.8V / 0.01A = 280Ξ©

πŸ‘‰ Practical value used:

  • 470Ξ©

πŸ’‘ Base Resistor Calculation

  • V_BE β‰ˆ 0.7V
  • Voltage across resistor = 5V βˆ’ 0.7V = 4.3V

Assume:

  • I_C β‰ˆ 10mA
  • Ξ² β‰ˆ 10 (safe estimate)

Then:

I_B = I_C / Ξ² = 10mA / 10 = 1mA

R = V / I = 4.3V / 1mA = 4.3kΞ©

πŸ‘‰ Practical value used:

  • 4.7kΞ©

πŸ”„ Inverter (NOT Gate)

The inverter flips the input.

Truth Table

Input Output
0 1
1 0

πŸ‘‰ If input is LOW β†’ output is HIGH
πŸ‘‰ If input is HIGH β†’ output is LOW

Simulation:

Β 

Β 


AND Gate (Using Transistors)

Two transistors are placed in series.

πŸ‘‰ Both must be ON for current to flow.

Truth Table

A B Output
0 0 0
0 1 0
1 0 0
1 1 1

πŸ‘‰ Output is HIGH only when BOTH inputs are HIGH.

Simulation:


NAND Gate

NAND is the inverse of AND.

πŸ‘‰ Output is LOW only when BOTH inputs are HIGH.

Truth Table

A B Output
0 0 1
0 1 1
1 0 1
1 1 0

πŸ‘‰ NAND = NOT(AND)

Simulation:


🧠 Key Takeaway

By combining transistors as switches, we can build:

  • Basic logic functions
  • Complex digital systems

πŸ‘‰ This is the foundation of digital electronics.

Video Notes:
Transistor-Logic-Part1-Video-Notes


πŸ“– Closing Verse (KJV)

23Β TheΒ LordΒ is my shepherd; I shall not want.

2Β He maketh me to lie down in green pastures: he leadeth me beside the still waters.

3Β He restoreth my soul: he leadeth me in the paths of righteousness for his name’s sake.

4Β Yea, though I walk through the valley of the shadow of death, I will fear no evil: for thou art with me; thy rod and thy staff they comfort me.

5Β Thou preparest a table before me in the presence of mine enemies: thou anointest my head with oil; my cup runneth over.

6Β Surely goodness and mercy shall follow me all the days of my life: and I will dwell in the house of theΒ LordΒ for ever.


Prefer video?
Watch full lessons on the Build Circuits With Rich YouTube Channel.

Back To: Videos