Articles about bitwise operators | UserComp.com

Difference between (b<<2) >>2 and b & 0x3F in C

Clarifies why (b<<2)>>2 preserves an unsigned char value while b & 0x3F masks the lower six bits due to integer promotion rules.

Read More