# Drawing circuits with NAND gates

#### shamieh

##### Active member
A cheap way to implement this circuit is to use only NAND gates. Draw the circuit diagram for the lowest cost implementation using these gates. (reminder: you can wire a NAND gate such that it acts like an inverter).

$f$(w,x,y,z) = $$\displaystyle x*y + w*x + \bar{y}*\bar{z}$$

My solution:
Will this work?

#### Evgeny.Makarov

##### Well-known member
MHB Math Scholar
Will this work?
Close, but the problem statement says you can use only NAND gates, in particular, no NOT gates. However, NOT is easily expressible through NAND.

#### shamieh

##### Active member
Wow the fact that you got that your drew that diagram on here is awesome lol. But where is the y y and z z coming from? aren't those unnecesarry?

#### Evgeny.Makarov

##### Well-known member
MHB Math Scholar
But where is the y y and z z coming from? aren't those unnecesarry?
I don't understand the question, "Where are they coming from?". Do you know where x is coming from? What's the difference between x and y?

#### shamieh

##### Active member
Nevermind, I see now.