Hardware Reference
In-Depth Information
and the operation is chosen accordingly. Computers with tagged data, however, can only be
found in computer museums.
Let's start with desktop and server architectures. Usually the type of an operand—integer,
single-precision floating point, character, and so on—effectively gives its size. Common oper-
and types include character (8 bits), half word (16 bits), word (32 bits), single-precision floating
point (also 1 word), and double-precision floating point (2 words). Integers are almost univer-
sally represented as two's complement binary numbers. Characters are usually in ASCII, but
the 16-bit Unicode (used in Java) is gaining popularity with the internationalization of com-
puters. Until the early 1980s, most computer manufacturers chose their own floating-point
representation. Almost all computers since that time follow the same standard for floating
point, the IEEE standard 754. The IEEE floating-point standard is discussed in detail in Ap-
pendix J.
Some architectures provide operations on character strings, although such operations are
usually quite limited and treat each byte in the string as a single character. Typical operations
supported on character strings are comparisons and moves.
For business applications, some architectures support a decimal format, usually called
packed decimal or binary-coded decimal —4 bits are used to encode the values 0 to 9, and 2 decimal
digits are packed into each byte. Numeric character strings are sometimes called unpacked
decimal , and operations—called packing and unpacking —are usually provided for converting
back and forth between them.
One reason to use decimal operands is to get results that exactly match decimal numbers,
as some decimal fractions do not have an exact representation in binary. For example, 0.10 10
is a simple fraction in decimal, but in binary it requires an infinite set of repeating digits:
. Thus, calculations that are exact in decimal can be close but in-
exact in binary, which can be a problem for financial transactions. (See Appendix J to learn
more about precise arithmetic.)
Our SPEC benchmarks use byte or character, half-word (short integer), word (integer),
double-word (long integer), and floating-point data types. Figure A.11 shows the dynamic dis-
tribution of the sizes of objects referenced from memory for these programs. The frequency of
access to different data types helps in deciding what types are most important to support ei-
ciently. Should the computer have a 64-bit access path, or would taking two cycles to access a
double word be satisfactory? As we saw earlier, byte accesses require an alignment network:
How important is it to support bytes as primitives? Figure A.11 uses memory references to ex-
amine the types of data being accessed.
Search WWH ::




Custom Search