Get 2 Least Significant Bits from an uint16_t in C : I want to get the 2 least significant bits of an uint16_t(X) in C. 

Example:
20544 = 0x5040
0x40 = 64

I tried, (X & ((1<<2) - 1)). This doesn't work for me. 