|
Page 1 of 5
Processor = computer
What is the most important part of any computer? Memory and disk is usually dismissed with a simple – “how much?” The processor is quite another level of difficulty. Mostly we drop down into “simple mode” and quote how fast it operates. Without really knowing what “GHz” means and without even being sure of what the processor does, we compare abstract numbers certain that bigger is better, well probably… The processor is the computer. There really is no question of the validity of this assertion. If you don’t believe me try running a program written for a PC on a Mac. The point is that computers with different processors are different – computers with the same processor are just faster or slower. The details of memory management and caching my be impressive but the real complexity of any computer system resides in the processor and it is time to look more closely at how it does what it does. Even if you think you already know you still might find the explanation interesting. The reason is that many books and courses don’t really tell you the whole story. They stop short and leave you with a sense that the processor is somehow magic even though you know the rough outline of how it all should work. Elsewhere we have discovered that what makes a computer is the intimate connection between processor and memory. When the processor places an address on the address bus a particular memory location is selected and either stores the data on the data bus or places the data stored in the location on the data bus. This might well be the major operating principle of a computer but it leaves out what the processor actually “does” with the data. After all it is called a “processor” so presumably it doesn’t just store and retrieve bit patterns. We already know how binary patterns can be used to represent numbers and we know how Boolean logic can be used to manipulate them – with addition and subtraction. But this is only part of what goes on. When you first start to consider the workings of the processor it is usually arithmetic that the focus falls on. The reason is that we often, mistakenly, think of computers as “computers” but for the vast majority of the time a computer is actually doing something other than arithmetic. Once you start looking a little more closely the magic seems to be more to do with how this lump of silicon, or whatever it is made from, can obey the commands in a program. How on earth does it look at the next instruction in a program, work out what it means and then arrange the immutable hardware to do it? The “trick” that the processor performs seems very complex but it is all based on building the complex from the simple and the very regular – but isn’t this always the principle when it comes to computers. The first thing a processor needs is some way of keeping track of where it has got to in the program. This is does using a single internal memory location, usually called the “Program Counter” or PC – although don’t be fooled by its name into thinking that it counts programs! All internal memory locations within the processor are called “registers” for historical reasons and to indicate that they are generally just a little more than simple memory locations. For example, the PC register has two operations that it can perform. It can be initialised to a set value and it can be incremented, i.e. it can add one to the value stored in it.
<ASIN:1844254402>
<ASIN:0789736136>
|