Ask your own question, for FREE!
Mathematics 9 Online
OpenStudy (anonymous):

How can I express p^q(p and q) in terms of NAND operator... my professor says its (p!p)!(q!q) but i think thats wrong after I made my truth table.... Also pvq

OpenStudy (phi):

p ! p (meaning p NAND p) has input: 1) 0 0 0 ! 0 = not( 0 ^ 0) = not(0) = 1 2) 1 1 1 ! 1 = not(1 ^ 1) = not(1) =0 so it negates the input (equivalent to NOT(p) ) last 2 columns NOT(and)= NAND p q NOT(p) NOT(q) and NOT 0 0 1 1 1 0 0 1 1 0 0 1 1 0 0 1 0 1 1 1 0 0 0 1 so that looks like OR

OpenStudy (phi):

one way to get AND is (p!q)!1

OpenStudy (anonymous):

we use T and F. Im assuming 0 is false and 1 is true? Here is my truth table for the p^q |dw:1378160965179:dw|

OpenStudy (anonymous):

so idk how he got (p!p)!(q!q)

OpenStudy (phi):

As I posted above (p!p)!(q!q) is p OR q to get AND, notice that if you negate p!q you get AND so you could do (p!q)!(p!q) that is using the idea that NOT(p)= p!p . in this case we are doing NOT(p!q)

OpenStudy (anonymous):

ok and your not column is for !(p^q)?

OpenStudy (phi):

just to be clear, what symbol are you using for NAND ? I get ^ = AND v = OR ? = NAND ? = NOT what are your symbols for NAND and NOT ?

OpenStudy (anonymous):

my professor can't seem to make up his mind but: Not = ~ NAND = ! And = ^ Or = v

OpenStudy (phi):

In that case a ! b = a NAND b = NOT(a AND b) = ~(a ^ b) notice that (p!p)!(q!q) = ~ ( (p!p) ^ (q!q) ) = ~( ~p ^ ~q) my last column is ~ ( ~p ^ ~q) which if you know boolean algebra, equals p v q

OpenStudy (anonymous):

ok I understand that but in my p ^ q column, I have T,F,F,T. When i evaluate (P!P)!(q!q) I get T,T, T, F so it seems they arent equal idk what im evaluating wrong

OpenStudy (phi):

Your table does not seem correct p q p^q p!q p!p q!q T T T F F F T F F T F T F T F T T F F F F T T T the entries are correct. but what are you calculating ? if you are doing (p!p) ! (q!q) then you should have p q as the first two columns (which you do) then you should do p!p and q!q (because those values will go into (p!p) ! (q!q)

OpenStudy (phi):

Notice how I did p q then p!p q!q (which are the same as ~p and ~q) then p!p ^ q!q (same as ~p ^ ~q) and finally ~(p!p ^ q!q) which is the same as (p!p) ! (q!q)

OpenStudy (anonymous):

Yes that is what I am doing. I see that I have both (p!p) and (q!q) in my table. So I plug the truth values into (p!p)!(q!q). For the first one for example, F!F = Not(False and False) = T

OpenStudy (phi):

but why do you have the column p ^ q ?

OpenStudy (anonymous):

I made the column p ^ q so that I have the truth values there to compare to (p!p)!(q!q) to see if they are equal

OpenStudy (phi):

ok. and why do you have p!q ?

OpenStudy (anonymous):

I made it because I thought my professor's answer was wrong so I was trying different things but I guess its redundant

OpenStudy (anonymous):

I have all the correct values in my table but the truth values of p^q and (p!p)!(q!q) aren't matching up for me idk why

OpenStudy (phi):

they won't. First, take out the column p!q then at the right side add the column (~p) ! (~q) which is the same as (p!p)!(q!q) you will get my table, and the last column will be the same as p v q which is your second question. (you might want to replace the 3rd column p^q with p v q so you can compare them)

OpenStudy (phi):

to get AND, notice that if you negate p!q you get AND try (p!q)!(p!q)

OpenStudy (anonymous):

Wait we were doing And first correct?

OpenStudy (anonymous):

why would I replace p^q with pvq?

OpenStudy (phi):

because your expression (p!p)!(q!q) is the same as p v q so you are answering your second question *** Also pvq ***

OpenStudy (anonymous):

so when my professor says that p^q = (p!p)!(q!q) how is that true if their values dont match? what makes it true?

OpenStudy (phi):

either he or you made a mistake.

OpenStudy (anonymous):

so the Truth values should match then correct?

OpenStudy (phi):

Yes, the truth values have to come out the same if the expressions mean the same thing.

OpenStudy (anonymous):

Ah ok. So I notice that (p!p)!(q!q) = pvq(p OR q). In class, my professor must have made a mistake by telling us AND. Is that correct?

OpenStudy (phi):

something got lost in the translation.... but I cannot say if it was him or you. However, in class you can ask him.

OpenStudy (anonymous):

Ok one last question. Since I have or...Would would be an expression = for p^q

OpenStudy (phi):

when people say "mind your p's and q's" (meaning be careful) they say that because it is easy to mix up the p's and q's an expression of p ^ q using NANDS is (p!q) ! (p!q) which looks almost the same as (p!p)!(q!q) if you are dyslexic *** Ok one last question. Since I have or...Would would be an expression = for p^q *** I don't understand the question.

OpenStudy (phi):

OK, now I understand. You are asking what's an expression using NANDs for p ^ q see above post.

OpenStudy (anonymous):

correct

OpenStudy (anonymous):

Thank you so much for your help. I think I did get p's and q's mixed up somehow Lol

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!