TechKnowSurge
CompTIA Tech+ 2.3 CompTIA Tech+ 1.3
InteractiveComputeFree

Transistor Switch Simulator

Sweep the base voltage of an NPN transistor from 0 to 1.5 V and watch the LED stay dark, snap on, and stay on — a smooth input producing a step output.

Complete this interactive to capture a CTF flag worth 1 point.

About this interactive

What you're seeing: an NPN transistor wired to switch an LED on a 5 V rail, with one slider setting the base drive anywhere from 0.00 to 1.50 V. Beside the schematic are the live numbers — Vbe, collector current, collector-emitter voltage, and whether the LED is off, dim or on — and a state badge reading CUTOFF, ACTIVE or SATURATION. To the right, an oscilloscope draws the base drive and the resulting collector current on a shared time axis, with a dashed line marking the 0.70 V turn-on threshold. A SWEEP button ramps the input up and back down on its own so both traces can be watched at once. Why it matters: a transistor is usually introduced as "a tiny switch", which is a conclusion handed over without its reason. Switching is a strange thing for a physical device to do, because the voltage driving it is continuous — you can set it to 0.42 V as easily as to 0.70 V — and yet the thing it controls has only two useful states. That gap is where the confusion lives, and it is the gap this activity is built to close. The slider is deliberately continuous and deliberately wide: nothing stops a student parking it at 0.30 V or 1.10 V, and what they discover is that the LED is indifferent to most of the travel. Dark for the bottom two thirds, fully lit for the top quarter, and genuinely in between only across a band about a tenth of a volt wide that has to be hunted for on purpose. The output is binary not because the input is, but because the physics maps almost every input onto one of two answers. The scope is what makes that observable rather than assertable. Ramp the base with SWEEP and a clean triangle goes into the top trace while a flat-topped square comes out of the bottom one. Nothing on screen says "this is a switch, not an amplifier" — the two shapes say it, side by side, on the same time axis. The model underneath is the real exponential relation between base-emitter voltage and collector current, clamped by what a 220 Ω resistor and a red LED will actually pass from a 5 V rail. A hard threshold test would have drawn nearly the same picture for the wrong reason, and would have quietly taught that 0.699 V and 0.701 V differ in kind. Because the curve is real, the active region is real too: the LED can be made to glow faintly, the badge really reads ACTIVE, and Vce slides continuously from the rail down to 0.2 V. It is just narrow. How to use it: start at 0 V and predict, out loud, where the LED will come on before you move anything. Then drag slowly and find the exact hundredth of a volt where the badge flips from CUTOFF to ACTIVE, and again where it flips to SATURATION — most people guess a much wider gap than they find. Press the 0 V and 0.7 V buttons a few times to feel the two states the rest of computing is built on, then hit SWEEP and watch the two traces together. This sits directly on the module's Transistors lesson and is the thing worth having open when the Gates lesson starts: a logic gate is transistors arranged so that the two states you just found become the 0 and 1 the gate reasons about.

How to use this tool

An NPN transistor is a switch with no moving parts. A small voltage on its base decides whether current is allowed to flow from the collector to the emitter — and here that current is what lights the LED.

  • Drag the VB slider anywhere from 0.00 V to 1.50 V. It sets the base-emitter voltage directly.
  • Below about 0.6 V the transistor is in cutoff: no meaningful current, LED dark, and nearly the whole 5 V supply sitting across the transistor.
  • By 0.70 V it is in saturation: the transistor is as on as it gets, Vce collapses to about 0.2 V, and the LED is at full brightness.
  • In between is the active region — real, but only about a tenth of a volt wide. Find it on purpose.

The 0 V and 0.7 V buttons jump straight to the two states digital logic actually uses. SWEEP ramps the base drive up and back down on its own.

The oscilloscope draws both signals on the same time axis: your base drive on top, the collector current it produced underneath. Watch a sweep and compare the shapes — a smooth triangle goes in, a flat-topped square comes out. That is the whole difference between a switch and an amplifier, and it is why a logic gate can have only two answers.

Two simplifications, stated rather than hidden: the source drives the base directly, where a real switching stage would put a resistor in series to limit base current; and the LED is drawn as a plain forward drop of 2 V. Neither changes anything you are being asked to notice.

Nothing here is graded. Before you move the slider, say out loud where you think the LED will come on — then go and find the exact hundredth of a volt where it does.

What you'll learn

Aligned to

CompTIA Tech+
2.3 Explain the purpose of common internal computing components.
1.3 Illustrate the basics of computing and processing.

Key terms

Transistor
A microscopic electronic switch found in microprocessors that represents a binary one (on) or zero (off) using electrical voltage.
Semiconductor
A material that can be altered to sometimes conduct electricity and sometimes act as an insulator, enabling controllable current flow.
Silicon
A chemical element used to build transistors that can be treated to act as a semiconductor, sometimes conducting electricity and sometimes not.
Light Emitting Diode
LED
A semiconductor device that emits light when current flows through it, used in computer displays, indicator lights, and monitor backlighting as an energy-efficient alternative to fluorescent lamps. LED backlighting has replaced CCFL in most modern LCD monitors.
Direct Current
DC
A type of electrical current that flows in only one direction at a constant voltage, as used by all internal computer components including CPUs, RAM, and storage drives. Power supply units convert AC from wall outlets to the various DC voltages required by computer hardware.
Logic Gate
A basic electronic circuit that performs a Boolean operation on one or more binary inputs to produce a single binary output.
Binary
The base-2 number system that uses only the digits 0 and 1; the native language of digital computers, which store and process data as electrical on/off states.
Bit
Short for binary digit, the smallest unit of data in computing, holding a single value of 0 or 1; all digital information is ultimately composed of bits.
Integrated Circuit
IC
A miniaturized electronic circuit containing transistors, resistors, and other components fabricated onto a single semiconductor chip, enabling the compact, high-speed logic that powers modern CPUs, memory modules, and nearly every digital device.
Transistor Density
The number of transistors contained within a processor or integrated circuit, a key measure of computational power that has grown from thousands in early chips to billions in modern processors.

Topics

Transistors Semiconductors Digital Logic Binary Circuits Hardware Voltage Switching

About TechKnowSurge

TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.

Explore free tools and programs →