I have this example:
If we take the binary representation of the decimal value 220 (1101 1100
) and we wanted to extract the higher 4 bits, we could use a bitmask with the boolean AND operation:
1101 1100 (220)
AND 1111 0000 (240)
_________
1101 0000 (208)
I need to know how to get 240.
Where ** is exponentiation.