XOR Gate in Terms of Transistor

Last Updated : 8 Jul, 2026

A transistor-based XOR gate implements the Exclusive-OR (XOR) logic function using multiple NPN transistors that act as electronic switches.

  • Multiple NPN transistors are connected to perform the XOR operation.
  • The output becomes HIGH (1) only when the two input signals are different.
  • The output remains LOW (0) when both input signals are the same.

Circuit Components

  • Five NPN Transistors (Q1, Q2, Q3, Q4, and Q5): Act as electronic switches to implement the XOR operation.
  • Input Terminals (A and B): Apply the binary input signals to the transistor bases.
  • Resistors (R1, R2, R3, and R4): Limit the transistor base current, provide proper biasing, and protect the circuit.
  • LED (D1): Indicates the output state of the XOR gate.
  • Power Supply (+5 V): Provides the required DC operating voltage for the circuit.
  • Output: Produces the XOR gate output according to the input conditions.

Working Principle

The operation of the transistor-based XOR gate depends on the switching states of transistors Q1-Q5.

  • A = 0, B = 0: Q1, Q2, Q4, and Q5 remain OFF, so the LED does not receive a complete current path and remains OFF, indicating a LOW (0) output.
  • A = 1, B = 0: Q4 turns ON, creating a current path through the LED to ground. The LED glows, producing a HIGH (1) output.
  • A = 0, B = 1: Q5 turns ON, allowing current to flow through the LED. The LED glows, producing a HIGH (1) output.
  • A = 1, B = 1: Q1 and Q2 turn ON, causing current to bypass the LED control path. Q3 remains OFF, so the LED does not glow and the output becomes LOW (0).

This transistor arrangement ensures that the output becomes HIGH only when the two input signals are different, demonstrating the behavior of an XOR gate.

Comment

Explore