1
\$\begingroup\$

I am attempting to make a 4 bit computer with transistors. I've made a half-adder without too much trouble, but now I'm trying to incorporate the AND gate's output (the carry) into the next adder. This is the schematic I'm using for my AND gate:

schematic

simulate this circuit – Schematic created using CircuitLab

This isn't exactly how it looks (for one thing, mine has resistors), but this is basically it.

Using this, I know that if the LED is on, both switches are pressed. yay. But now I want to do something with that information. I'm at a loss for how to do this.

In a different gate where the output is after everything else in the gate (ie OR gate), I would just replace the LED with a wire that connects to the input of the next gate. I can't do that here because the output of the AND gate depends on the rest of the circuit.

Am I doing something wrong?

Thanks for the help.

\$\endgroup\$
0
\$\begingroup\$

If one of your resistors is in the collector of the top transistor, then you have created a nand gate. When you press both buttons the output of the top transisor will be low. You need to invert this to have an and gate.

\$\endgroup\$
  • \$\begingroup\$ I'm sorry if I'm not following you, but in my circuit, if both buttons are pressed, electricity will flow through the LED. My question was about how to integrate this into another logic gate. \$\endgroup\$ – KingsGambit Nov 13 '16 at 22:39
  • \$\begingroup\$ Your buttons put a high voltage on the inputs. This means you are defining 1V as logic 1. The collector of Q1 is the output of your gate. You have implemented 1 and 1 produces 0V. This is the nand function. The and function 1 and 1 should produce 1V. An inverter would change the 0V to 1V and give you an and gate. It you then put another and gate after his one, the 1V input would be like pressing one of your buttons. \$\endgroup\$ – owg60 Nov 13 '16 at 22:47
  • \$\begingroup\$ Sorry if I'm not understanding, but if I implement 1 and 1, why is the voltage at the collector not 1V? \$\endgroup\$ – KingsGambit Nov 13 '16 at 22:56
  • \$\begingroup\$ If it were the LED anode is at one volt and the Q1 collector was at 1V there would be zero volts across the LED. This means it would be off. Since you have created a nand gate Q1c is 0V and the LED is on. \$\endgroup\$ – owg60 Nov 13 '16 at 23:03
0
\$\begingroup\$

The transistors don't do any good. You should use the switches, themselves, in series, rather than transistors, to get the logic function you want. By choosing whether the switches are on the anode or cathode side of the LED/resistor (you do have a resistor, don't you?) you can get a NAND or AND function. BTW, the LED you chose has a typical forward ON voltage of 2 volts: you won't be able to use a 1 volt supply.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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