Show how bitwise operations on bit strings can be used to find these combinations of:
A = {a,b,c,d,e}
All you have to do is express the sets as a bit string which represents the alphabet with 1 being the letters of the set.
Unions can be expressed with the OR bitwise operator
Intersection can be expressed with the AND operator
a) A &cup B
----abcdefghijklmnopqrstuvwxyz
A = 11111000000000000000000000
B = 01110010000000010001010000
OR----------------------------
----11111010000000010001010000
Thus the result is the set {a,b,c,d,e,g,p,t,v}
b) A &cap B
----abcdefghijklmnopqrstuvwxyz
A = 11111000000000000000000000
B = 01110010000000010001010000
AND---------------------------
----01110000000000000000000000
Thus the result is the set {b,c,d}
c) (A &cup D) &cap (B &cup C)
----abcdefghijklmnopqrstuvwxyz
A = 11111000000000000000000000
D = 00011001100001100001100110
OR----------------------------
1 = 11111001100001100001100110
----abcdefghijklmnopqrstuvwxyz
B = 01110010000000010001010000
C = 00101000100000100000100111
OR----------------------------
2 = 01111010100000110001110111
----abcdefghijklmnopqrstuvwxyz
1 = 11111001100001100001100110
2 = 01111010100000110001110111
AND---------------------------
----01111000100000100001100110
Thus the result is the set {b,c,d,e,i,o,t,u,x,y}
d) A &cup B &cup C &cup D
----abcdefghijklmnopqrstuvwxyz
A = 11111000000000000000000000
B = 01110010000000010001010000
OR----------------------------
1 = 11111010000000010001010000
----abcdefghijklmnopqrstuvwxyz
C = 00101000100000100000100111
D = 00011001100001100001100110
OR----------------------------
2 = 00111001100001100001100111
----abcdefghijklmnopqrstuvwxyz
1 = 11111010000000010001010000
2 = 00111001100001100001100111
OR----------------------------
----11111011100001110001110111
Thus the result is the set {a,b,c,d,e,g,h,i,n,o,p,t,u,v,x,y,z}