0

I have a function that I must convert to NAND-only. I've been trying to use the De Morgan's law but, I'm getting wrong results. Here is my function:

$$z = \overline{d} \overline{f}(\overline{a}ce + ac\overline{e} + \overline{b}a\overline{c} + \overline{a}b\overline{c}\overline{e} + \overline{a}b\overline{c}\overline{e}) + df(ace + \overline{a}bc\overline{e} + a\overline{b}\overline{c}\overline{e}) + de(\overline{c}\overline{f}+a\overline{b}c\overline{f}) + abc\overline{d}f$$

I used De Morgan's law:

$$\overline{a+b} = \overline{a}*\overline{b}$$

to get the following function

$$\overline{\overline{\overline{df}(\overline{a\overline{ce}} * \overline{\overline{ac}e} * \overline{\overline{a}bc} * \overline{a\overline{b}ce} * \overline{a\overline{b}ce})} * \overline{\overline{\overline{d}\overline{f}}(\overline{\overline{a}\overline{c}\overline{e}} * \overline{a\overline{b}\overline{c}e} * \overline{\overline{a}bce})} * \overline{\overline{\overline{d}\overline{e}}(\overline{cf} * \overline{\overline{a}b\overline{c}f})} * abc\overline{d}f}$$

which outputs wrong results.. This function even looks too difficult, I must be doing something wrong. I've been trying to get this working for two days now but it looks like I'll need help from the pros.

Nedas
  • 103
  • Don´t you have right to simplify before converting? – user376343 Mar 09 '19 at 11:14
  • I did simplify it, didn't I? – Nedas Mar 09 '19 at 11:47
  • It looks overlong. But it is your choice, not a mistake. As for the use of De Morgan´s laws, it is worse (a catastrophe, to be honest): $\overline{d} \overline{f}\neq \overline{df},$ $\overline{d} \overline{f}(something)\neq \overline{df}\overline{(something)}$ etc. – user376343 Mar 09 '19 at 12:00
  • Why do you have the term $\overline{a}b\overline{c}\overline{e} $ twice? – Jens Mar 09 '19 at 12:08

1 Answers1

0

Written as simplified sum of $10$ products:

$$(\lnot cde\lnot f) \lor (\lnot ac\lnot de\lnot f) \lor (\lnot abcd\lnot ef) \lor (a\lnot b\lnot cd\lnot ef) \lor (\lnot ab\lnot c\lnot d\lnot e\lnot f) \lor (a\lnot bcde) \lor (abc\lnot df) \lor (abcef) \lor (ac\lnot d\lnot e\lnot f) \lor (a\lnot b\lnot c\lnot d\lnot f)$$

Translated to NANDs:

$$\lnot ( \lnot(\lnot cde\lnot f) \land \lnot(\lnot ac\lnot de\lnot f) \land \lnot(\lnot abcd\lnot ef) \land \lnot(a\lnot b\lnot cd\lnot ef) \land \lnot(\lnot ab\lnot c\lnot d\lnot e\lnot f) \land \lnot(a\lnot bcde) \land \lnot(abc\lnot df) \land \lnot(abcef) \land \lnot(ac\lnot d\lnot e\lnot f) \land \lnot(a\lnot b\lnot c\lnot d\lnot f)$$

Axel Kemper
  • 4,943