Chapter 5: How Your Computer Computes


In order to understand how the individual bits and pieces of your computer work together, it's helpful to start with the big picture of the computer as a set of logical blocks. Starting with a simple on/off circuit, this chapter builds from there to a computer that uses a complex operating system to control a keyboard, a video display, and many other peripheral devices.

The information in this chapter isn't enough for you to reconstruct the invention and evolution of the digital computer, but it should provide a decent foundation for understanding what's happening inside the computer on your desk.

From a Switch to a Bit

To understand how a computer works, look at a simple switch, like the one shown in Figure 5.1. When the switch is closed, the electrical circuit is completed and in this example, the light comes on. When the switch opens, the light goes dark.

image from book
Figure 5.1: A simple switch controls a light.

Now substitute a choice of inputs for the switch and an output selector for the light and add a controller between the input and the output (see Figure 5.2). The controller receives an instruction from one of several possible sources that tells the circuit which input and output to use.

image from book
Figure 5.2: Instead of a switch and a light, this circuit can choose among several different sources and destinations.

For example, an input device might have many individual switches. When a user closes a particular switch, the circuit sends a corresponding signal to the output. Congratulations! You've just invented a keyboard. Or the input might be a device that detects the presence or absence of a signal on an incoming communications circuit or at a particular location on a storage medium. It could also be an environmental sensor that triggers a signal when some physical condition changes, such as temperature or atmospheric pressure.

The output might be a light, a video display, a printer, a speaker, or an outbound communications circuit. In fact, it could be anything that can be directly or indirectly controlled by an electrical circuit.

By adding a device that can store the result of one instruction for the controller-a memory like the one in Figure 5.3-and allowing the circuit to use the memory as both an input source and an output destination, you can create a machine that uses the results of one action to determine a subsequent action.

image from book
Figure 5.3: Add a memory to the circuit to store instructions.

Finally, use a set of prepared instructions-a program-to instruct the controller how to respond to a series of input signals: either produce an output signal or send a new instruction to memory. Task Manager Window shown in Figure 5.4, shows the processes running at any given time.

image from book
Figure 5.4: A simple computer uses instructions from a program to drive the controller.

This simple computer has a serious limitation: it can handle only inputs and outputs that have just two possible conditions. This is known as a binary system. If you want to do anything more complicated than turning a light on and off or counting to two, you have to deal with more than one circuit (or bit) at the same time.

If you use two bits, the number of possible inputs and outputs doubles to four. Add one more and it doubles again to eight. Each additional circuit continues to double the total: 2, 4, 8, 16, 32, 64, 128, 256, and so on.

Table 5.1: How Bits Combine Into Bytes
Open table as spreadsheet

Value

Bit 0

Bit 1

0

   Off

   Off

1

   Off

   On

2

   On

   Off

4

   On

   On

To use more than one circuit, we can either operate several parallel switches at the same time or examine a series of bits, one after another. A combined set of bits is called a byte. Today's personal computers use an 8-bit byte, which provides up to 256 different input or output conditions; more than enough to assign a unique value to each of the letters, numbers, and symbols on a keyboard, a printer, or a communications channel with enough left over for the Russian, Hebrew, and Arabic alphabets and more.

It's also enough to send one of 256 different shades of color to a video display, or the same number of other input and output conditions. In Windows XP, the computer processor handles four parallel 8-bit bytes, or 32 bits at a time. The latest generation of processors can handle 64 bits at one time. This increases the total number of possible input or output combinations from a couple hundred to several million or more.




PC User's Bible
PC Users Bible
ISBN: 0470088974
EAN: 2147483647
Year: 2007
Pages: 372

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net