Suppose that the universal set is U = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}. Express each of these sets with bit strings where the ith bit in the string is 1 if i is in the set and 0 otherwise.
{3, 4, 5}=0011100000
{1, 3, 6, 10} = 1010010001
{2, 3, 4, 7, 8, 9}= ?
Bits 1, 5, 6, 10 are 0.
Bits 2, 3, 4, 7, 8, 9 are 1.
{2,3,4,7,8,9}=0111001110
Comments
Leave a comment