Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to build logic gates using 2N222's?

0 views
Skip to first unread message

Ron Watkins

unread,
Jun 8, 1994, 3:49:37 PM6/8/94
to
I would like to have some fun with logic gates and build some using 2N222's
I have heard that's how one can build them. Can anyone point me to a reference
showing the proper layout of a simple logic gate using transistors and
resistors? Looking for any of the basic gates, not, and, or, nand, etc...
Not any of the real fancy stuff, just somthing to play around with.

Ron W.
--
Ron Watkins [r...@argus.lpl.arizona.edu] / /~~~~) /
931 Gould-Simpson / /____/ /
University of Arizona / / /
Tucson AZ. 85721 -- (602) 621-8606 (____ unar & / lanetary (____ ab.

Christopher J Burian

unread,
Jun 8, 1994, 7:06:07 PM6/8/94
to
r...@argus.lpl.Arizona.EDU (Ron Watkins) writes:

]I would like to have some fun with logic gates and build some using 2N222's


]I have heard that's how one can build them. Can anyone point me to a reference
]showing the proper layout of a simple logic gate using transistors and
]resistors? Looking for any of the basic gates, not, and, or, nand, etc...
]Not any of the real fancy stuff, just somthing to play around with.

Electronics Now! magazine usually has back-to-basics transistor articles
which demostrate things like that. Check your library.

Chris Burian

Richard Steven Walz

unread,
Jun 8, 1994, 9:19:48 PM6/8/94
to
In article <2t57ch$i...@news.ccit.arizona.edu>,

Ron Watkins <r...@argus.lpl.Arizona.EDU> wrote:
>I would like to have some fun with logic gates and build some using 2N222's
>I have heard that's how one can build them. Can anyone point me to a reference
>showing the proper layout of a simple logic gate using transistors and
>resistors? Looking for any of the basic gates, not, and, or, nand, etc...
>Not any of the real fancy stuff, just somthing to play around with.
>--
>Ron Watkins [r...@argus.lpl.arizona.edu] / /~~~~) /
>931 Gould-Simpson / /____/ /
>University of Arizona / / /
>Tucson AZ. 85721 -- (602) 621-8606 (____ unar & / lanetary (____ ab.
----------------------------------------
Pardon me, Ron, but you MUST mean 2N2222's (with 4 '2's), and this is
actually quite simple. Here is the design for some gates I made for a kid's
lab show and tell which did all the different gates and the culminating two
projects were a JK flip-flop and a four bit binary adder.

You use open-collector logic and thus the ouput is simply the collector of
the transistor for each simple gate. An inverter and a NAND can be made
quite easily, and then from those, any other gate you wish! You pull up the
base with a 10K ohm resistor or even larger, and you also hang diodes to
that connection as well which are the inputs. They isolate each input from
the others, (if any), and allow the current to the normally ON transistor
to pull the collector low except when one of those inputs with a diode is
grounded by a previous collector or switched input. It might be a good
idea to pull up the output (collectors) weakly as well with a 10K to the 5V
source. The emitters always go to ground. Thus a typical inverter/NAND
gate looks like this:

+5V
+5V |
| 10K
10K |------------- output
| |/ c
input A -----|<|-----|---|------|b
| |\
| |e
input B -----|<|-----| |
-----
---
-

This is usually sufficient to have some fun with kids to relate
transistors to chips. Note that this is an inverter or a NAND gate,
depending on whether both inputs are used! Note how to create the other
gates from this kind, as it is easiest to make with 2N2222's. The NOR would
be two inverted inputs to a NAND and then another inverter on the output:
Total, 4 transistors. And XOR is either-or but not both, so you use
an OR, (3 transistors, the NOR above without the ouput inverter) and then
use two AND inputting into it, and then put appropriate inverters on one
input for one input line and then the other, with inverted and non-inverted
signals appropriately. Get Forrest Mims, III 's book from RShack for all
the ways to make one gate from another.

Then set about reducing gates which are double inversions, and look up
DeMorgan's Laws to manipulate the sense of AND and OR with inverters for
your optimal use of transistors. If some book doesn't show you the "magic
castle" means of making an XOR with 4 NANDS, 4 transistors, then here it
is:
|-------------------------|------|
in A | | NAND |-----|
------|------|------| |-----|------| |-----|------| out
| NAND |-----| | NAND |-------
------|------|------| |-----|------| |-----|------|
in B | | NAND |-----|
|-------------------------|------|

And of course, the X-NOR, or comparator, is just one more inverter on the
ouput of that mess. If you draw it with proper NAND gate symbols and then
look at it with the ouput at the top, you can see why it's called the
"magic castle", it looks like one! A memorable circuit, and a good Boolean
Algebra final exam question!!!

If you really want to be true to form, you can replicate the standard old
original TTL NAND gate with the original components except with discrete
packages, using 3 of this transistor and the oft stated values for the
components in an actual 7400 TTL QUAD 2-INPUT NAND gate, even as the plain
7400's are today! The voltage thresholds come out rather accurately,
actually! You can find that design in many textbooks and old databooks on
TTL logic. The logic I had you use is called open collector DTL logic, and
it was used in the early 70's both on chips and out of discrete components.
Experiment with fan-out and the power dissipation and compare it to the TTL
emulation. Oh, and that funny multi-emitter thing used in the input end of
the TTL can be accurately relicated with diodes, as its transistor nature
is really not being exploited. It would be more correct to draw it as
diodes, as it uses the bc junction for a diode as well!
-Steve Walz rst...@armory.com

H. Philip Chen

unread,
Jun 9, 1994, 10:47:55 PM6/9/94
to
In article <2t57ch$i...@news.CCIT.Arizona.EDU> r...@argus.lpl.Arizona.EDU (Ron Watkins) writes:
>I would like to have some fun with logic gates and build some using 2N222's
>I have heard that's how one can build them. Can anyone point me to a reference
>showing the proper layout of a simple logic gate using transistors and
>resistors? Looking for any of the basic gates, not, and, or, nand, etc...
>Not any of the real fancy stuff, just somthing to play around with.

Come on Ron, if you wanna have fun, don't use transistors. Use diodes!

And since you're at it, use LEDs (yeah, they're diodes with a cool
attitude). The method to build logic gates using diodes is covered in
one of Radio Shake's mini-books [and you can always port 'em to LEDs].

Later on, you might wanna build a whole board (state machine) with
those LEDs, and watch those logic gates blink. Ever wondered how the
computer on USS Enterprise works? Yup, you've seen a couple of walls
filled with 'em big LEDs on the Fox Network.

Caution: all the fancy colors may also attract GD fans into town!

(I think I better vaporize before all the VHDL guys out there get to
zap me.)


Cheers,

-phil

Ken Thompson

unread,
Jun 10, 1994, 6:55:16 AM6/10/94
to
In article <2t57ch$i...@news.CCIT.Arizona.EDU> r...@argus.lpl.Arizona.EDU (Ron Watkins) writes:
>From: r...@argus.lpl.Arizona.EDU (Ron Watkins)
>Subject: How to build logic gates using 2N222's?
>Date: 8 Jun 1994 19:49:37 GMT
>Keywords: logic


Sounds like a class assignment to me :-)


0 new messages