Converting an expression to only use NAND gates

Thread Starter

Ben Scanlon

Joined Nov 28, 2015
4
Really stuck. I've tried de Morgan's law but I'm confused as to when converting the whole expression, the 'and' gates will change to 'or' gates and when where to change it to a 'not' expression. Also a bit unsure as what to do with the XOR gates. Would I just use distributivity?

I need them all to be NAND gates.

Sorry if my English is bad and ignore the crossing out after the B

Screen Shot 2015-11-28 at 18.15.23.png
 

Thread Starter

Ben Scanlon

Joined Nov 28, 2015
4
Thanks for the reply!

I get how to convert it into a circuit. It's writing it out as an expression that is confusing me.
 

WBahn

Joined Mar 31, 2012
30,058
Really stuck. I've tried de Morgan's law but I'm confused as to when converting the whole expression, the 'and' gates will change to 'or' gates and when where to change it to a 'not' expression. Also a bit unsure as what to do with the XOR gates. Would I just use distributivity?

I need them all to be NAND gates.

Sorry if my English is bad and ignore the crossing out after the B

View attachment 95499
The best approach is to expand the XOR into what it really is, namely A'B + AB'
 

RBR1317

Joined Nov 13, 2010
714
Have you tried to layout that function on a Karnaugh Map? Minimizing for a hardware design using Boolean algebra is really difficult. I guess that is why K-maps were invented. Also, this seems like a natural for using some 3-input NAND gates.
 

WBahn

Joined Mar 31, 2012
30,058
Really stuck. I've tried de Morgan's law but I'm confused as to when converting the whole expression, the 'and' gates will change to 'or' gates and when where to change it to a 'not' expression.
The key to DeMorgan's Theorem is that you can change any AND or and OR, or vice-versa, and maintain the same functionality by inverting the signals at ALL inputs and ALL outputs of THAT gate.

Do things one layer at a time.

For instance, if you have

Y = A(B' + C)D' + AB'(C+D)

First get the final NAND gate functionality in there by applying DeMorgan's to the whole thing:

Y = {[A(B' + C)D'][AB'(C+D)]}'

Now worry about the internal signals at the next layer. And so on and so on.
 

RBR1317

Joined Nov 13, 2010
714
I've tried de Morgan's law but I'm confused as to when converting the whole expression,
There is an alternative method that does not rely on DeMorgan expansions. It is a just simple method of expansion that yields the same minterms that would appear in a Karnaugh map. Minterms can be recombined into a simpler form that mimics K-map minimization. Of course, it helps if you have the K-map so it is easy to see which terms need to be combined. This function can be implemented with just four 3-input NAND gates and three inverters to negate three of the input variables.
Expression in NAND circuit.png
 

dl324

Joined Mar 30, 2015
16,918
@RBR1317 In the Homework Help forum, the preferred mode of operation is to guide students to the answer. Giving them the answer deprives them of an opportunity to prove to themselves they can do it. Most teachers would consider having someone do your homework for you cheating.
 

shteii01

Joined Feb 19, 2010
4,644
@RBR1317 In the Homework Help forum, the preferred mode of operation is to guide students to the answer. Giving them the answer deprives them of an opportunity to prove to themselves they can do it. Most teachers would consider having someone do your homework for you cheating.
I am not defending BRB, but... sometimes... it is just too painful to watch.
 

RBR1317

Joined Nov 13, 2010
714
...the preferred mode of operation is to guide students to the answer.
Exactly what I did. Explained a general method to approach the problem, pointed the direction, and walked about 15% down the path. It's up to the OP to do the other 85% to the final solution.
 

dl324

Joined Mar 30, 2015
16,918
Exactly what I did. Explained a general method to approach the problem, pointed the direction, and walked about 15% down the path. It's up to the OP to do the other 85% to the final solution.
If you say so. IMO, you did most of the work.
 
Top