title: Bitwise operation bit check
body: <p>Is this correct way to check if bits are set in some variable and store them in another variable? Just ignore variable names, image[] and mask variables are 1 byte and first_hline_first_row and second_hline_first_row are 2 byte.</p>
  
  <pre><code> for(i=0; i&lt;16; i++){
  
      if(image[i] &amp; mask1)         first_hline_first_row    |=   (1&lt;&lt;i);
      else                         first_hline_first_row    &amp;=~  (0&lt;&lt;i);
  
      if(image[i] &amp; mask2)         second_hline_first_row   |=   (1&lt;&lt;i);
      else                         second_hline_first_row   &amp;=~  (0&lt;&lt;i);
      }   
  </code></pre>