Peter111
Peter111

Reputation: 823

Boolean: How to convert a NAND4 to a NAND2

I have the following problem. My equation is:

NAND2(NAND4(d,c,-b,a),NAND2(c,-a))

the "-" represents "NOT". I am not allowed to use NAND4, I am only allowed to use NAND2.

How do I convert this?

Thanks

Upvotes: 1

Views: 481

Answers (1)

poke
poke

Reputation: 388463

  • NAND in general is equivalent to NOT(AND(…))
  • AND4(a, b, c, d) is equivalent to AND2(AND2(a, b), AND2(c, d))
  • NAND4(a, b, c, d) is thus equivalent to NOT(AND4(a, b, c, d)) and that’s equivalent to NOT(AND2(AND2(a, b), AND2(c, d)))
  • This is equivalent to NAND2(AND2(a, b), AND2(c, d))
  • If you were only allowed to use NANDs but not ANDs, you could invert the ANDs there: NAND2(NOT(NAND2(a, b)), NOT(NAND2(c, d)))

Upvotes: 2

Related Questions