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.
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)$$