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


For a good in-depth discussion on how to create boolean expressions with only one kind of function / logic gate (NOR in this case, but changing it to NAND is easy), take a look



Pragmatic Programmer Magazine 2012-03: NOR Machine

+1


source


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

      

NAND only

/( /(c * b * a)  *  /( /(c * c) * b * /(a * a) ) )

NAND( NAND(c,b,a) , NAND( NAND(c,c), b, NAND (a, a)))

      

So, you need two 3-gate NAND, three 2-gate NAND.

NOT (A) = NAND (A, A)

A OR B = NAND (NAND (A, A), NAND (B, B))

+1


source







All Articles