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.