or think about it for a bit ;)
you want to grab every other bit into an int.
going backwards seems reasonable...
set your target value to zero.
peel off the last bit in the number (its 0) and add times 2 to the power of your loop increment (starting at zero). 2 to the zero is 1, 0 * 1 is zero, add zero.
shift the input twice to the right.
repeat, … peel off the 1, multiply by 2 to the 1 (2) and add (2) .. current value in binary is 2 = 00000000000010
and keep looping for all the bits in a uint16_t.
which is probably what was shown in code, broken down in to your precoding 'how would I do that' steps.
the powers of 2 are just int p2 = 1; and every loop do p2*=2. Or shift it once, if you are feeling the bit operations.