title: Rotating a bitboard
body: <p>I'm working with 24-bit bitboards in Java representing a game board of the following form:</p>
  
  <pre><code>00 01 02 03 04
  05 06 07 08 09
  10 11 XX 12 13
  14 15 16 17 18
  19 20 21 22 23
  </code></pre>
  
  <p>Note that the board has a hole in the middle indicated by the 'XX'. I've generated a list of legal bitboards, but because the board has the symmetries of a square I can throw away a big amount of bitboards who are already represented by their symmetry cousins in the list.</p>
  
  <p>To check these symmetries I need functions that are able to rotate the board by 90, 180 and 270 degrees and mirror horizontally, vertically and diagonally (over both diagonals). Obviously I would like to make use of bit operations, but this is where I'm stuck. I've found some information on how to do this for chess boards, but I can't wrap my head around the concept - let alone how to apply it to my own board situation.</p>
  
  <p>Can anyone show me, with some explanation, how to efficiently rotate/mirror bitboards?</p>