> First of all, we have got the following warning on 64-bits model First of all: uname -a Then, which compiler are you using, and with which options? As usual, showing actual commands with their actual output can be more helpful than vague descriptions or interpretations. > warning: shift count is too large Knowing nothing about your environment, I'd guess that your (unspecified) compiler on your (unspecified) system thinks that "0x1FF" is a 32-bit integer, while "mask" is a larger (perhaps 64-bit) unsigned integer, so it thinks that "0x1FF << 55" would shift all the bits off the end of the 32-bit "0x1FF" value. deb64# cat shift.c #include int main( int argc, char **argv) { unsigned long mask; #ifdef GOOD mask = 0x1FFUL << ((8 * (sizeof(long) - 1)) - 1); #else mask = 0x1FF << ((8 * (sizeof(long) - 1)) - 1); #endif printf( " sizeof long = %lu, mask = %016lx .\n", sizeof(long), mask); return 0; } deb64# cc -o shift_gcc shift.c shift.c: In function 'main': shift.c:10: warning: left shift count >= width of type deb64# ./shift_gcc sizeof long = 8, mask = 0000000000000000 . deb64# cc -o shift_gcc_G -DGOOD shift.c deb64# ./shift_gcc_G sizeof long = 8, mask = ff80000000000000 . > Second. What about little-endian machine? > Should mask be equal 0xFF800000? > Should mask be equal 0? What would _zero_ do in an experssion like "integer & mask"? > [...] the most significant end [...] > /* mask is 0xFF800000 on a big-endian machine */ > /* mask is 0xFF000000 on a big-endian machine */ These comments make no sense to me, because the "most significant end" of a number is the most significant end, regardless of the endianity of the system. > Copyright (c) 1999 Find newer code to steal?