title: Convert bit sequence to uint32_t in c++
body: <p>User specifies register (LFSR) length with integer as a parameter for a function, for example he enters number 5. I need to initialize this 5-bit length LFSR with all 1 bits (for length 5 it will be <code>11111</code>) and get a seed mask in a format <code>uint32_t</code> - for 5-length register it will be <code>0x0001f</code>.</p>
  
  <p>What is the best way to get mask <code>0x0001f</code> for 5 bit length register when a user enters only length of the register as an integer number 5?</p>