title: Working with binary in Python, Splitting numbers
body: <p>I have a module that takes 2 X 8bit numbers in Decimal format, with a specific structure </p>
  
  <p>each number must start with the same 4 bits  = 0011
  followed be a varible 8 bits
  followed by 4 bits that are ignored so set to 0000</p>
  
  <p>So to caculate the 16bit number is simple enough </p>
  
  <p>the varible number * 16 will shift it the 4 bits to the left, and adding 12288 = 0011|000000000000 will give me the desired result.</p>
  
  <p>so if my input number is 19 for example </p>
  
  <p>19 X 16 + 12288 = 12592 = 0011000100110000</p>
  
  <p>the next step is to split it in to two X 8 bit numbers </p>
  
  <p>00110001 | 00110000 = 49, 48</p>
  
  <p>how in python can i go from 12592 to 49,48 efficiently. </p>
  
  <p>Never worked in binary in a script so all a bit new. </p>
  
  <p>Cheers</p>