Obtaining the Most Significant or Least Significant Bits of a Number