title: How to reverse a section of bit digits in C?
body: <p>In short, if I'm dealing with a number in binary, like <code>0000 0110</code>, and suppose I want only the last 3 bits to be reversed, are there any methods that translate this into <code>0000 0011</code>? </p>
  
  <p>I have seen other questions and resources where the <code>reverse bits method</code> is implemented but returns the whole number reversed (i.e. <code>0110 0000</code>, not <code>0000 0011</code>).</p>
  
  <p>Would it be enough to just reverse it, as done in the standard methods, and then shift it as much as is necessary? Or is there a more direct way to achieve this?</p>
  
  <p>Format: <code>unsigned int reverse_select_bits(int number, int num_bits) { ... }</code></p>