thanks you for the answer, and although the bits operation stuff is a bit vague to me right now, i am trying to unserstand the first part of your solution.
So basically i need to do two bytes arrays (or one two dimentional) in length of 42 (for all the board squares) and each one of them will represent the pieces of one of the two players.(0 for no piece and 1 for a piece)
so for example, the byte array for the first player can look like this? 000000000000000000000000000000000000001000 here the first player just played his first move in the middle square at the buttom of the board. so now every board representation ,instead of one array of 42 int's (0,1 or 2) will be those two Bytes arrays?
and sorry for my ignorance, but even if i have those two bytes array for the players' pieces, how can i transpose each one of them to a Long type number?
and after i do that, how should i hash those two long numbers into one hash initeger so i can store in my TT? by the way,thanks for the java's Bitset tip, i think i will be using that