# How to convert boolean expression from AND and OR to NAND only

I have a task that drives me crazy because I don't know where to start.

The task is as follows: Convert the given boolean expression so that it contains only NAND operations and no negations.

```
c * b * a + /c * b * /a
```

I guess this is possible: D but I have no idea how to do it and spent a few hours just spinning in circles.

Can anyone point me in the right direction?

Regards,

asks

** Update:**

thanks to the answers, I think I found a solution:

```
c*b*a = /(/(c*b*a)*/(c*b*a)) = A;
/c*b*/a = /(/(/(a*a)*b*/(c*c))*/(/(a*a)*b*/(c*c))) = B;
c*b*a+/c*b*/a = A + B = /(/(A*A)*/(B*B))
```

+3

source to share

3 answers

It has a breakdown of how to build other logic gates via NAND. There should be a simple application:

http://en.wikipedia.org/wiki/NAND_logic

eg. C = A AND B is equivalent

`C = NOT (A NAND B) or C' = (A NAND B) C = C' NAND C' (effectively NOT'ing A NAND B)`

+1

source to share