The representation of the integer isn't specified in the standard.
However, the behavior of >>
and <<
is defined according to the meaning of bits, not their position.
So >> 1
moves the bit representing 4 to the bit representing 2, regardless of where these bits actually are.
Quoting the C99 standard section 6.5.7:
The result of E1 >> E2 is E1 right-shifted E2 bit positions. If E1 has an unsigned type or if E1 has a signed type and a nonnegative value, the value of the result is the integral part of the quotient of E1 / 2E2. If E1 has a signed type and a negative value, the resulting value is implementation-defined.