Transistor logic is the practice of using discrete bipolar junction transistors (BJTs) or metal-oxide-semiconductor field-effect transistors (MOSFETs) to perform Boolean operations without relying on pre-packaged integrated circuits. While modern designs use complex CMOS ICs, building discrete transistor logic gates remains the fastest way to internalize how semiconductor switching actually works at the silicon level. If you are heading to the bench to build discrete logic, here are the safe default part numbers you should stock:
  • 2N3904 (NPN BJT): 40V VCEO, 200mA IC, TO-92 package. The universal NPN switch.
  • 2N3906 (PNP BJT): 40V VCEO, 200mA IC, TO-92 package. The complementary PNP.
  • 2N7000 (N-Channel MOSFET): 60V VDS, 200mA ID, TO-92 package. The default low-power logic MOSFET.
Bench Tip: Always buy these from authorized distributors like Digi-Key or Mouser. Counterfeit 2N3904s from random marketplace sellers often have severely degraded hFE (current gain) and will fail to saturate properly in logic circuits.

Core Transistor Logic Families and Operating Regions

In digital logic, we only care about two operating regions: Cut-off (the switch is open, representing Logic 0 or 1 depending on the circuit topology) and Saturation (the switch is closed). The active (linear) region is strictly avoided in standard logic because it causes high power dissipation and undefined output voltages. Below is the definitive operating regions table for the default 2N3904 BJT and 2N7000 MOSFET when used in 5V logic circuits.
Transistor Operating Regions in 5V Discrete Logic
Region BJT (2N3904) VBE / VCE BJT Typical IB / IC MOSFET (2N7000) VGS / VDS Logic State Equivalent
Cut-off < 0.5V / ~5.0V 0mA / 0mA < 2.0V / ~5.0V Open Switch (High-Z)
Active (Linear) ~0.65V / 0.5V - 4.5V Variable / Variable 2.5V - 4.0V / 1.0V - 4.0V AVOID (High Heat)
Saturation ~0.8V / < 0.2V > 0.4mA / ~5mA > 4.5V / < 0.5V Closed Switch (Low-Z)
Notice that to drive a 2N3904 into hard saturation, VBE actually climbs to about 0.8V, not the textbook 0.7V, and VCE drops to roughly 0.2V. For the 2N7000, the threshold voltage (VGS(th)) can range from 0.8V to 3.0V according to the ON Semiconductor datasheet, meaning a 3.3V logic signal might barely turn it on. Always use 5V gate drives for reliable 2N7000 saturation.

Building Discrete Logic Gates: The RTL NOR Gate

Resistor-Transistor Logic (RTL) is the simplest bipolar logic family. We will build a 2-input NOR gate. Why a NOR gate and not a NAND gate? In discrete RTL, placing NPN transistors in series to create a NAND gate starves the upper transistor of base drive because its emitter sits above ground potential. This is why commercial RTL families (like the vintage Fairchild Micrologic) relied entirely on NOR gates, using De Morgan's laws to synthesize other functions.

Pinout and Symbol Mapping

For the 2N3904 in a standard TO-92 package, hold the flat face toward you with the pins pointing down. From left to right, the pins are:

  1. Emitter (E): Arrow pointing outward in the schematic symbol.
  2. Base (B): The vertical line in the schematic symbol.
  3. Collector (C): The angled line without the arrow.

Complete 2-Input RTL NOR Application Circuit

This circuit operates at VCC = 5V. If either Input A or Input B is HIGH (5V), the corresponding transistor saturates, pulling the output LOW (0.2V). Only when both inputs are LOW does the output pull HIGH (5V).

Component Values:
  • Q1, Q2: 2N3904 NPN Transistors
  • R_Pullup: 1kΩ (Connects VCC to the tied Collectors)
  • R_Base1, R_Base2: 10kΩ (Connects Inputs to the Bases)
  • VCC: 5.0V DC regulated supply

The Biasing Math: When Input A goes to 5V, the base current (IB) is calculated as (5V - 0.8V) / 10,000Ω = 0.42mA. The maximum collector current (IC) allowed by the pull-up resistor is (5V - 0.2V) / 1,000Ω = 4.8mA. The forced Beta (hFE) is 4.8mA / 0.42mA = 11.4. Because the 2N3904 has a typical hFE of over 100 at this current level, forcing a Beta of 11 guarantees the transistor is in deep saturation. For a deeper look at RTL design constraints, refer to this Electronics Tutorials guide on logic gates.

Biasing, Selection, and BJT vs. MOSFET Logic

Selecting between BJT and MOSFET for discrete transistor logic depends entirely on your fan-out requirements and power budget. BJTs are current-controlled devices; they draw continuous base current while holding a logic state. MOSFETs are voltage-controlled; they draw virtually zero steady-state gate current, only pulling current during the switching transitions to charge the gate capacitance.
BJT (2N3904) vs. MOSFET (2N7000) for Discrete Logic
Criterion RTL (2N3904 BJT) NMOS Logic (2N7000 MOSFET)
Control Mechanism Current (Requires continuous IB) Voltage (Requires charge, no steady IG)
Input Impedance Low (~10kΩ with base resistors) Extremely High (>109Ω)
Fan-Out Capability Poor (Loads down previous stage) Excellent (Can drive many gates)
Static Power Draw High (Base resistors bleed current) Near Zero (Only leakage)
Switching Speed Slow (Storage time delay in saturation) Fast (No minority carrier storage)

Choose the 2N3904 BJT when you are building simple, low-speed indicator logic or interfacing directly with 5V microcontrollers where current draw is irrelevant. Choose the 2N7000 MOSFET when you need to chain multiple gates together (high fan-out), minimize battery drain in static states, or interface with high-impedance sensors.

Failure Modes and Multimeter Testing

Discrete transistors in logic circuits rarely fail from normal operation; they fail from abuse. The most common BJT failure mode is secondary breakdown or thermal runaway caused by exceeding the maximum collector current or failing to provide adequate base drive, leaving the device in the high-dissipation active region. For MOSFETs, the killer is gate oxide puncture from electrostatic discharge (ESD) or exceeding the ±20V VGS limit. Here is how to test your components on the bench using a standard digital multimeter (DMM).

Testing the 2N3904 (BJT)

  1. Set your DMM to Diode Test mode.
  2. Place the Red probe on the Base and the Black probe on the Emitter. You should read a forward voltage drop between 0.60V and 0.75V.
  3. Move the Black probe to the Collector. You should read a similar 0.60V to 0.75V drop.
  4. Reverse the probes (Black on Base, Red on Emitter/Collector). The meter must read OL (Open Loop/Overload).
  5. Test Collector to Emitter in both directions. Both must read OL.
  6. Verdict: If any junction reads 0.00V (short) or if C-E reads low resistance in either direction, the transistor is blown and must be discarded.

Testing the 2N7000 (MOSFET)

  1. Set DMM to Resistance (Ohms) or Diode mode.
  2. Measure Gate to Source and Gate to Drain. Both must read OL. If you read anything less than infinite resistance, the gate oxide is punctured.
  3. Measure Drain to Source. It should read OL (or very high resistance) with the gate discharged.
  4. The Finger Trick: While keeping the Black probe on the Source and Red on the Drain, touch the Gate pin with your bare finger to introduce stray capacitive charge. The DMM reading should drop significantly, indicating the channel has turned on.
  5. Touch a grounded wire to the Gate to discharge it; the resistance should return to OL.
Debugging Logic Circuits: If your discrete transistor logic gate output is stuck floating at ~2.5V instead of pulling cleanly to 5V or 0V, your transistor is stuck in the active region. Check your base/gate resistor values. You are likely under-driving the base (causing incomplete saturation) or your pull-up resistor is too small, demanding more collector current than your base drive can support.