Electronic circuits · no code

Transistor NOR Logic Gate

A NOR gate with two transistors in parallel: the LED lights only when both inputs are 0. It is the inverted OR and, like the NAND, a universal gate.

  • LevelBeginner
  • Time25 min
  • Power9 V DC
  • CategoryLights & LEDs

Bill of materials

Everything you need to build it, with the reference you will see on the schematic.

Bill of materials
Qty Part Ref.
2 Slide switch (SPDT, 3 legs) SA, SB
2 10 kΩ resistor (brown-black-orange) R1, R2
2 BC547 NPN transistor Q1, Q2
1 470 Ω resistor (yellow-violet-brown) R3
1 red LED D1
1 9 V battery with snap clip BT1
1 Breadboard (400 tie-points or more)
11 Jumper wires

Missing parts? The kits recommended by Impeca Tech include almost all of them. See the kits

Schematic & wiring

On the left, the circuit diagram; on the right, the same circuit built on a breadboard. Both connect exactly the same things.

Circuit diagram of “Transistor NOR Logic Gate”
Circuit diagram
Breadboard layout of “Transistor NOR Logic Gate”
Breadboard layout

Wire it step by step

  1. Place the components
    • Slide switch SA with its three legs on row f: the left one (position 1) in 3f, the middle one (common, C) in 4f and the right one (position 2) in 5f.
    • Slide switch SB with its three legs on row f: the left one (position 1) in 6f, the middle one (common, C) in 7f and the right one (position 2) in 8f.
    • 10 kΩ resistor R1 (bands: brown, black, orange, gold): one leg in 4h and the other in 9h (either way round).
    • 10 kΩ resistor R2 (bands: brown, black, orange, gold): one leg in 10f and the other in 13f (either way round).
    • BC547 transistor Q1 with the flat face (the one with the text) towards you, left to right: collector (C) in 17f, base (B) in 18f, emitter (E) in 19f.
    • BC547 transistor Q2 with the flat face (the one with the text) towards you, left to right: collector (C) in 14f, base (B) in 15f, emitter (E) in 16f.
    • 470 Ω resistor R3 (bands: yellow, violet, brown, gold): one leg in 11i and the other in 14i (either way round).
    • red LED D1: the long leg (+, anode) in 17h and the short leg (−, cathode, flat side) in 16h.
  2. Add the jumper wires
    • Red wire: from 3j to the + (red) rail.
    • Red wire: from 6j to the + (red) rail.
    • Red wire: from 11j to the + (red) rail.
    • Black wire: from 5j to the − (blue) rail.
    • Black wire: from 8j to the − (blue) rail.
    • Black wire: from 16j to the − (blue) rail.
    • Black wire: from 19j to the − (blue) rail.
    • Orange wire: from 7j to 10j.
    • Turquoise wire: from 9j to 18j.
    • Purple wire: from 13j to 15j.
    • Pink wire: from 14j to 17j.
  3. Connect the battery
    • Connect the 9 V battery to its clip: the clip’s red lead to the + (red) rail and the black one to the − (blue) rail. Do this last, once everything else is in place.
  4. Test the circuit
    • Try the four combinations: the LED lights only with A=0 and B=0; with A=1 and B=0, A=0 and B=1, and A=1 and B=1 it is off. Compare it with the NAND: here a single input at 1 is enough to turn the LED off. On a multimeter the output reads about 1.9 V when lit and under 0.1 V when off.

How to read the holes: the letter is the row and the number is the column of the breadboard (for example 7f). The red (+) and blue (−) rails are the two long lines along the edge.

How does it work?

  1. 1You set A and B to 1 or 0
  2. 2One conducting transistor is enough to pull the output to GND
  3. 3With A=1 or B=1 the output falls and the LED goes off
  4. 4Only with A=0 and B=0 does the output rise and the LED light

Q1 and Q2 are in parallel between the output and GND: if either one conducts, it pulls the output to GND. Each one conducts only when its input (through R1 or R2, 10 kΩ) is 1. With A=1, B=1 or both at 1, the output falls to about 0.05 V and the LED, which sits between the output and GND, goes off. Only with A=0 and B=0 are both transistors cut off, the current from R3 (470 Ω) goes entirely through the LED and it lights with about 15 mA. The output is 1 only if A and B are 0: that is a NOR (NOT-OR). Each input (A and B) is set to 1 or 0 with a 3-leg slide switch: towards position 1 it is tied to the battery + (level 1) and towards position 2 to GND (level 0). That way the input is never left “floating”, as it would be with a pushbutton.

Testing & troubleshooting

What you should see

A = 0, B = 0
Voltage at the output≈ 1.92 V
LED current≈ 15 mA
A = 1, B = 0
Voltage at the output≈ 0.05 V
LED currentunder 0.1 mA
A = 0, B = 1
Voltage at the output≈ 0.05 V
LED currentunder 0.1 mA
A = 1, B = 1
Voltage at the output≈ 0.04 V
LED currentunder 0.1 mA

Approximate values, calculated with typical parts. With real parts they can vary by 10 % or more.

If something does not work

The LED does not go off with one of the inputs at 1?

Check the transistor for that input: its base must come through R1 (or R2) and its emitter must go to GND. An unconnected emitter, or one in another row, stops it from conducting.

The LED is always off?

See whether an input is unconnected or at 1: it must really be at 0 (position-2 leg to the board −). Also check the LED (long leg + towards R3 and the collectors) and R3.

Want to automate this circuit with code?

Learn how to program sensors and custom schedules in our e-book “Arduino from Scratch”.