Results 1 to 3 of 3
Thread: hardware notes class 14th

02262010 #1
 Join Date
 Feb 2010
 Posts
 126
 Points
 166.99
 Rep Power
 134
hardware notes class 14th
Chapter 13. FPUÃ¢â‚¬â„¢s and multimedia
The computer is constantly performing calculations, which can be divided into two groups.
Whole numbers
Floating point numbers The whole number calculations are probably the most important, certainly for normal PC use Ã¢â‚¬â€œ using office programs and the like. But operations involving floating point numbers have taken on greater significance in recent years, as 3D games and sound, image and video editing have become more and more a part of everyday computing. LetÃ¢â‚¬â„¢s have a brief look at this subject.
Floating point numbers
The CPU has to perform a lot of calculations on decimal (or real) numbers when the PC runs 3D games and other multimedia programs.
These decimal numbers are processed in the CPU by a special unit called an FPU (Floating Point Unit). In case you are wondering (as I did) about the name, floating point Ã¢â‚¬â€œ here is an explanation: Real numbers (like the number Ãâ‚¬, pi) can have an infinite number of decimal places. In order to work with these, often very large, numbers, they are converted into a special format.
First the required level of precision is set. Since the numbers can have an infinite number of decimals, they have to be rounded. For example, one might choose to have five significant digits, as I have done in the examples below (inside the PC, one would probably choose to have many more significant digits).
Once the precision has been set, the numbers are converted as shown below (the decimal point floats):
The number 1,257.45 is written as 0.12575 x 104.
The number 0.00696784 is written as 0.69678 x 102. Now the FPU can manage the numbers and process them using the arithmetic operators.
Normal form
Rewritten1,257.45In the FPU
0.12575 x 1040.0069678412575 +4
0.69678 x 10269678 2
Fig. 92. Rewriting numbers in floating point format.
FPU Ã¢â‚¬â€œ the number cruncher
Floating point numbers are excessively difficult for the CPUÃ¢â‚¬â„¢s standard processing unit (the ALU) to process. A huge number of bits are required in order to perform a precise calculation. Calculations involving whole numbers (integers) are much simpler and the result is correct, every time.
That is why an FPU is used Ã¢â‚¬â€œ a special calculating unit which operates with floating point numbers of various bit lengths, depending on how much precision is needed. FP numbers can be up to 80 bits long, whereas normal whole numbers can Ã¢â‚¬Å“onlyÃ¢â‚¬Â be up to 32 bits (permitting 4,294 billion different numbers). So the FPU is a number cruncher, which relieves the load on the ALUÃ¢â‚¬â„¢s. You can experiment with large numbers yourself, for example, in a spreadsheet.
In Excel 2000, 21023(the number 2, multiplied by itself 1023 times), is the biggest calculation I can perform. The result is slightly less than 9 followed by 307 zeroes.
Attachment 369
Fig. 93. Experiments with big numbers in Excel. Modern CPUÃ¢â‚¬â„¢s have a builtin FPU (Floating Point Unit) which serves as a number cruncher. But it hasnÃ¢â‚¬â„¢t always been like this.
For example, IntelÃ¢â‚¬â„¢s 80386 processor didnÃ¢â‚¬â„¢t have a builtin FPU calculating unit. All calculations were done using the processorÃ¢â‚¬â„¢s ALU. But you could buy a separate FPU (an 80387), which was a chip which you mounted in a socket on the motherboard, beside the CPU. However, in the 80486 processor, the FPU was builtin, and it has been that way ever since.
Fig. 94. A Ã¢â‚¬Å“separateÃ¢â‚¬Â FPU, IntelÃ¢â‚¬â„¢s 80387 from 1986. 3D graphics
Much of the development in CPUÃ¢â‚¬â„¢s has been driven by 3D games. These formidable games (like Quake and others) place incredible demands on CPUÃ¢â‚¬â„¢s in terms of computing power. When these programs draw people and landscapes which can change in 3dimensional space, the shapes are constructed from tiny polygons (normally triangles or rectangles).
A character in a PC game might be built using 1500 such polygons. Each time the picture changes, these polygons have to be drawn again in a new position. That means that every corner (vortex) of every polygon has to be recalculated.
In order to calculate the positions of the polygons, floating point numbers have to be used (integer calculations are not nearly accurate enough). These numbers are called singleprecision floating points and are 32 bits long. There are also 64bit numbers, called doubleprecision floating points, which can be used for even more demanding calculations.
When the shapes in a 3D landscape move, a socalled matrix multiplication has to be done to calculate the new vortexes. For just one shape, made up of, say, 1000 polygons, up to 84,000 multiplications have to be performed on pairs of 32bit floating point numbers. And this has to happen for each new position the shape has to occupy. There might be 75 new positions per second. This is quite heavy computation, which the traditional PC is not very good at. The national treasuryÃ¢â‚¬â„¢s biggest spreadsheet is childÃ¢â‚¬â„¢s play compared to a game like Quake, in terms of the computing power required.
The CPU can be left gasping for breath when it has to work with 3D movements across the screen. What can we do to help it? There are several options:
Generally faster CPUs. The higher the clock frequency, the faster the traditional FPU performance will become.
Improvements to the CPUÃ¢â‚¬â„¢s FPU, using more pipelines and other forms of acceleration. We see this in each new generation of CPUÃ¢â‚¬â„¢s.
New instructions for more efficient 3D calculations. We have seen that clock frequencies are constantly increasing in the new generations of CPU. But the FPUÃ¢â‚¬â„¢s themselves have also been greatly enhanced in the latest generations of CPUÃ¢â‚¬â„¢s. The Athlon, especially, is far more powerfully equipped in this area compared to its predecessors.
The last method has also been shown to be very effective. CPUÃ¢â‚¬â„¢s have simply been given new registers and new instructions which programmers can use.
MMX instructions
The first initiative was called MMX (multimedia extension), and came out with the Pentium MMX processor in 1997. The processor had builtin Ã¢â‚¬Å“MMX instructionsÃ¢â‚¬Â and Ã¢â‚¬Å“MMX registersÃ¢â‚¬Â.
The previous editions of the Pentium (like the other 32 bit processors) had two types of register: One for 32bit integers, and one for 80bit decimal numbers. With MMX we saw the introduction of a special 64bit integer register which works in league with the new MMX instructions. The idea was (and is) that multimedia programs should exploit the MMX instructions. Programs have to be Ã¢â‚¬Å“written forÃ¢â‚¬Â MMX, in order to utilise the new system.
MMX is an extension to the existing instruction set (IA32). There are 57 new instructions which MMX compatible processors understand, and which require new programs in order to be exploited.
Many programs were rewritten to work both with and without MMX (see Fig 96). Thus these programs could continue to run on older processors, without MMX, where they just ran slower.
MMX was a limited success. There is a weakness in the design in that programs either work with MMX, or with the FPU, and not both at the same time Ã¢â‚¬â€œ as the two instruction sets share the same registers. But MMX laid the foundation for other multimedia extensions which have been much more effective.
Fig 96. This drawing program (Painter) supports MMX, as do all modern programs. 3DNow!
In the summer of 1998, AMD introduced a collection of CPU instructions which improved 3D processing. These were 21 new SIMD (Single Instruction Multiple Data) instructions. The new instructions could process several chunks of data with one instruction. The new instructions were marketed under the name, 3DNow!. They particularly improved the processing of the 32bit floating point numbers used so extensively in 3D games.
Fig. 97. 3DNow! became the successor to MMX. 3DNow! was a big success. The instructions were quickly integrated into Windows, into various games (and other programs) and into hardware manufacturersÃ¢â‚¬â„¢ driver programs.
SSE
After AMDÃ¢â‚¬â„¢s success with 3DNow!, Intel had to come back with something else. Their answer, in January 1999, was SSE (Streaming SIMD Extensions), which are another way to improve 3D performance. SSE was introduced with the Pentium III.
In principle, SSE is significantly more powerful than 3DNow! The following changes were made in the CPU:
8 new 128bit registers, which can contain four 32bit numbers at a time.
50 new SIMD instructions which make it possible to do advanced calculations on several floating point numbers with just one instruction.
12 New Media Instructions, designed, for example, for the encoding and decoding of MPEG2 video streams (in DVD).
8 new Streaming Memory instructions to improve the interaction between L2 cache and RAM. SSE also quickly became a success. Programs like Photoshop were released in new SSE optimised versions, and the results were convincing. Very processorintensive programs involving sound, images and video, and in the whole area of multimedia, run much more smoothly when using SSE.
Since SSE was such a clear success, AMD took on board the technology. A large part of SSE was built into the AthlonXP and Duron processors. This was very good for software developers (and hence for us users), since all software can continue to be developed for one instruction set, common to both AMD and Intel.
SSE2 and SSE3
With the Pentium 4, SSE was extended to use even more powerful techniques. SSE2 contains 144 new instructions, including 128bit SIMD integer operations and 128bit SIMD doubleprecision floatingpoint operations.
SSE2 can reduce the number of instructions which have to be executed by the CPU in order to perform a certain task, and can thus increase the efficiency of the processor. Intel mentions video, speech recognition, image/photo processing, encryption and financial/scientific programs as the areas which will benefit greatly from SSE2. But as with MMX, 3DNow! and SSE, the programs have to be rewritten before the new instructions can be exploited.
SSE2 adopted by the competition, AMD, in the Athlon 64processors. Here AMD even doubled up the number of SSE2 registers compared to the Pentium 4. Latest Intel has introduced 13 new instructions in SSE3, which Intel uses in the Prescottversion of Pentium 4.
We are now going to leave the discussion of instructions. I hope this examination has given you some insight into the CPUÃ¢â‚¬â„¢s work of executing programs.Last edited by $$$lover; 03012010 at 03:32 PM.
Laie_2

02262010 #2
 Join Date
 Feb 2010
 Posts
 1
 Points
 1.00
 Rep Power
 0
Very good

03012010 #3
Nice sharing good work
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads

Hardware notes class 5th
By $$$lover in forum Computer HardwareReplies: 3Last Post: 12192010, 11:17 PM 
Hardware notes class 9th
By $$$lover in forum Computer HardwareReplies: 1Last Post: 03012010, 10:45 PM 
hardware notes class 10th
By $$$lover in forum Computer HardwareReplies: 1Last Post: 03012010, 10:44 PM 
hardware notes class 11th
By $$$lover in forum Computer HardwareReplies: 1Last Post: 03012010, 10:43 PM
Islamic Book & Magzine Store
1 Week Ago in Islamic Books