Identify both the mask and the logical operation needed to accomplish each of th
ID: 3650400 • Letter: I
Question
Identify both the mask and the logical operationneeded to accomplish each of the following
objectives:
a. Put 1s in the upper4 bits of an 8-bit pattern
without disturbing the other bits.
b. Complement the most significant bit of an
8-bit pattern without changing the other bits.
c. Complement a pattern of 8 bits.
d. Put a 0 in the least significant bit of an 8-bit
pattern without disturbing the other bits.
e. Put 1s in all but the most significant bit of
an 8-bit pattern without disturbing the
most significant bit.
Explanation / Answer
b. Complement the most significant bit of an 8-bit pattern without changing the other bits