   Basic bitboard representation in C (shifting)
  Hello allI have read a lot about the idea of bitboards and its use in chess programming,I fail, however, to get the idea of how to implement it in C.I have got something like this:  unsigned long long int bb_WhitePawnsNow let's say there is one single Pawn on A1. If I simply do  bb_WhitePawns = 1000..0 (63 0)Then  printf(" %i", bb_WhitePawns >> 1);would not return '0100..00' but some nonsense integer value.It seems to me that the compiler does not interprete the value as a 64-bit-word.What am I doing wrong?   
  Since you are printing an unsigned long long, you need to tell printf it's an unsigned long long. Use "%I64u" instead of "%i".   ;  Thanks, but this unfortunately doesn't solve the problem.   ;  Well, you gave it a nonsense integer value. 1000yada0 is a decimal value, not a binary value. So you aren't setting the 63rd bit of bb_WhitePawns to 1, you are setting bb_WhitePawns to some ungodly huge decimal value.To set bb_WhitePawns to binary 1000yada0, you would need to do something like:bb_WhitePawns = 1 << 63;When you print using printf(...,bb_WhitePawns >> 1), you are going to get a decimal value, so you aren't going to see "01000yada0" when you output it. You will see 4611686018427387904, which is the decimal equivalent. To make it easier, you could use "%I64X" as your format to get hex output, which would give you 4000000000000000 in this case.