5
\$\begingroup\$

A question that had popped up in my head once - how many NAND gates would it take to build a larger, "meta-NAND" gate?

Your task is to build a black-box circuit that takes two input wires A and B and returns one output wire that satisfies A NAND B, subject to the following restrictions:

  • You must use at least two NAND gates in this construction (and no gates other than NAND).
  • You may not have null configurations of gates - that is, systems of gates that are equivalent to a gateless wire. (For example, two NOT gates in series are a null configuration.)
  • You cannot have any stray wires (discarded values or constants).

Fewest gates wins.

luser droog
4,9672 gold badges37 silver badges61 bronze badges
asked Aug 5, 2013 at 3:50
\$\endgroup\$
0

3 Answers 3

13
\$\begingroup\$

Three gates. Compute (((A nand A) nand B) nand B). Unlike the four-gate solution above in which three of the four gates compute A nand B, two of them simultaneously, and substituting one of the simultaneous outputs for the other would yield two consecutive inverters, the three-gate solution uses the three gates to compute different functions: "not A", "A or not B", and "A nand B". Only the last gate computes the desired function.

answered Mar 28, 2014 at 19:29
\$\endgroup\$
7
\$\begingroup\$

4 gates

(A NAND B) AND-using-NAND (A NAND B)

A---NAND _
 \ / \ / \
 X NAND-< NAND-->
 / \ / \_/
B---NAND
answered Aug 5, 2013 at 5:12
\$\endgroup\$
7
\$\begingroup\$

3 gates

 /-----------\
A-< \
 \-----\ \
 \ NAND--
 NAND--/
B-<NAND---/
answered Feb 28, 2017 at 16:17
\$\endgroup\$
1
  • \$\begingroup\$ Duplicate of this answer, (but with A and B switched) \$\endgroup\$ Commented Mar 1, 2017 at 21:17

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.