Multiply by 2 = shift left by 1 (append a 0). Example: 5 (101) shifted left = 10 (1010)
Divide by 2 = shift right by 1 (remove last bit). Example: 10 (1010) shifted right = 5 (101)
Check if even/odd: look at the last bit. If it's 0 the number is even, if 1 it's odd.
Multiply by 2^n = shift left by n. Example: 3 << 4 = 48 (3 x 16)
One hex digit = 4 binary digits (a nibble). Two hex digits = 1 byte.
To negate in two's complement: invert all bits then add 1.
A power of 2 has exactly one bit set. Test: n & (n-1) == 0.
XOR with itself = 0. XOR with all 1s = bitwise NOT.