Hi I’m new to dealing with bytes and low level programming. Currently, I have an int (32 bits)….so it looks something like this:
0000000 10011011 00000000 00000000
I’m trying to output ONLY the 3rd set of 0’s with the 1’s (counting from the right). So I’d be outputting a char value (?) How can I do that?
Thanks!
You can shift the bits right by 16 and then & it with 0x000000FF to clear all of the bits except the desired ones.