Im using 123d circuits by Autodesk and I am trying to make a NAND logic gate.enter image description here

When i simulate my circuit (one in picture) it does not work and the LED does not turn on. I am using 2 NPN transistors, 2 switches and 3 1k resistors. The battery is 9v. Can someone help me find whats wrong with it?


2 Answers 2


Your circuit is a strange mix of upside-down-ness. Figure 1 shows a more-likely-to-work configuration.


simulate this circuit – Schematic created using CircuitLab

Figure 1. The standard solution to this problem.

A few tips:

  • Draw your schematics with positive rail on top and negative at the bottom. It will be easier to trace current flow from top to bottom.
  • Draw inputs on the left and outputs on the right. (You did this.)
  • Add a ground symbol somewhere. Even if not connected to the Earth it provides a reference for all measurements taken on the circuit.
  • \$\begingroup\$ It's not clear from your comment whether you think I stole your answer or you are genuinely grateful. If the former then I can assure you that the idea wasn't stolen as the same AND gate design question has come up several times in the past few weeks. I think visually and find the schematics say far more than text can, are less ambiguous and intelligible to those with weak English. I try to add an illustration to all my answers if I think one will help. We complain when there are no schematics in the questions so I feel it's only right that we add them to our answers. \$\endgroup\$
    – Transistor
    Jul 4, 2016 at 12:58
  • \$\begingroup\$ Agree. I didn't spend the time to draw a schematic, and they do make things more clear. And I haven't read the other questions, so wouldn't know about other answers. \$\endgroup\$
    – AndyW
    Jul 4, 2016 at 14:09

The battery and diode polarity are opposite to what is required using NPN transistors. With an NPN transistor, the base and collector need to be +ve wrt the emitter for collector to emitter current to flow.

If you substitute PNP transistors, I think the circuit might work.

  • \$\begingroup\$ I do not think it can work just swapping parts, topology is not right. \$\endgroup\$ Jul 2, 2016 at 17:39
  • \$\begingroup\$ I had to "bend" the circuit a bit to think about it too. If you redraw the circuit with the +ve battery terminal at ground, you will see the diode is in the emitter to ground leg of the transistor totem. I think the topology is OK, just the polarities are wrong. \$\endgroup\$
    – AndyW
    Jul 2, 2016 at 17:42
  • \$\begingroup\$ for some reason I assumed the pnp emitters would have gone in place of the npn collectors, which won't work. thanks for the clarification \$\endgroup\$ Jul 2, 2016 at 17:44
  • \$\begingroup\$ I'm confused, Does electricity flow from negative to positive or vice versa? \$\endgroup\$
    – Don Grey
    Jul 2, 2016 at 18:34
  • \$\begingroup\$ That's a more complicated question that generally appreciated….Electrons (which constitute electricity in most cases, and certainly in conductive metal wires) flow from negative to positive. In semiconductors we also talk about "holes", which is really a place where an electron could be, but isn't. Holes have a positive charge, and flow from positive to negative, but only in a semiconductor. In an ionic solution, both positive and negative ions can exist, and flow in opposite directions. \$\endgroup\$
    – AndyW
    Jul 2, 2016 at 18:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.