representing the following equation using only NAND gates

Thread Starter

u-will-neva-no

Joined Mar 22, 2011
230
Hello everyone! I have successfully converted the following equation by using De Morgan's theorem: F= A XOR (B+C)

Where I obtained the answer F = A'B +A'C + AB'C'.I would now like to convert this equation using NAND gates. Here is my attempt below:

F' = (A'B + A'C + AB'C')'

F' = (A + B')+(A + C')+(A' + B + C)

F = ((A + B')+(A + C')+(A' + B + C))'

As you can see, my input gates are actually OR gates and not NOR. Have I made a mistake or am I missing a step? Thank you for reading XD
 

Thread Starter

u-will-neva-no

Joined Mar 22, 2011
230
Oh I see. Ok from the beginning, I now have:

F = A'B +A'C + AB'C'

F' = (A'B + A'C + AB'C')'

F' = (A + B').(A+C').(A' + B + C)
F = (A + B')' + (A + C')' + (A' + B + C)'

That seems much better, would it be possible if you could confirm my answer? Thankyou for helping!
 

Heavydoody

Joined Jul 31, 2009
140
Oh I see. Ok from the beginning, I now have:

F = A'B +A'C + AB'C'

F' = (A'B + A'C + AB'C')'

F' = (A + B').(A+C').(A' + B + C)
F = (A + B')' + (A + C')' + (A' + B + C)'

That seems much better, would it be possible if you could confirm my answer? Thankyou for helping!
F=(F')'
so
F=((A+B')(A+C')(A'+B+C))'

Now we have three "or" functions joined with a "nand" gate.

A'+B'=(AB)'
so
A+B'=(A'B)'

If we apply that to the three "or" functions, we end up with three "nand" functions joined by one outer "nand" function.
 

Thread Starter

u-will-neva-no

Joined Mar 22, 2011
230
Out of curiosity, how would I convert F=((A+B')(A+C')(A'+B+C))' ?

My problem is when I let F = A+B' , I get F' = (A +B')' which is exactly what I want. Am i allowed to substitute this into the above equation even though it is F' and not F ?
 

Georacer

Joined Nov 25, 2009
5,182
Be careful of the initial constraints. You said you wanted to use only NAND gates. What you want to end up with is "ANDed" terms, not "ORed".
F'=(A+B')' is not what you want.

In the end your function will look like this:
\(F=((A+B')(A+C')(A'+B+C))' \Leftrightarrow \\
F=\left( \left( (A+B')'\right) ' \left( (A+C)'\right) ' \left( (A'+B+C)'\right)' \right) \Leftrightarrow \\
F=\left( \left(A'B \right) '\left(A'C \right) '\left(AB'C'\right)'\right)'\)

Do you see the exclusive use of the AND gates?
 

Thread Starter

u-will-neva-no

Joined Mar 22, 2011
230
Sorry, i meant to say "Out of curiosity, how would I convert F=((A+B')(A+C')(A'+B+C))' using NOR gates?" Heavydoody helped me to arrive at the same answer Georacer, however I am always great full for everyones input!
 

Georacer

Joined Nov 25, 2009
5,182
In that case, just incorporate the outer ' (complement) in the exact next inner parenthesis, in the expression of F in post #6.

You should end up only with "+" and complements.
 

Georacer

Joined Nov 25, 2009
5,182
Generally you don't have the right to substitute bits and pieces of expressions into your original one. You run the risk of altering it without realising it.

You are better off adding double negations wherever you like, like this one: ((F)')'.

As for your question, I rushed my answer a bit. The truth is it is not that straightforward to produce a NOR expression (Product of Sums) from an NAND expression (Sum of Products).

Check this thread were a similar conversation was held:
http://forum.allaboutcircuits.com/showthread.php?t=52634

A way to see this visually is to imagine an SOP circuit. AND gates in the first level and an OR gate in the second. You can turn this into a NAND configuration easily by intervening two inverters between the two levels.

The POS form on the other hand can be converted to a NOR circuit by the same process. Intervening two NOT gates between the first level OR and the second level AND turns them into NOT.

You can now see the reason why a NAND circuit can't be turned into a NOR one with the exact same inputs. It's that an AND gate cannot be turned into an OR and vice versa and as a result a NAND circuit can't be changed into a NOR one without changing its inputs.

If you read the link I gave you, you will see that the terms you use each time (either the products or the sums) must be different for the two implementation of the same Boolean function.

To sum this up:
Start with SOP to make a NAND circuit.
Start with POS to make a NOR circuit.
Conversion between the two can be made easily with making the truth table and a new Karnaugh map.

Is that clear?
 

Thread Starter

u-will-neva-no

Joined Mar 22, 2011
230
I think I understand. As for the boolean equation F' = (A'B +A'C + AB'C')', am I allowed to do
F' = (A'B)' (A'C)' (AB'C')' and/or F' = (A'+B') + (A + B') + (A' + B + C) ? basically instead of changing every symbol, i.e a + to . or a . to +, I am just choosing myself.So in the first equation, I changed + to . , whereas in the second equation i changed . to + only.


I drew the combinational logic for the two equations and tested a couple of values so i believe this is correct. Let me know if this is invalid! Thanks!
 

Georacer

Joined Nov 25, 2009
5,182
Apart from the typo in the second expression, both are correct. The difference is how deep you will complement the expression.

If F, X, Y, Z are boolean expressions, then the first case is:
F'=(X)'(Y)'(Z)'
and the second is:
F'=(X')(Y')(Z')

Is that clear?
 
Top