The contents:
|
|
|
How does a CPU work? |
The CPU is centrally located on the motherboard. Since the CPU carries out a large share of the work in the computer, data pass continually through it. The data come from the RAM and the units (keyboard, drives etc.). After processing, the data is send back to RAM and the units.
The CPU continually receives instructions to be executed. Each instruction is a data processing order. The work itself consists mostly of calculations and data transport:
Data have a path to the CPU. It is kind of a data expressway called the system bus. You can read more about the system bus in module 2b.
Two types of data |
The CPU is fed long streams of data via the system bus. The CPU receives at least two types of data:
What we call instructions is program code. That includes those messages, which you continuously send to the PC from the mouse and keyboard. Messages to print, save, open, etc.
Data are typically user data. Think about the letter, which you are writing to Aunt Karen. The contents, letters, images, etc., are user data. But if you click "print," you are then sending program code (instructions):
8086 compatible instructions |
The biggest job for the CPU consists of decoding the instructions and localizing data. The calculations themselves are not heavy work.
The decoding consists of understanding the instructions, which the user program sends to the CPU. All PC CPUs, are "8086 compatible." This means that the programs communicate with the CPU in a specific family of instructions.
These instructions, originally written for the Intel 8086 processor, became the blueprint for the "IBM compatible PC" concept. The 8086 from 1978 received its instructions in a certain format.
Since there was a desire that subsequent CPU generation should be able to handle the same instructions which the 8086 could, it was necessary to make the instruction sets compatible. The new CPUs should understand the same instructions. This backwards compatibility has been an industry standard ever since. All new processors, regardless of how advanced, must be able to handle the 8086 instruction format.
Thus, the new CPUs must use much effort to translate the 8086 instruction format to internal instruction codes:
CISC, RISC, and VLIW instructions and their handling |
The first CPUs had a so called Complex Instruction Set Computer (CISC). This means that the computer can understand many and complex instructions. The X86 instruction set, with its varying length from 8 to 120 bit, was originally developed for the 8086 with its mere 29000 transistors.
More instructions have been added within new generations of CPUs. The 80386 had 26 new instructions, the 486 added 6 and the Pentium another 8 new instructions. This meant, that programs had to be rewritten to use these new instructions. This happened for example with new versions of Windows . Hence, some programs require a 386 or a Pentium processor to function.
You should also see module 3e09 on MMX, 3DNow! and other extensions to the set of instructions.
For every new CPU generation, the instruction set has been expanded. The 386 came with 26 new instructions, the 486 with 6 new instructions, and Pentium with 8 new instructions. These changes mean that some programs require at least a 386 or a Pentium processor to work.
To re-order the instructions you use a software compiler. This principle works fine in more special processors such as DSPs. These chip perform the same operations over and over again.
A CPU is a general-purpose processor, and the VLIW design becomes extremely complex in this case. Hence, Intel has had many problems with their 64 bit Itanium processor, which comes in VLIW design. Another company to use VLIW is TransMeta with their portable Crusoe processor.
| Learn more |
Click for Module 3b about CPU improvements
Click for Module 3c about the 5th generations CPUs (Pentiums etc.)
Click for Module 3d about the clock frequencies
Click for Module 3e about 6th generations CPUs (Pentium IIs etc.)
|
Copyright (c) 1996-2005 by Michael B. Karbo. www.Karbosguide.com.