# Logic Gates - Did I connect them correctly?

I have 2 logic gates problems I need to solve applying de morgan's laws and I just wanted to make sure whether I did it correctly or not.

1. I am supposed to create the function F=abc+d using only the NOR gates.

What I did was this:

1. Create function F=anegb+abc+negbc only using NANDs.

And for this one I tried this but I am not so sure about this one:

I'd be glad if any logic gate pro could take a quick look at it and let me know what you think.

Are they okay or am I not even close?

Thanks a lot!

• Feed in all the different input combinations, see if the outputs do what you expect. That will tell you if it is correct. Mar 19, 2016 at 17:20
• I will however say they are incomplete. Your inputs are A, B, C and D. Yet in both circuits you have !A and !B as inputs. Mar 19, 2016 at 17:43

## 1 Answer

There are several errors. I suggest using WolframAlpha.com to check your logic. In the second problem, for example, for the first gate type in "evaluate (not A) nand (not B)" and you will see that the result is "A or B" instead of the "A and B" that you show.

You will see that "A or B" is the correct answer by applying the first of De Morgan's laws:

not (A and B) == (not A) or (not B)


substituting for your negated inputs:

not ((not A) and (not B)) => (not (not A)) or (not (not B)) => A or B


As one of the comments mentioned, you should really start out with non-negated inputs (A, B); you are inconsistent in that regard (you did use a gate to negate D in the first problem).

• But besides the negative inputs are the beginning, is the first one okay? And thanks for your reply, I'll try to reconstruct the function and see if I can get better results. Mar 19, 2016 at 19:20
• @Daeto Sorry, I'm not going to go through each gate and check your logic equations. That's why I posted the link to WolframAlpha, so you can double check things yourself. But yes, I did see other errors in the first example too. Mar 19, 2016 at 19:30