Hardware Reference
In-Depth Information
A
BINARY NUMBERS
The arithmetic used by computers differs in some ways from the arithmetic
used by people. The most important difference is that computers perform opera-
tions on numbers whose precision is finite and fixed. Another difference is that
most computers use the binary rather than the decimal system for representing
numbers. These topics are the subject of this appendix.
A.1 FINITE-PRECISION NUMBERS
While doing arithmetic, one usually gives little thought to the question of how
many decimal digits it takes to represent a number. Physicists can calculate that
there are 10 78 electrons in the universe without being bothered by the fact that it re-
quires 79 decimal digits to write that number out in full. Someone calculating the
value of a function with pencil and paper who needs the answer to six significant
digits simply keeps intermediate results to seven, or eight, or however many are
needed. The problem of the paper not being wide enough for seven-digit numbers
never arises.
With computers, matters are quite different. On most computers, the amount
of memory available for storing a number is fixed at the time that the computer is
designed. With a certain amount of effort, the programmer can represent numbers
two, or three, or even many times larger than this fixed amount, but doing so does
not change the nature of this difficulty. The finite nature of the computer forces us
669
 
 
 
Search WWH ::




Custom Search