Board Representation
This section talks about how the chessboard is represented in computer memory. The importance of board representation should be immediately obvious. How you choose to represent the chess board in your program will have a tremendous impact on the structure, style and speed of your code.
Array of Bytes
The most obvious representation is, of course, an 8x8 array of bytes. Different values can be used to represent White and Black pawns, knights, bishops, queens and kings. It is, however, common to have extra rows and columns in the array, containing values denoting the edge of the board. This can speed up move generation considerably. In addition, your position representation needs to take account of castling permissions and en passant captures.
Bitboards
The notion of bitboards was introduced by Robert Hyatt in Cray Blitz. A bitboard is essentially a large number, of which each bit represents a square on the board. In chess, 64-bit bitboards are used to represent the locations of white pawns, black pawns, white knights etc. Although bitboards create complexity in debugging and understanding code, they have become quite common in modern programs because of the raw speed they offer in move generation and static evaluation. An additional possibility is offered by rotated bitboards, in which the bitboard is rotated at different angles to provide fast move generation for bishops, rooks and queens.