Electronic – Is it possible to implement SOP with 4 terms by only 3 NAND gates

digital-logic

if I have a truth table for ABC and output Z

ABC Z    
000 1   
001 1    
111 1    
110 1

SOP=A'B'C'+A'B'C+ABC+ABC'

the most straight forward way will be 3 AND,1 NAND,1 OR
.But, I was told this can be done with 3 NANDS…
I tried simplified it, I got A'B'+AB…which can be done with 3 NANDS
but,is it make sense to ignore input c?

Can someone help?

Thanks

Best Answer

It makes sense, because if you look at the function, there are pairs of terms in which C appears both negated and not; so it has no influence on the output; and, if you look at the truth table, the same applies.

$$ {\lnot C} + {C} = 1 $$ and $$ AB \cdot (C+ \lnot C)=AB \cdot 1 = AB $$

So you can just discard C.