# How do I invert transistor output?

I have a transistor circuit as shown. There is a gate signal (in red). When the gate is HIGH (3.3 V), it is supposed to allow the signal to pass and the output should match the input. When the gate is LOW, it is supposed to shut the circuit and output should be 0 V.

This circuit is close, but my results are inverted. Could someone explain to me how to invert the output? I am new to electronics and learning still, but feel like I am not far from the solution.

• The transistors are acting as clamps, forcing the signal low when you have base current. Your have redundant clamps, the circuit will act the same if you remove Q1. Leave Q2 alone, move Q1 so it inverts the signal going to Q2. Aug 4, 2022 at 13:25
• Can I ask more specifically how to move Q1 so it inverts the signal? Aug 4, 2022 at 17:18

Here is a way (but it might be easier to just use a CMOS gate or CMOS analog switch depending on the nature of the input).

First, understand how a transistor is used as a switch. Current flow from the Base to Emitter causes the Collector to Emitter to conduct. This is a simplifed model, there are other rules to learn also.

Next, learn a few basic building blocks. I call the bottom circuit a clamp, but that is not a universal term.

simulate this circuit – Schematic created using CircuitLab

You are very close.

You want Q1 to invert the gate signal and have that control Q2. Your mistake is that Q2 is being controlled by the original gate.

Now when gate is high, Q1 turns on and brings Q2’s gate low, turning it off, allowing input to pass through resistor.

When gate is low, Q1 is off, R2 pulls Q2’s gate high turning it on and shunting the output to zero.

If you make the R2 pullup (to 3.3V presumably) 1-10K that serves as a base current limiter for R4 so you don’t really need R4 too.