You're going to need more tools in your toolkit to answer those questions than shifting.
I think you'll need to start very basic about how numbers are represented in binary. Then you'll want to think about how to set and clear specific bits in that number, or a group of bits at the same time. You'll need to know how to test to see if a certain group of bits is set and about masking. You'll have to be able to do all the above with the bitwise operators and, or, xor, inversion, etc. operators.
Then you'll want to know about shifting -- moving bits left and right by a specific number of spaces. You'll want to know what happens to the bits left "empty". Is it filled with a 1 or a 0? When is it filled with a 1 or 0?
Googling "bitwise operations tutorial" seems to have come up with some promising results to begin with. But here are some basics to test yourself against to make sure you understand
// 1234 in hexadecimal. Do you understand this is not 1234 in decimal? Do you understand
// how specifying in hex makes it easier to think about the binary representation?
unsigned short i = 0x1234;
// Flip all the bits in 0x1234
printf("%04x", ~i);
// Test - Is the most significant bit set?
// mask is a binary number with the most significant bit set. Do
// you understand why this is so?
unsigned short mask = 0x8000;
if ((mask & i) == mask)
{
printf("bit set!");
}
else
{
printf("bit cleared!");
}
// Set the most significant bit
i = i | mask;
printf("Set the MSB of i, check it out: %i\n", i)
// Set the second most significant bit
// Do you see how by shifting mask right one it becomes the next most significant bit?
i = i | (mask >> 1);
Good Luck!