Fri Apr 17 12:14:06 PDT 2015

How Your Computer, Tablet, or Smart Phone Works

Understanding how your computer works will enable you to work and play smarter. As originally published on Associated Content

Occasionally, just occasionally, it is useful to know the basics of how things work. If you understand the basics you get the best performance, you can fix problems when they occur, and you know when it is time to get a replacement. Hence the many volumes that are published on male and female psychology. What holds for potential mates is also true for computers. If you understand the basics of your computer's internal workings your life will be a little easier.

A trip to the library and a lengthy session reading through the theory of semiconductor and logic design is not necessary. This short article contains the key information that you need to understand what happens behind the scenes in your computer - and why you should care. The information here applies to all computers large and small.

Your computer contains the following major components: Central Processing Unit (CPU), Random Access Memory (RAM), Hard Disk Drive(s) (HDD), Visual Display Unit (VDU), Power Supply Unit (PSU), Keyboard and mouse, or touch pad, CD Rom and DVD player and USB drives.

We will start at the heart of the computer. The Central Processing Unit (CPU) is a piece of electronics which can perform arithmetic operations extremely rapidly. In fact, that is all that it does. What good is arithmetic when you want to create documents? Well, computer scientists have cunningly reduced the process of writing, communicating, playing music, and almost everything else in life, to sequences of instructions known as programs. Programs are like the set of instructions you learned at school to solve problems like long division. Given an input somewhere, the instructions produce an output somewhere else, and sometimes carry a figure or two to the next instruction. A key press on the keyboard is converted into numbers (on's and off's in binary); the numbers are operated upon by the CPU, and that combination turns on or off the display of a letter on the VDU. Originally computers contained only recognizably arithmetic programs, used to calculate ballistic trajectories, for example. But now the programs that we use are word processors, email programs, and web browsers and the arithmetic is just a means to an end. And fortunately the user does not have to think about arithmetic at all.

It helps if you understand that the CPU is dumb, it depends on being fed the correct instructions and data. The CPU can do no more than its instructions have accounted for. If you want to multiply, the CPU cannot use the instructions for long division. And, just as when you do long division with poorly written instructions, the CPU can make mistakes. If the mistakes are bad, one of two things can happen. Either, both the CPU and the operating system give up with the program (and the program crashes abruptly) or the whole operating system of the computer (itself a set of instructions) crashes and your computer will need to restart from scratch.

Don't for a moment think that computer programs are particularly smart. They are just lists of instructions for carrying out arithmetic operations. If you feed in information which the programmer didn't account for, you will get unexpected results. We have all seen this behavior. We type in a name which is close to the correct name thinking that our favorite program will know that this is close to the correct name too. However, these expectations are often dashed. The computer wants its email addresses and web site addresses to be absolutely accurate or they will not work.

From a hardware perspective, the CPU either works or it doesn't. If the CPU fails - the computer won't start at all. (We will describe the process of starting, or booting, a little further down). One thing to bear in mind about CPUs is the fact that CPUs operate at different speeds and with different numbers of 'cores'. The speed of the CPU is measured in GHz (typically), which means thousands of millions of cycles per second, and the higher the speed of the CPU the faster your machine will carry out its arithmetic operations. You will see this as faster processing in your favorite programs, fewer pauses, and generally improved computing experience.

If a given CPU has more than one core, you will be able to carry out more than one set of processing operations in parallel. So, buy the fastest CPU speed that you can, and buy as many cores as you can.

Where does the CPU obtain its streams of instructions and data to operate on? Well from streams of numbers which you know as files or documents. There are different types of storage that are important for such files in your computer. The Hard Disk Drive (HDD) and the Random Access Memory (RAM) are two of the most important. Both of these devices store information as numbers, but in different ways.

The HDD stores numbers in changes in the magnetism on a magnetic disk. When you turn off the power, the magnetic information stays in place on the HDD ready to be used again in the future. However, the speed of access to your numbers (data) is rather slow on a HDD, because the head of the disk must be lined up with the magnetic disk to extract your data. Physically moving objects like the hard disk and its reading head around takes a while, just as getting up and going to the filling cabinet takes a while for you.

In contrast, the RAM stores numbers in silicon memory, using a small amount of electrical energy to maintain the state of the storage. If you turn off the power, the information is lost. RAM storage is much faster than HDD storage but it is more expensive per piece of information stored. You can think of the RAM as your digital desk top and the HDD as a filing cabinet. The computer lives in a fastidiously tidy world, however, and when the power is turned off, the desktop (the RAM) is automatically wiped clean.

The fact that HDD is a mechanical device should help you appreciate the need for carrying out regular backups. Mechanical devices that are in constant motion undergo wear and eventually fail. When a HDD fails very often there is no way to recover the data that was originally stored on the magnetic media. So if your data is valuable make sure that you have regular backups. The RAM on the other hand is the working storage area for your computer. Here it makes sense to have as much and as fast a storage area as possible. So make sure that RAM size is something that you compare in your next round of computer purchasing.

Interestingly, most operating systems currently have a hard time accessing all of the space in the RAM if the RAM is over 2 GB in size. The reason for this goes back to the way that the CPU stores the location of elements in its arithmetic machinery. So before you buy more than 2 GB of RAM, make sure that your particular operating system can effectively use all of it, or you will be wasting your money. 64-bit operating systems do not have this problem. But many program writers have yet to make the leap to explicitly writing their programs for 64-bit operating systems.

If you have been following along, you will have realized that if all instructions are stored on your HDD, because that is the only place that information survives when the power is off, and that the operation of the computer is controlled by instructions, something special must happen when the computer is first started up. The following description will explain what happens when you start (or boot) your computer.

When the computer starts it is instructed by a small piece of non-volatile memory (this single chip retains its memory and is comparatively expensive to produce), to extract its initial set of instructions from a certain area on your hard disk. This is a special very basic program which allows the computer to load additional instructions (the sequences of numbers which allow certain patterns of behavior) from certain areas of your disk. This is the process of 'bootstrapping', getting the computer moving, also known as 'booting' the computer. You will probably hear the HDD and various other peripherals like CD drives being checked during booting and you will see that there is a lot of HDD access (you will probably see the HDD lights on the machine blinking during the boot sequence). Booting takes some time because the initial program which is used for booting is soon replaced by a more sophisticated program known as the operating system, which must be read from the HDD. The operating system then loads all the drivers and services which are used by this computer.

This is an interesting phase in the start up of the computer. There is much that can go wrong. You may have installed a new program which upsets the loading of a driver or service, and if so, this will show up as a problem the next time that you restart.

Once the computer has been booted, you and it are ready to do some work, which means, don't forget, that you will be having your computer carry out arithmetic operations on your data. When you load a new program, the on's and off's are loaded into the operating system. These on's and off's are used to control the behavior of the machine. When you read a data file or document into that program, that set of on's and off's are read from the HDD and stored by the program in the RAM of the computer. Unless you save regularly, the changes that you make will be lost if the program or computer crashes, or if there is a power outage. So, save your work regularly, to get your information from the RAM stored on the HDD.

Some people do not like to think of their data as being numeric. The complaint will be heard - but I can see that my file contains letters. However, your computer represents letters as numbers. Even the so called ASCII system is an encoding of numbers to letters. When programs read ASCII the data is still treated as numbers but the ASCII convention allows the program to operate with numbers and display letters to the world.

The fact that computers are hugely efficient adding machines is extraordinary. The pioneers that recognized the potential of superfast adding machines and created the information technology boom in the 1980s understood how powerful fast computer arithmetic could be. The next time you complain that your math homework is likely to have no bearing on real life (or the next time that you hear that complaint), remember that the math that you computer does every day has made some programmers very rich indeed. Understanding math and recognizing the opportunities in fast arithmetic will be an immensely rewarding area of opportunity for many years.

Hopefully you have found this brief summary of some of the major aspects of a computer useful. Here is a recap. The CPU is a machine for fast, instructed arithmetic. It can do no more than it was programmed to do. There are two key storage areas in your computer, the HDD and the RAM. The HDD stores information permanently, the RAM is used for fast but temporary storage, so be careful about saving documents regularly to avoid lost data. Booting the computer loads a set of progressively more complex instruction sets into the computer culminating in the loading of the functioning operating system that you are used to working with. Knowing the basics will make your computer life considerably simpler.


Posted by ZFS | Permanent link