# 4 input NAND w/ 2 input NANDs?

S

#### Shawn

Jan 1, 1970
0
Hello all..

I'd like to verify my thinking here and make sure I'm not missing
something simple. I have a circuit that requires a 4 input NAND, but I
only have 2 or 3 input NANDs on hand. If I take each of 2 inputs into
2 separate NANDs, invert the outputs, and run them through another 2
input NAND, I'll get the result that I want - low only when all 4
inputs are high.

The logic works out correctly, but I'm wondering if there is a
better/easier way to make a 4 input NAND out of 2 input NANDs, or if
that's a generally acceptable way of doing it.

Thanks for any suggestions.

C

#### Chris

Jan 1, 1970
0
Shawn said:
Hello all..

I'd like to verify my thinking here and make sure I'm not missing
something simple. I have a circuit that requires a 4 input NAND, but I
only have 2 or 3 input NANDs on hand. If I take each of 2 inputs into
2 separate NANDs, invert the outputs, and run them through another 2
input NAND, I'll get the result that I want - low only when all 4
inputs are high.

The logic works out correctly, but I'm wondering if there is a
better/easier way to make a 4 input NAND out of 2 input NANDs, or if
that's a generally acceptable way of doing it.

Thanks for any suggestions.

Chris

R

#### Rich Grise

Jan 1, 1970
0
Hello all..

I'd like to verify my thinking here and make sure I'm not missing
something simple. I have a circuit that requires a 4 input NAND, but I
only have 2 or 3 input NANDs on hand. If I take each of 2 inputs into
2 separate NANDs, invert the outputs, and run them through another 2
input NAND, I'll get the result that I want - low only when all 4
inputs are high.

The logic works out correctly, but I'm wondering if there is a
better/easier way to make a 4 input NAND out of 2 input NANDs, or if
that's a generally acceptable way of doing it.

What's "generally accepted" is usually "what works". Also, lots of
times, "uses what you have on hand". There are very many ways to
make a 4 input NAND, if you have other logic gates available. Do
a truth table, or Venn diagram, or whatever they call it, and
work out some logic equations and see what you can come up with.

If all you're allowed to use is NANDs, then what you've got is
pretty much it.

Hope This Helps!
Rich

J

#### John Popelish

Jan 1, 1970
0
Shawn said:
Hello all..

I'd like to verify my thinking here and make sure I'm not missing
something simple. I have a circuit that requires a 4 input NAND, but I
only have 2 or 3 input NANDs on hand. If I take each of 2 inputs into
2 separate NANDs, invert the outputs, and run them through another 2
input NAND, I'll get the result that I want - low only when all 4
inputs are high.

The logic works out correctly, but I'm wondering if there is a
better/easier way to make a 4 input NAND out of 2 input NANDs, or if
that's a generally acceptable way of doing it.

Thanks for any suggestions.

The essence of a NAND is any low input causes a high output.
You can tie the outputs of a pair of 2 input NANDs with an OR gate and
make a 4 input NAND. Or you can connect the 4 inputs to a pair of
AND gates and tie those together with a NAND. If you only have NANDs,
your way (using 5 2 input NANDS) is the best you can do.

S

#### Shawn

Jan 1, 1970
0
Yes, that helps a lot, Rich. I appreciate the quick response.
Contrary to what some believe, I'm actually building a circuit, not
doing a homework problem.

S

#### Shawn

Jan 1, 1970
0
Actually, John, 2 input NANDs is all I have handy. I considered
ordering 4 inputs from Digikey, but with a $25 minimum for no handling charge, or paying$6 for 50 cents worth of parts, it seemed wiser to
just try and use what I had here. I do have inverters, so I'll use
those in conjunction with the NANDs, and should only need 3 NANDs and
2 inverters as I originally spec'd.

Thanks again for such a quick response. I'll be sniffing the sweet
smell of solder tonight!

P

#### PeteS

Jan 1, 1970
0
Merely as a comment, you can make anything out of NAND gates (or out of
NOR gates) - provided you have enough, of course

They're known as universal gates.

For two input gates -

A NAND obviously gives Y = NOT(A AND B), but could also be said to give
Y = NOT A OR NOT B (DeMorgan's theorem).
From that, we can get any of the three principal operators (AND, OR,
INVERT) from the one gate. The same applies to NOR [ Y = NOT A AND NOT
B, Y = NOT(A OR B) ]

For a fundamental gate, invert all inputs and outputs and swap the gate
type between AND <-> OR to implement DeMorgan's theorem.

Good explanation at Wikipedia

http://en.wikipedia.org/wiki/Boolean_logic

Cheers

PeteS

K

#### Kitchen Man

Jan 1, 1970
0
Merely as a comment, you can make anything out of NAND gates (or out of
NOR gates) - provided you have enough, of course

They're known as universal gates.

Indeed. NAND gates also form the basis for software modeling. Since,
as you say, a combination of NAND gates can form *any* logic equation,
once one has a successful software model of the NAND, all one needs to
form any other software logic circuit is a proper multiple combination
of the original model.

P
Replies
5
Views
3K
JeffM
J
Z
Replies
4
Views
3K
Fred Bloggs
F
Replies
3
Views
136
Replies
1
Views
407
Replies
2
Views
961