You can get larger range in C++ by using 64 bits. But how are you determining this precison? I wouldn't trust the Fortran write routines. You should also look at an assembly listing or manual to find the exact shifting and types the Fortran compiler is using.
Hmm, well I think I found the problem, but I don't know if it is solvable. I realized that the integers in the Fortran code are not actually 4 bytes long (as was initially told) but actually just have a precision to 9 decimal digits (-999999999 to 999999999). This would mean that any bit shift using normally declared variables in C are going to be different because of the precision. Anyt thoughts on how to get around this would be apreciated, also please note that the Fortran code cannot change.