title: Rotating points in a binary grid
body: <p>Im making a binary tetris program in C based off of <a href="https://gist.github.com/aemkei/1672254" rel="nofollow noreferrer">this project</a>. The 8 x 8 grid is represented by an <code>unsigned long</code>, where 0's indicate empty spaces and 1's filled spaces. Another <code>unsigned long</code> is used to represent a peice. The github page described the basic concept like this:</p>
  <blockquote>
  <p>The Board:</p>
  <pre><code>                  00000         .....
  798               11000   =&gt;    ##... 
                    11110         ####.
  </code></pre>
  <p>The Block</p>
  <pre><code>3                 00011  =&gt;     ...##
  </code></pre>
  <p>Checking for Collision</p>
  <pre><code>                  00000         .....
  798&amp;3 = 2         00000  =&gt;     .....
                    00010         ...X.
  </code></pre>
  <p>...</p>
  </blockquote>
  <p>How could I extend these concepts to also apply to rotating a block <em>without</em> resorting to arithmatical operators?</p>