Lesson 14 – Transistors and Digital Logic 1#
Learning Outcomes#
Explain what a transistor is and describe its function.
Identify the basic structure and operation of a transistor.
Construct logic gates using transistors.
Calculate the number of transistors required for a logic gate.
Develop truth tables from logic diagrams.
What Is a Transistor?#
A transistor is a small electronic device made from semiconductor material. It can do two very important jobs:
Amplifier: make a weak electrical signal stronger.
Switch: turn current on and off.
In this course, we care most about the switch behavior, because switches can represent binary values:
ON means current flows → we treat this as a 1
OFF means no current flows → we treat this as a 0
When you connect billions of these tiny switches together in the right patterns, you get logic gates, and logic gates build up into computers.
Conductor vs Semiconductor#
A conductor carries electricity easily because it has many free-moving electrons.
An insulator does not carry electricity well.
A semiconductor is in between.
Semiconductors can be doped (mixed with small amounts of other chemicals) to change their electrical behavior:
N-type: extra electrons (negative charge carriers)
P-type: “holes” (missing electrons that behave like positive charge carriers)
Transistor Basics (BJT Overview)#
A common transistor type is the Bipolar Junction Transistor (BJT). Two common BJTs are:
NPN
PNP
They have three terminals:
Emitter (E)
Base (B)
Collector (C)
NPN as a Switch (Concept)#
For an NPN transistor, a small current into the base can allow a larger current to flow from collector to emitter.
Think of it like a water valve:
A small effort at the handle (base current) controls a much larger water flow (collector to emitter current).
In our digital logic view:
base input = 1 → transistor ON
base input = 0 → transistor OFF
From Transistors to Logic Gates#
When we combine transistors in series and parallel, we can create logic behaviors.
AND Gate#
If two switching devices must both be ON for current to reach the output, the behavior is AND:
Output = 1 only when A = 1 and B = 1
A simple conceptual model is two NPN transistors in series.
OR Gate#
If either of two switching paths can complete the circuit to the output, the behavior is OR:
Output = 1 when A = 1 or B = 1 (or both)
A simple conceptual model is two NPN transistors in parallel.
NOT Gate#
A NOT gate flips the input:
Input = 1 → Output = 0
Input = 0 → Output = 1
In transistor logic, NOT is often built using a transistor with a pull-up or pull-down arrangement so that the output becomes the opposite of the input.
Truth Tables#
A truth table lists:
all possible input combinations
the output for each combination
For n binary inputs, the number of combinations is:
2^n
Examples:
2 inputs → 4 rows
3 inputs → 8 rows
Multi-Input Gates#
AND and OR gates can have more than two inputs.
A 3-input AND gate outputs 1 only when all three inputs are 1.
A 3-input OR gate outputs 1 when any input is 1.
Transistor Count#
Why do we care?
More transistors → more energy use, more chip area, more cost
In this lesson, you will practice counting transistors by treating:
NOT gate = 1 transistor
AND gate = number of inputs transistors (conceptual)
OR gate = number of inputs transistors (conceptual)
In real chips, gates often use more transistors than this minimum model, but this simplified approach helps you build intuition.
Worked Example: Counting Transistors from a Logic Diagram#
Use the note-taker practice problem diagram below.

Strategy:
Break the circuit into basic gates.
Replace each gate with a transistor count (based on the simplified model).
Add up the counts.
Summary#
By the end of this lesson you should be able to:
explain what a transistor is and how it can behave like a switch
connect transistor switching to binary 0 and 1
recognize AND, OR, and NOT behaviors
build and interpret truth tables
count the number of transistors needed for a logic diagram (using the simplified model)