Question 338560: Let:
A = {1,2,3,4,6,7,11)
B = {1,3,5,6,8,11}
C = {1,2,3,4,5,8,9,10}
Find the bitwise:
a. A XOR B
b. B DIFF C
NOTE:
I am familiar with AND, OR, XOR but using bits (o's and 1's) i could carry out the operations but in this case A, B and C are defined as a set I am not sure how to carry on.
a.) Are we simply looking for numbers in A and not in B as well as numbers in B and not in A which will be
ANS: A XOR B will be {2,4,5,7,8}
b.) In this case are we looking for what is in B and not in C?
B DIFF C ANS: {
Thnak you very much for your help
Answer by Edwin McCravy(20055) (Show Source):
You can put this solution on YOUR website!
Let:
A = {1,2,3,4,6,7,11)
B = {1,3,5,6,8,11}
C = {1,2,3,4,5,8,9,10}
Find the bitwise:
a. A XOR B
b. B DIFF C
a.) Are we simply looking for numbers in A and not in B as well as
numbers in B and not in A which will be
ANS: A XOR B will be {2,4,5,7,8}
That's correct. A XOR B will not contain 1,3,6,11, because they are in both
sets. It includes all the other members, regardless of which of the two
sets they are members of.
A XOR B means: (A OR B) AND NOT(A AND B) ("exclusive OR")
b.) In this case are we looking for what is in B and not in C?
B DIFF C ANS:
Yes, we take 1,3,5,8 out of B and that leaves {6,11}. It doesn't
matter that we can't take 2,4,9,10 out of B because they are already
out! :)
Edwin
|
|
|