Information Technology Reference
In-Depth Information
Variablesize Storage Approach: Without a constrained format
or size for the numbers that make up its data, the variablestorage
approach must rely on combinations of hardware operations
rather than depending on its hardware circuitry directly.
Although more flexible than fixed storage, this typically makes
processing slow and cumbersome. On the other hand, flexible
storage possibilities may allow computation with numbers of sub
stantially greater size or accuracy. The fixedsize storage ap
proach for floatingpoint numbers, as previously described, has
the advantage of efficiency, because number formats and sizes are
predetermined, and circuitry can be created to perform common
operations. Thus, arithmetic can be quite fast, although some
times accuracy suffers. The variablesize storage approach, on the
other hand, avoids some problems of accuracy by asking the com
puter to allocate space as needed to accommodate numbers. This
is not unlike the familiar approach people follow when writing
numbers on paper. When we write the number 14., we leave room
for only two digits (plus a decimal point). However, we must
leave room for 11 digits (plus a decimal point) when we write the
number 3.1415926535. Numbers with many digits may require
considerable space on a piece of paper, whereas numbers with
few digits can be quite compact. The variablesize storage ap
proach in computers follows a similar method, where numbers
are provided as much space as they require and are stored one
digit at a time or, perhaps, as a sequence of a few digits grouped
together.
Although variablesize storage allows a wide range of numbers
to be stored accurately, this advantage comes at the cost of speed.
Circuitry alone cannot anticipate all combinations of large and
small numbers and plan for them. Instead, processing is done digit
by digit (or a few digits at a time), just as we might perform addi
tion or multiplication. Such work is much slower than the corre
sponding work for fixedsize numbers. For some types of applica
tions, the gain in accuracy may adequately compensate for any
reduction in processing time. However, when variablesize num
bers have many digits, extensive processing may require unaccept
ably long delays to produce results.
In practice, the fixedsize approach is much more common than
the variablesize approach.
Search WWH ::




Custom Search