3.3. Rapid and Accurate Calculation
The most impressive attribute of modern computers, of course, is their speed; as we have already seen, this is measured in MIPS (millions of instructions per second).
Of course, raw speed is not very valuable if we can't rely on the results we get. ENIAC, one of the first electronic computers, had a failure every few hours, on the average; since the problems it was solving took about that long to run, the likelihood that the results were correct wasn't very high. Particularly critical calculations were often run several times, and if the users got the same answer twice, they figured it was probably correct. By contrast, modern computers are almost incomprehensibly reliable. With almost any other machine, a failure rate of one in every million operations would be considered phenomenally low, but a computer with such a failure rate would make thousands of errors per second.1
The Real Reason for "Computer Problems"
On the other hand, if computers are so reliable, why are they blamed for so much that goes wrong with modern life? Who among us has not been the victim of an erroneous credit report, or a bill sent to the wrong address, or been put on hold for a long time because "the computer is down"? The answer is fairly simple: It's almost certainly not the computer. More precisely, it's very unlikely that the CPU was at fault; it may be the software, other equipment such as telephone lines, tape or disk drives, or any of the myriad "peripheral devices" that the computer uses to store and retrieve information and interact with the outside world. Usually, it's the software; when customer service representatives tell you that they can't do something obviously reasonable, you can count on its being the software. For example, I once belonged to a 401K plan whose administrators provided statements only every three months, about three months after the end of the quarter; in other words, in July I found out how much my account had been worth at the end of March. The only way to estimate how much I had in the meantime was to look up the share values in the newspaper and multiply by the number of shares. Of course, the mutual fund that issued the shares could tell its shareholders their account balances at any time of the day or night; however, the company that administered the 401K plan didn't bother to provide such a service, as it would have required doing some work.2 Needless to say, whenever I hear that "the computer can't do that" as an excuse for such poor service, I reply "Then you need some different programmers."
Nonnumeric Variables
All of this emphasis on computation, however, should not blind us to the fact that computers are not solely arithmetic engines. The most common application for which PCs are used is Web browsing, hardly a hotbed of arithmetical calculation. While we have so far considered only numeric data, this is a good illustration of the fact that computers also deal with another kind of information, which is commonly referred to by the imaginative term nonnumeric variables. Numeric variables are those suited for use in calculations, such as in totalling a set of weights. On the other hand, nonnumeric data are items that are not used in calculations like adding, multiplying, or subtracting: Examples are names, addresses, telephone numbers, Social Security numbers, bank account numbers, or driver's license numbers. Note that just because something is called a number, or even is composed entirely of the digits 0-9, does not make it numeric data by our standards; the question is how the item is used. No one adds, multiplies, or subtracts driver's license numbers, for example; they serve solely as identifiers and could just as easily have letters in them, as indeed some do.
For the present, though, let's stick with numeric variables. Now that we have defined a couple of types of these variables, short and unsigned short, what can we do with them? To do anything with them, we have to write a C++ program, which consists primarily of a list of operations to be performed by the computer, along with directions that influence how these operations are to be translated into machine instructions.
This raises an interesting point: Why does our C++ program have to be translated into machine instructions? Isn't it the computer's job to execute (or run) our program?
1However, we haven't yet completely eliminated the possibility of hardware errors, as the floating-point flaw in early versions of the Pentium processor illustrates. In rare cases, the result of the divide instruction in those processors was accurate to only about 5 decimal places rather than the normal 16 to 17 decimal places.
|
www.steveheller.com steve@steveheller.com |