I was given an equation to draw a circuit "X Y Z (X + Y + Z) + ~X ~Y ~Z (X + Y + Z) + (~X + ~Y + ~Z) ~Z + X Z (Y + ~Z)=F" My initial design used 22 gates but I was told you could get creative and reduce the amount of gates. After enough tinkering I got it down to 2 NAND gates. The resulting equation from the 2 gate design is "~(Z ~(X Y))=F" The output from each circuit (results in truth table) is the same for both designs even though the equation and amount of gates is different. My question is, will both these designs essentially function the same? Or did I reduce it too much and change the core of its function?