Electrical – Creating a logic circuit with only NAND gates

boolean-algebradigital-logiclogic-gatesnand

I am supposed to make a logic circuit with only NAND gates.

I have created a truth table and i have extracted the boolean expression using a karnaugh map.

My function is: \$\overline XZ + XY\$

How can i draw this circuit using only 4 NAND gates?

UPDATE

**So this is how much is given from the teacher as to "start with" an I am supposed to draw the lines through this circuit of NAND gates to create the function ~xz + xy. I still get so confused when starting to draw the lines even though all the great help from all of you, I just cant make it to be in line with my function. It just seems hopeless.* *
image

As another UPDATE I added my karnaugh map to make sure with all of you that my function is correct.

enter image description here

Best Answer

My function is: \$\overline XZ + XY\$

How can i draw this circuit using only NAND gates?

  • X!Z+XY
  • =((X)!Z)! . (XY)!)! de Morgan's
  • = (((X)!.Z)! . (X.Y)!)! ( i did this on an iPad which is unable to drawing schematics)

schematic

simulate this circuit – Schematic created using CircuitLab

  • thus for 3 inputs X,Y,Z
    • using "!"= inverted output from NAND, a=b input
    • "." = AND , "+" OR
    • (NAND)x n = number of NAND-2in gates
    • n = 4 pairs of parentheses.

enter image description here

And here is a NAND gate computer.

enter image description here