title: Extract bits in C
body: <p>I am a bit new to C-programming and I am a bit stuck with this question: </p>
  
  <p>Assume that you have a C program with signed integer (int) variables x, y, and z. All
  variables contain some arbitrary values. Write a C-statement that extracts the bits with
  index 17 to 13 from x and places them as the least significant bits in z, and extracts the
  least 3 significant bits of y and places them in the bits with index 7 to 5 in z. No other
  bits of z should be changed, besides the 8 bits that were extracted from x and y. Note
  that the bit index 0 is the least significant bit. Your answer should contain one single C
  statement together with short notes of what the different parts of the statement do.</p>
  
  <p>I understand that extracting is the same thing as shifting if I am not wrong.</p>
  
  <p>But could someone please give me some hints on how to tackle this question?</p>
  
  <p>Thanks, all help will be appriciated!</p>