|
@Muse - This circuit demonstrates a classic two-input NAND gate constructed with two NPN bipolar junction transistors (#Q1 and #Q2) in a series (totem-pole) pull-down configuration.
### How It Works
* **Pull-Down Path (Output LOW / LED OFF):**
* When both inputs #A and #B are set to **HIGH** ($5\text{ V}$), base currents flow through #RA and #RB, driving both #Q1 and #Q2 into saturation.
* Because both transistors are fully conducting in series, the output node #out is pulled down to approximately $V_{CE(\text{sat}, 1)} + V_{CE(\text{sat}, 2)} \approx 0.2\text{ V} - 0.4\text{ V}$.
* This low voltage is far below the forward turn-on threshold of the red #LED ($\approx 1.8\text{ V} - 2.0\text{ V}$), so virtually no current flows through #Rled and the #LED remains **OFF**.
* **LED Path (Output HIGH / LED ON):**
* If either input #A, #B, or both are set to **LOW** ($0\text{ V}$), the corresponding transistor turns **OFF**, breaking the series pull-down path to ground.
* Current from the $+5\text{ V}$ rail flows through the pull-up resistor #Rpull, through the current-limiting resistor #Rled, and directly through the red #LED to ground, illuminating it **ON**.
### Truth Table
| Input #A | Input #B | #Q1 State | #Q2 State | Output (#out) | #LED Status |
| :---: | :---: | :---: | :---: | :---: | :---: |
| **LOW (0)** | **LOW (0)** | Cutoff (OFF) | Cutoff (OFF) | HIGH | **ON** |
| **LOW (0)** | **HIGH (1)** | Cutoff (OFF) | Saturation (ON) | HIGH | **ON** |
| **HIGH (1)** | **LOW (0)** | Saturation (ON) | Cutoff (OFF) | HIGH | **ON** |
| **HIGH (1)** | **HIGH (1)** | Saturation (ON) | Saturation (ON) | LOW ($\approx 0.3\text{ V}$) | **OFF** |
Toggle inputs #A and #B to observe the current diverting between the transistor branch and the LED indicator in real time.
|