This preview shows page 1. Sign up to view the full content.
Unformatted text preview: 40 46 e4 00 40 46 ff bf 44 02 fc e4 ff 1f 01 00 00 00 Figure 2.5: Byte Representations of Different Data Values. Results for int and float are identical, except for byte ordering. Pointer values are machine-dependent. 32 CHAPTER 2. REPRESENTING AND MANIPULATING INFORMATION Our sample integer argument 12,345 has hexadecimal representation 0x00003039. For the int data, we get identical results for all machines, except for the byte ordering. In particular, we can see that the least signiﬁcant byte value of 0x39 is printed ﬁrst for Linux, NT, and Alpha, indicating little-endian machines, and last for Sun, indicating a big-endian machine. Similarly, the bytes of the float data are identical, except for the byte ordering. On the other hand, the pointer values are completely different. The different machine/operating system conﬁgurations use different conventions for storage allocation. One feature to note is that the Linux and Sun machines use four-byte addresses, while the Alpha uses eight-byte addresses. Observe that although the ﬂoating point and the integer data b...
View Full Document
- Spring '10
- The American