title: advanced bit manipulation - multiplexing bit in bit stream
body: <p>i'm trying to perform some advanced bit manipulation. let's say i have bit stream of data, and i want to insert other bits every X bits. </p>
  
  <p>for example, for bit stream of : 111111111 and bits: 00000<br>
   with X=3, i'll get : 110110110110 </p>
  
  <p>using masks (in the example above- mask of 110000) and shifts will probably work, but also will be a nightmare. </p>
  
  <p>thanks 
  Itay</p>