WHEN THE NEW electronic marvel first appeared, it was declared a threat to civilization. Any one in the same room with it would be rendered infertile. Established social customs would be shattered. The power distribution system would lead to conflagrations and electrocutions.

The year was 1879 and the marvelous devise was the light bulb.

Now, another electronic marvel is raising apprehension in America. For many of the same reasons that the light bulb was feared 100 years ago, many people have decided that the computer is an object to be loathed.

If you can believe the most alarming of the technological and sociological predictions, a coming generation of "electronic brains" -- invariably described, feverishly, as "super," -- will leave its feeble creators far behind, reducing mankind to pitiable robots scurrying at the beck of mechanical masters and digital demons.

Fear not, gentle humans. At some remote time, the computer may evolve to the point of being some kind of threat. For the moment, though, and for the foreseeable future, poor bungling man has little to worry about from the computer sector. Compared to the sublimely powerful and intricate computer that's standard equipment inside every human skull, the electronic gadgets developed so far can only be described as hopelessly, absurdly stupid. As the handbook of one popular personal computer states: "Your parakeet is smarter than this machine."

The calculator's "magic" really involves a series of straightforward mathematical and logical techniques which are implemented by simple electronic switches. These basic principles apply to all digital devices, from a $15 pocket calculator to the $150 logic board that controls a Pac-Man game to the $150 million bank of computers that steers NASA's space probes through the solar system. All these devices use the same basic parts to perform the same basic operations over and over again.

For all the mystique surrounding computers, the techniques of digital problem-solving involve simple math -- considerably simpler than the stuff children learn in second grade. Computers approach every problem like a child counting on his fingers, except the computer counts as if it only had one finger.

That's why the machines are called "digital" -- the Latin noun digitus means "a finger." The computer, in short, is a mindless simpleton -- a very fast mindless simpleton. Digital devices can do nothing but addition problems, and they can only add two numbers, 0 and 1. But they can do that thousands, even millions of times every second. Taking advantage of that ability, some very smart humans have taught these very dumb machines a special kind of math and a special kind of logic that permits a computer's speed to make up for its simplicity.

Digital clocks, calculators, computers and all other digital devices are made of long chains of electronic switches that work like the light switch on your wall. The switches can be either on or off; there's nothing in between.

Since there are only two possible combinations, a computer has to turn every job, every decision, every computation into the simplest possible terms -- on or off, stop or go, yes or no, one or zero. Humans can do the same thing, of course; they do it on Easter morning when the kids look for hidden eggs and their parents provide only two possible clues: "You're hot" or "You're cold." Eventually the eggs are found, but the process is so tedious that even the kids get tired of it pretty quickly. Computers, in contrast, use this tedious system all day, every day -- because they can't handle anything else.

Although digital devices can recognize only two numbers -- one and zero -- they can arrange those two to represent any number in the universe. To understand how that's done, we'll leave numbers for a moment and talk about words. Specifically, let's consider the word "cat."

You can spell the thing gato or chatte and it is still the same animal. You can give it a name in Japanese kana or Chinese characters and it is still the same. The word "cat" is just a convenient symbol that English speakers have settled on for representing this object.

The same principle applies to numbers. There's nothing inherent in the number 125, for example, that requires it to be represented by the symbols 1, 2 and 5. We just happen to use that representation because of the way our number system works. Our system uses 10 different symbols, or digits, for numbers: 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9.

To represent numbers larger than nine, we could invent more symbols. But we don't; we rely instead on positional notation, in which each digit has a particular value based on its position. In the number 125, for example, the first (farthest right) digit represents ones, the middle digit tens, and the left-hand column hundreds. If you add up 5 ones, 2 tens, and 1 hundred you get 125. We could, of course, devise a numerical alphabet with 26 different symbols, or 125 different symbols, or 5,000 different symbols. The base-10, or decimal, system we use is just a convenient method that people have settled on for representing all numbers.

If you want to know why the human race settled on a base-10 number system, just spread out your hands and count the digits. All creatures develop a number system based on their basic counting equipment; for humans, that means our 10 fingers. (The ancient Babylonians, who counted on their two arms as well as their 10 fingers, devised a base-12, or duodecimal, number system that still lives today in the methods we use to tell time and buy eggs.)

A computer's basic counting equipment is simpler: it is an electronic switch that can be either on or off. If you let each of these two conditions represent one digit -- if on represents one and off represents zero -- you have a base-two, or binary, number system.

Like people, computers use positional notation. In a binary number, the first (far right) column represents one, the second twos, the third fours, the fourth eights, the fifth sixteens and so on. Thus the binary number 1111101 represents, from the right, one 1, no 2s, one 4, one 8, one 16, one 32, and one 64. If you add it up you'll find that "1111101'" is precisely the same number represented by "125" in the decimal system.

If you want to represent 125 in the circuitry of a computer, you line up seven switches this way.

Similarly, if you take 26 different off-and- on combinations and make each one a code for a letter of the alphabet, digital devices can be used to process words as well as numbers.

The inventive computer pioneers who worked out these basic arrangements didn't stop with mathematics. They also designed a complete system of binary, or digital, logic that permits machines to make decisions and thus work through complex patterns, or "programs," of number and word processing without the need for human guidance.

The binary logic that all digital devices employ today was worked out about 100 years b.c. (before computers) by a British mathematician named George Boole. Boole's central thesis was that all human reasoning could be reduced to a series of yes-or-no decisions. Each of the basic patterns of decision-making could then be represented in algebraic terms.

Like many visionaries, Boole was generally ignored in his own day. (One of the few contemporaries to pay attention was another logician, Lewis Carroll, who sprinkled his books such as "Alice in Wonderland" with allusions to Boole's ideas.) Boole died in 1864, still trying to persuade a skeptical world that his "Boolean algebra" had value.

The narrative now leaps ahead to the 1930s, to the Massachusetts Institute of Technology, where engineers were struggling to design the first primitive versions of a digital computer. It was clear that the machine could handle information in only two states -- off or on, yes llor no, one or zero. How could complex calculations be reduced to such simplistic patterns?

An MIT graduate student named Claude Shannon, who was working on the fringes of the computer project, happened upon a copy of Boole's book and something clicked. In a master's thesis published in 1938, Shannon demonstrated that the yes-or-no patterns so laboriously developed by George Boole could be replicated with chains of on-or-off switches.

Shannon's proposal was quickly adopted, and Boolean algebra has been the key to digital machines ever since. Once Boole's ideas became important, naturally, academicians draped them in all sorts of complicated language, symbols and formulas. At the core, though, Boolean logic is the stuff of everyday life.

You wake up from a sound sleep. If your clock says yes, it's after 8, and your calendar says yes, it's a weekday, then yes, you have to get up and go to work. If either of these conditions is a no, however, you can stay in bed. This decision is what Boole called an "and" operation. The result is yes only if condition one and condition two are both yes.

The kitchen sink represents another basic Boolean pattern. If no faucet is on, no water comes out of the spigot. But if either the hot faucet or the cold or both is on, then, yes, water will flow. This decision -- the result is yes if condition one or condition two or both are yes -- is what George Boole called an "or" operation. Digital logic reduces all decision-making to a half-dozen basic operations like these.

Claude Shannon's master's thesis, which gave birth to a new discipline called "switching theory," showed how electrical switches -- with off representing no and on meaning yes -- could be wired together in patterns that duplicated each of the Boolean operations.

The simplest "and" pattern, for example, could be constructed from three switches. If current flowed into both of the two input switches -- so that both switch one and switch two were on -- then switch three would turn on and current would flow out of it. That is, current would flow out of the three-switch combination only if the "and" operation resulted in a decision of yes.

Since these switch arrangements serve to stop or pass an electric current, they are called "gates." Every modern computer is an amalgam of "and" gates, "or" gates and gates that perform each of the other digital logic operations.

The real miracle of computers, then, is that the people who design the machines have discovered how to carry out extremely complex tasks and extremely difficult computations on a device that recognizes only two numbers (one and zero) and two logical states (yes and no). To do so, computer engineers rely on one basic design principle: simplicity. All computer operations have to be reduced to the simplest level -- so simple as to seem absurd to anyone who is accustomed to human reasoning.

The computer's extremely limited talents require great feats of virtuosity from human designers to make the machine perform mathematical computations. It is possible to design electronic logic gates that will carry out each of the four basic mathematical functions. But those gates become so huge and complicated that most of the world's computers reduce every computation to a single function: addition.

Using a mathematical trick called "ones- complement subtraction" (a trick that's only possible with binary numbers), the computer can solve subtraction problems by adding. Multiplication is performed the way humans did it before they developed the multiplication table -- by repeated addition. If you ask your computer to multiply 4 times 1,000 -- a problem second-graders can solve in a single mental step -- the switchboard will put a binary 4 into the adding unit and then proceed to add 999 more 4s, one at a time, to get the answer. Division, similarly, becomes a series of repetitive ones-complement subtractions.

The computer user, of course, never sees any of this Byzantine complexity. If you ask your machine yes ll to compute 4 times 1,000, the answer comes up instantaneously. At least, it seems instantaneous -- but that's an illusion. The computer is quicker than the eye.

Electronic impulses move about the circuitry of a computer, turning switches on and off in series as the logic patterns demand. These electronic signals move at the fastest velocity that is possible in our universe: the speed of light.

Electromagnetic radiations, including light and electronic signals, travel about 186,000 miles a second. This is quite fast, of course, but it is not the same thing as instantaneous movement.

Let's say a New York Mets fan turns on his TV in Manhattan to watch the big game against the Dodgers in Los Angeles. The electronic signals carrying sound and picture to his TV take about .016 seconds to travel the 3,000 miles from Los Angeles to New York. Because of the signal's transit time, the viewer sees everything about 1/62 of a second after if actually happened.

If the various parts of a computer were 3,000 miles apart, then, it would take a full second to complete 62 steps, or instruction cycles. A simple arithmetic calculation that requires 6,200 individual steps in the computer would take 100 seconds to complete. At that rate, the machines wouldn't win any math races. But in fact the parts of a computer are not miles, or feet, or even inches apart.

A quarter-century ago, when computer circuits were built with thousands of switches individually wired together, the transit time for signals moving through all that wire -- miles of it in some big computers -- was a significant factor that limited the machine's computational speed. Since it was physically impossible to make the signals travel faster, computer engineers focused on giving them shorter distances to travel.

The result was the integrated circuit, in which thousands of switches are jammed onto a chip of silicon about a quarter-inch square. The distance between switches today is measured in thousandths of an inch. Signals moving at the speed of light can traverse those small distances in very short periods.

Indeed, the real limiting factor on computer speed is no longer the transit time for signals moving from switch to switch. The hang-up now is the time it takes for a switch to change from on to off. The computer is a long, long chain of switches; each switch has to wait for the one ahead of it to flip one way or the other before it can do anything. Thus each switch's switching time (the experts call this "propagation delay") is an important performance characteristic in all modern digital tools.

"Propagation delay" is familiar to anyone who's driven on an expressway during rush hour. If 500 cars are proceeding bumper to bumper and the first car stops, all the others stop as well. When the first driver puts his foot back on the accelerator, the driver in the second car sees the brake lights ahead of him go off, and he, in turn, switches his foot from brake to accelerator. The switching action is then relayed down the line of traffic. Even if each driver has a switching time from brake to accelerator of just one second, the last car in line will have to wait 500 seconds -- about 8.4 minutes -- because of the "propagation delay" down the line.

In the most high-powered computers, the switching time is one nanosecond -- one billionth of a second. By those standards, a pocket calculator is a tortoise. Its switches each take about 100 nanoseconds to go from on to off. Another way to say that is that each switch can go from on to off, from binary one to binary zero, about 10 million times each second.

There are some calculator operations that require 10 million separate steps. If you ask your calculator to take the cube root of a four-digit number, you'll see a blank screen for a second or so while the circuit works step by step through the math. Most problems take fewer steps, though; once the computation time gets down to a quarter-second or so (2.5 million steps), the operation look instantaneous to ths lle human eye.

To implement the digital math and logic in practical ways, you need a switch that is small, reliable, power-efficient and fast.

The device that meets all those critieria is a tiny piece of silicon called a transistor. It's a switch that responds to an incoming electronic pulse by turning (depending on how it's wired) either on or off. When William Shockley, John Bardeen and Walter Brattain invented the transistor in 1947, the groundwork was laid for the modern digital computer. A decade later, when Jack Kilby and Robert Noyce invented the integrated circuit -- with thousands of transistors and other electronic components integrated onto a single piece of silicon -- all the clocks and games and calculators and computers that we know today became possible.

Indeed, all the parts and plans and patterns that make digital devices work were developed by a computer that is far more miraculous than any electronic machine -- the human mind.

It's an obvious point, but one that seems to be forgotten sometimes as we push ahead into the cybernetic age. It was the human mind that developed all the machine-made wonders of the modern era.