Wednesday, December 31, 2008

How Does a Computer Work?

A computer is an information-processing machine that works by converting all kinds of information into binary numbers (ones and zeros) and then using simple mathematics to make decisions about, or to rearrange, those numbers. There are two things essential to understanding the basics of how a computer works. One is that a computer treats any type of information (not only numbers but also letters, words, dates, and so on) as if it consisted simply of binary ones and zeros. For example, a computer can translate the letter “A” typed into its keyboard into a string of ones and zeros, such as 1000001. One reason to do this is that once in binary form, the information can be stored and moved about more easily. On a hard disc, the “ones” could be stored as magnetized spots on the disc, while the zeroes can be stored as unmagnetized spots. Once information has been converted to ones and zeros, the computer can get to work.
The second key to understanding how a computer works it to remember that all of a computer’s functions are based on the movement and transformation of electrical pulses (representing ones and zeroes) in electrical circuits. Inside the computer are electrical circuits that perform computations on the zeros and ones, such as adding and subtracting them. That’s why we call the machine a computer even though we use it for word processing, games, or surfing the Web. These computational circuits are called the logic of the computer, because the calculations they make are similar to simple logic decisions. Everything that a computer can do with information is done by using these logic circuits. For example, if you press the A key on the computer keyboard, circuits inside the computer receive pulses of electricity representing the A in binary form—1000001. Those pulses are sent to logic circuits that make yes or no decisions based on the input they receive. A very simple example would be a circuit that determines whether the input you send it is a one or a zero. The output of the circuit is a new piece of information—a binary one or zero that is the result of the simple yes or no decision. Other groups of such circuits count the number of yeses and no to determine whether the data is an A or some other character. Then the result of that determination is sent to other circuits that store, display, or process that data. Millions and millions of these logic circuits are used together to do much more complex tasks, such as finding, retrieving, and displaying a Web page. Yet everything your computer does is based on digital ones and zeros and the use of logic circuits.

No comments: