< previous page page_18 next page >

Page 18
d87111c01013bcda00bb8640fdff6754.gif
together with special characters. The character string may be used to represent decimal or text information.
d87111c01013bcda00bb8640fdff6754.gif
Numeric representation, especially as a standard (transportable) representation, involves many potentially damaging complications. For the most part, there is only minimal interest in being able to transfer binary data images between different machines, mostly due to the significant differences that are clearly present between implementations. Therefore, despite the increase in data space requirements, the majority of numerical data is represented in text form (using characters), which is easy6 to convert. This is obviously true, as there are only two major conventions to be concerned withIBM's EBCDIC (Extended Binary Coded Decimal Interchange Code) and the subsequently developed ASCII (American Standards Code for Information Interchange).
d87111c01013bcda00bb8640fdff6754.gif
However, as one might expect, compatibility is not any more achievable for characters than it is in other areas. The incompatibility is due to a number of very subtle differences. Some machines use one end-of-line character, some use another, some use both (of course, in one order or the otherand it does matter!). Additionally, some use 6-bit ASCII (no lower case), others use 7-bit ASCII, and others use 8-bit ASCII (sometimes for parity, other times for additional information). Another incompatibility results from the problem of byte ordering (the Big-endian vs. Little-endian debate). Byte ordering is determined by whether the high (most significant) byte or the low byte is stored first (at the lowest address in memory)for example, SUN SPARC and Motorola 680x0 use high-byte ordering ("Big-endian"), while DEC and Intel use low-byte ordering ("Little-endian"). Some machines, such as the MIPS processors, have user-selectable byte ordering, and many machines provide conversion instructions to aid the transfer of data.
5. Bits.
d87111c01013bcda00bb8640fdff6754.gif
Binary bits are easy: no one really expects the interpretation of strings of bits to be consistent across machines and so no one really tries. These values are arbitrarily sized (although most machines limit them to the word size for the machine). They are also used to represent vectors of single-bit elements, which may be tested and changed (sometimes using dedicated instructions, often using only logical operations such as AND, OR, and NOT). There are two main applications for bit strings, of which only the firstcommunication with and control of input/output devicesis common. This application is a very low level communications process and is rarely of any interest for communicating between different machines. (Often even different hardware implementations of the same basic machine architecture use different input/output specifications.) The second application is in packing data to make the most efficient use of space. This is of concern in a few specific applications (such as a packed record in Pascal).
The preceding classes are not wholly disjoint, as character strings may represent decimal numbers, and reals may be manipulated as bit vectors (and integers) for format conversion. In many implementations, the integer and
d87111c01013bcda00bb8640fdff6754.gif d87111c01013bcda00bb8640fdff6754.gif
6The alert reader will sense a calamity in the making for those foolish individuals who actually believe that anything in compatibility is easy.

 
< previous page page_18 next page >