title: How to concatenate bits in Python
body: <p>I have two bytes, e.g. 01010101 and 11110000. I need to concatenate the four most significant bit of the second byte "1111" and the first whole byte, resulting something like 0000010101011111, namely, padding four zeros, the first whole byte and finally the four most significant bit of the second byte.</p>
  
  <p>Any idea?</p>