FORTRAN 77 Language Reference

Bits and Bytes by Architecture

The order in which the data--the bits and bytes--are arranged differs between VAX computers on the one hand, and SPARC computers on the other.

The bytes in a 32-bit integer, when read from address n, end up in the register as shown in the following tables.

Table C-8 Bits and Bytes for Intel and VAX Computers

Byte n+3

Byte n+2

Byte n+1

Byte n

 31 30 29 28 27 26 25 24   23 22 21 20 19 18 17 16   15 14 13 12 11 10 09 08   07 06 05 04 03 02 01 00
 Most Significant     Least significant

Table C-9 Bits and Bytes for 680x0 and SPARC Computers

Byte n

Byte n+1

Byte n+2

Byte n+3

 31 30 29 28 27 26 25 24  23 22 21 20 19 18 17 16  15 14 13 12 11 10 09 08  07 06 05 04 03 02 01 00
 Most Significant     Least significant

The bits are numbered the same on these systems, even though the bytes are numbered differently.

Following are some possible problem areas:

See also the man page, xdr(3N).