Chapter 2: Problem 35
Identify both the mask and the logical operation needed to accomplish each of the following objectives: a. Put \(1 \mathrm{~s}\) in the upper 4 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 \(1 \mathrm{~s}\) in all but the most significant bit of an 8-bit pattern without disturbing the most significant bit. f. Filter out all of the green color component from an RGB bitmap image pixel in which the middle 8 bits of a 24 -bit pattern store the green information. g. Invert all of the bits in a 24-bit RGB bitmap pixel. h. Set all the bits in a 24-bit RGB bitmap pixel to 1 , indicating the color white.
Short Answer
Step by step solution
Key Concepts
These are the key concepts you need to understand to accurately answer the question.