12.5 Microsoft C Byte Ordering

Tables 12.4 and 12.5 summarize Microsoft C byte ordering for short and long types, respectively. In these tables, the least-significant byte of the data item is b0; the next byte is denoted by b1, and so on.

Since byte ordering is machine specific, any program that uses this byte ordering will not be portable.

Table 12.4 Byte Ordering for Short Types

CPU Byte Order

8086 b0 b1
80286 b0 b1
80386 b0 b1
PDP-11 b0 b1
VAX-11 b0 b1
M68000 b1 b0
Z8000 b1 b0

Table 12.5 Byte Ordering for Long Types

CPU Byte Order

8086 b0 b1 b2 b3
80286 b0 b1 b2 b3
80386 b0 b1 b2 b3
PDP-11 b2 b3 b0 b1
VAX-11 b0 b1 b2 b3
M68000 b3 b2 b1 b0
Z8000 b3 b2 b1 b0