Following Along Async Tutoring [Dface]

naet. how’d you go about finding them? i remember when I did this I kinda just kept brute forcing random truth tables not really understanding what i was doing.

1 Like

if they’re right, what i did is work backwards. Like for or(x,y), the outputs of the truthtable are gonna be 1, 1, 1, 0. I used mindnode and it looked like this:

I just kept inserting ands and nots til the tree made sense

you got it

Yeah? That sounds good. Sorry i didnt give a good explanation to @Eternity for how i did it. I was trying to explain how i tried to find it n i thought i could also provide pics for how to do that.

  • or is identity cuz if you put a 1 u get a 1. If u put a 0 you get a zero
  • and is identity cuz if u input 1 u get 1 n if you input a 0 u get a zero
  • xor is zero cuz whichever input you insert (1 or 0), ure gonna get an output of 0
  • implies is one cuz even if you input 1 or 0 you still get a 1 for an output
  • nand: is not. Steps for nand are identity → not. Whatever input u put in, you get the opposite for the output.

  • nor is not. Same with nand. Whatever input you put in you get opposite for the output

1.Xor: or(and(not(x),y),and(x, not(y)))=xor(x,y)

Truth table:

2.nor: took a while cuz I didn’t think first that nor is just not(or(x,y)). I didn’t connect that to the operators i could use(and, or, not). I think I could do better next time.

3.implies:implies(x,y)=and(or(not(0),0), or(not(0), 0))

truth table:

x y and(or(not(x),y), or(not(x), y))
1 1 1
0 1 1
1 0 0
0 0 1

I used a website that makes truth tables and this is what I got:

4.equality is and(or(not(x),y), or(x, not(y)))
I just tried the opposite of the expression I made for xor “or(and(not(x),y),and(x, not(y)))”

I generated the expression and this is what I got:

Idk what universal means but i think i know what a

could be. A set I think could be {and, or}, {or, not}, or even {and}.

I think universal means that the smaller set takes on the job of the bigger set. Since u can make “or” with “not” and “and” then I think a smaller set could be {not, and}. That set can do the same job as {and, or, not}. Theres just gonna be extra operators to work with.

For the easier version: If you use operators from the smaller set to make expressions that work the same as all the operators of the bigger set, then you got a universal set of logic operators. We already did that with xor, nor, implies, n equality.

I’ll come back to this question later

Truth table for: and(x,y) = ?


and(x,y) = nand(nand(x,y),nand(x,y))

Truth table for not(x) = ?


not(x) = nand(x,x)

I think you can make and, or, not with nand. Here are my truth tables:
Truth table for and(x,y) = nand(nand(x,y),nand(x,y)):

Truth table for not(x) = nand(x,x):

Truth table for or(x,y) = nand(nand(x,x), nand(y,y))

nand(nand(x,y),nand(x,y))

I remember before that ET said {and, or, not} are a universal set of logic operators:

If nand can make not, and, or and not, and, or can make all other logic operators, that means nand can also make all other operators. I bet nor can make all other operators too.

To answer the first question I think a small set of universal logic operators is {nand}. Idk if “operators” in the first question means that I have to include two operators.

For the second question, I had to look up what a subset is. I think you can make the universal sets {and, not} or {or, not} from {and, not, or}.

I read ahead and found this question:

nand isn’t missing anything as a universal set cuz it can make nor too.

I read ahead and ET asked @Eternity a question:

@Eternity’s answer:

ET’s response:

Ok cooll you can make a universal set with just nand or just nor

1 Like

yeah you’re getting stuff. nand(x,x) means not x, so this one means: not both not x and not y. hopefully if you think that over you can see how that means or. or means they can’t both be false. trying to understand logical stuff in words or concepts can help too.

I did see that after u said it. Phrasing logic in english looks useful

for “and” all inputs have to be true or else it’s false. There’s one false in the example so answer is false.

I think I did “and” already

or: at least one input has to be true or else the statement is false

xor: only one input can be true or else the statement is false

@Eternity’s response to the second question:

I like how the words “to be true” are used and “otherwise its false”. I used “otherwise” before in a draft but it got deleted.

I actually don’t get “an odd number of inputs are true”.

I found or(x,y,z) = or(or(x,y),or(z,z)). Truth table:

I read ahead found this related to the assignment:

I read ahead on accident and see that maybe or(or(x,y),z) is shorter? Since or(z,z) is identity then why not just use z by itself?

This is what i read accidentally ahead:

ET said it was correct

and(x,y,z) = and(and(x,y),z). The answer is just like for or(x,y,z)
Truth table:

nand: for nand to be true at least one input has to be false, otherwise it’s false

nor: for nor to be true all inputs have to be false, otherwise it’s false.

nand(x,y,z) = nand(and(x,y),z):

nor(x,y,z) = nor(or(x,y),z):

Couldn’t figure out xor(x,y,z) so I read ahead. I didn’t know actually that an odd number of inputs are true. So three true inputs means the output is true for xor.

I read ahead for more clues and saw this question:

yeah with and(x,y)

I read ahead further and found this:

I was thinking phrasing xor(x,y,z) in english: At least one or three inputs are true.

checking if 0 inputs are true: using only two inputs per operator, it’s nor(or(x,y),z). expression returns true if 0 inputs are true.

checking if 3 inputs are true: and(and(x,y),z). Returns true if 3 of the inputs are true.

I see @Eternity got something similar:

I like how nand and or are used to say the same thing. It’s like a way to check the answer twice.

checking if 1 input is true: or(and(x,not(y), not(z)), and(not(x), not(y), z), and(not(x), y, not(z)).
Truth table:

checking if 2 inputs are true: or(and(x, y, not(z), and(not(x), y, z), and(x, not(y, z))
xor(x,y,z)


I think I see what we’re trying to do. If we break down how we find if 1 input is true and 3 inputs are true, then maybe we can find an odd number of inputs being true for xor(x,y,z).

Assignment to explain in english how 1 or 2 inputs are true:

For 1 input: At least x has to be true and y and z are false, or z has to be true and x and y are false, or y has to be true and x and z are false. Otherwise the statement is false

For 2 input: At least x and y are true and z is false, y and z are true and x is false, or x and z are true and y is false.

or(and(x, not(y), not(z)), and(not(x), y, not(z)), and(not(x), not(y), z), and(x,y,z))
Truth table:

I think for this question the answer is or(or(or(or(and(and(x, not(y), not(z))), and(and(not(x), y), not(z))), and(and(not(x), not(y)),z)),and(x,y,z)))

Truth table:


I counted the open and closed parentheses to see if the number matched

1&0:


And of 1 and 0 is 0

or(1, not(0)):

Start with not 0. Thats 1 so “or” of 1 and 1 is 1

(not (and (or 1 0) 0)):


lets start with “or” of 1,0. Thats 1. Then and of 1,0. Thats 0. Then not if that which is 1

Answer is 1

5+3*2:

(add 1 (multiply 8 4)):

7*4-1:

(multiply 6 (minus 5 3)):

Tree of: (x^~y^~z)v(~x^y^~z)v(~x^~y^z) & or(or((and(x,y,~z), and(~x,y,z), and(x,~y,z))), or((and(x,~y,~z), and(~x,y,~z), and (~x,~y,z))):

I’ll do more trees later

Im thinking use english and {and, or, not} to say out loud what a logic operator is doing. You can say it in terms of “and”, “or”, or “not” to make any operator.