6. AND, OR, NOT, and XOR are four logical operations that can be used to modify a bit pattern.
Let X be a byte. (a) Show how to set (force to 1) the four rightmost bits of X by performing one
of these operations on X and a specific bit pattern. (10%) (b) Show how to flip the three
rightmost and the two leftmost bits of X by performing one of these operations on X and a
specific bit pattern. (10%)