C++: Bitwise AND
问题 I am trying to understand how to use Bitwise AND to extract the values of individual bytes. What I have is a 4-byte array and am casting the last 2 bytes into a single 2 byte value. Then I am trying to extract the original single byte values from that 2 byte value. See the attachment for a screen shot of my code and values. The problem I am having is I am not able to get the value of the last byte in the 2 byte value. How would I go about doing this with Bitwise AND? Thanks for your help,