Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive
 

Lesson 3.3: Features of the CPU
 

            In this lesson you will learn:
 

    What is the CPU clock and how it affects the speed of the CPU
    What we call the range in bits of the CPU and how it affects the speed of the CPU
    What is the repertoire of commands

3.3.1 The clock (clock)
 

For the CPU to execute a command, perform as we have seen a number of successive operations. For example in the previous lesson, we saw that the recall and execution of the order of multiplication (1010) ¬ A · B has a certain number of steps in different units of the CPU.
 

Each of these functions takes a short time. For the synchronization of these functions, a clock is necessary. Each "beat" of the clock the CPU performs an elementary operation.
 

The clock generation circuit is usually outside, and produces a waveform such as the following figure.
 

Figure 3.3.1: The waveform of the clock frequency of 100 MHz
 

We observe that the clock signal, alternating between the level of 5 V and that of 0V. Due to the shape of the signal is called a square pulse. The interval between two successive rotations of the signal, for example from 0V to 5V to 0V again is equal to one half of the clock. Two successive half-lives are a whole period or whatever we call a clock cycle. The inverse of the frequency period. The frequency tells us the number of clock cycles during one seconds and microprocessors are typically of the order of hundreds of MHz. One MHz equals one million cycles per second.
 

Each CPU is designed to operate up to a maximum frequency. Usually the clock frequency is chosen to be equal to the maximum operating frequency of CPU that's because as we will see greater the frequency of the clock is running faster the CPU commands. The clock frequency and is often called the CPU operating frequency.
 
 
 

Type of CPU


Clock Frequency

8088


4.77, 8, 10, 12 MHz

80286


6, 8, 12, 16, 20 MHz

80386


16, 20, 25, 33, 40 MHz

80486


25, 33, 50,75,100,120 MHz
 

Table 3.3.1: Frequency Clock
 

In Table 3.3.1 we see different CPU and the corresponding clock frequencies allowed for each one of them. The different values in clock frequency for the same type KME, because each type of CPU released in different versions with faster clock every time.
 

If we try to exceed the maximum operating frequency, the result will be either incorrect operation or even complete destruction of the integrated CPU.
 

The rate at which orders are executed depends on the operating frequency of the CPU. But it is wrong to think that the CPU executes orders in the operating frequency of the clock. If the CPU clock is 100 MHz (100.000.000 cycles per second) this does not necessarily mean that it is running and 100,000,000 instructions per second.
 

As mentioned, depending on how the CPU has a built a command needs to execute several successive operations each of which lasts one clock cycle.
 

The manufacturer usually gives the number of clock cycles required to recall and execution of each command. So if you add a command needs 5 clock cycles to be recalled and executed and the CPU operating frequency is 100 MHz, ie each cycle is 10 ns, then the order of addition have total 5 * 10 ns = 50 ns to execute. So they can run 20 trillion additions per second.
 

A measure of the speed of the CPU is the average of commands that can execute in one second. With special programs (benchmarks) allow manufacturers to count how many commands performs an average of the CPU. The average number of instructions that performs a second CPU is measured in MIPS (Million Instructions Per Second), ie millions of instructions per second. If for example we have a CPU with 100 MHz clock per second, and each instruction takes 5 clock cycles, then the speed is 100 million / 5 = 20 million orders = 20 MIPS.
 

In conclusion, we conclude that the speed depends on the CPU clock frequency and is a key indicator of the rate at which orders are executed. The faster the clock is running faster the CPU the program.
 

3.3.2 The width in bits of the CPU
 

The CPU can do arithmetic or logic operations between registers it. So every time the data must first be imported from the memory or peripherals to a registrar and then the CPU is processing.
 

An important feature of the CPU is the range in bits of registers and arithmetic logic unit (ALM), it has. The more "big" is a registrar so "more bits of the given country."
 

For example, suppose you want to perform the addition of 1230 + 2243 using a CPU with three registers, the A, B, C. For the CPU to perform the addition should be transferred first two numbers of the registers. The number 123010 is equal to 4CE16 = 100110011102 and we need at least 11 bits to store it. If we have the CPU registers and 16 bits of ALM then save the data will be only one register, for example in register A. Likewise the storage of 224310 = 8C316 = 1000110000112 will become another registrar, for example in register B .
 

Figure 3.3.2: Add a 16 bit registers
 

The addition will be made with a single command, the C ¬ A + B in the ALM and the result stored in the country to register a range of 16 bit. Transferring the results from CPU to memory or a peripheral unit also needs just one command.
 

But if we use CPU registers and ALM has 8 bits of time to save each number would take at least two steps.
 

Figure 3.3.3: Addition of 8-bit registers. Step 1
 

Figure shows how to save and add the result to the registers in the CPU. So at the registrar A put the 8 bit value with the smallest number 123 010 100 110 011 102 =. Stored in register B in the same way the 8 bit value with the smallest number of 224 310 = 1,000,110,000,112. The addition and the result is stored in register C. If a prisoner has resulted in the addition of two registers, then the flag prisoner of ALM is to 1. The result is stored in memory and ready for the second step.
 

In the second step, the registers A and B of the CPU will be loaded, the other higher-value bit numbers 123 010 100 110 011 102 = 224 310 = 1,000,110,000,112 and just as shown in Fig.
 

Figure 3.3.4: Addition of 8-bit registers. Step 2
 

The addition now becomes more complicated since we must include the inmate that has arisen from the previous addition. Thus in the case where detainee has emerged, as in our example should add another extra unit in the total is the sum of registers A and B contain the higher-value data. The result of this addition is stored in register C.
 

We observe that for the storage of the total effect of the addition need two registrars and transfer of memory or some output unit needs two commands.
 

We conclude that the length in bits of the registers and the KME ALM significantly affects the performance of KME. The higher registers of KME sooner is generally the execution of programs. Of course the length of the registers can not be infinitely large is extremely complex as the construction of KME.
 

Usually registrars have the same length as the length in bits of other internal units of KME, such as ALM, which we say and length of the CPU. This parameter is quite important for system performance. So a 16 bit CPU compared to an 8 bit CPU with similar indoor units, the same clock frequency and the same command repertoire is at least twice as fast.
 

In Table 3.3.2 we see the largest natural number we can store it in a register according to range. Generally of an n bit register can store all the numbers from 0 to 2n-1.
 

Width in bits
 

Maximum integer value can we represent

8

28-1 = 255

16

216-1 = 65.535

32

232-1 = 4.294.967.295

64

264-1 = 18.446.744.073.709.551.615

Table 3.3.2 Maximum integer value can we represent a function of the number of bits

Table 3.3.3, shows the range in bits of some of the most famous KME. We should mention here that an 8 bit CPU can contain some 16 bit registers as well as 16 bit internal units. Nevertheless, we do not say that the range is 16 bit, only if all the internal units, mainly registers and arithmetic logic unit, the CPU is 16 bit.

For example, the CPU, Z80, has a gauge of 16 bit program and can handle memory addresses of 16 bit. Moreover, the arithmetic and logic unit supports additions and subtractions between 16 bit registers itself ALM is of 8 bit (the act of 16 bit done in two steps). That's why we say that KME Z80 has a range of 8 bit.

CPU


Range of CPU in bit

Z80


8 bit

8085


8 bit

8086


16 bit

8088


16 bit

80386


32 bit

80486


32 bit

Pentium


32 bit

Table 3.3.3 Range of known CPU in bit

3.3.3 Type Command

Then we will examine another important feature of the CPU, the repertoire of available commands, ie commands that can perform.

Each CPU (8086, 68000, Z80, etc.) and supports a different repertoire of commands.

The repertoire of CPU instructions is key to be able to say if the CPU is suitable for a particular use. For example in the case where we have implemented a digital processing of the human voice, the CPU must have instructions which perform mathematical operations quickly both as integers and decimal numbers. In contrast, use of a CPU in an application such as switching calls to a digital PBX requires the CPU to have "smart" orders for fast transfer of data to memory and peripherals.

The manufacturers usually refer to the possible applications for which products are suitable and there are entire families of processors for each category of applications.

Another important feature of the repertoire of commands is a CPU compatibility with older CPU. From early manufacturers of CPU, they concluded that the new CPU should be able to run older programs CPU. In other words, the command of a repertoire of new CPU with the new mandates, should contain all the commands of the previous CPU, the same family. In this manner, programs written for an older CPU does not need to rewrite from scratch for the new. This feature played an important role in the rapid evolution of personal computers and was an important motivation for introducing them.

What I learned:

    What is the clock and the clock cycle
    What is the maximum operating frequency of the CPU
    What is the range of a register and how it affects the speed with which we can do specific actions
    What is the command repertoire

Terminology

    Clock (Clock)
    Cycle Clock (Clock Cycle)
    Square pulse
    MIPS
    Range of Registers
    Type of Orders

Control knowledge

    1.A CPU is designed to execute all orders over 4 clock cycles. The CPU executes a program 500 commands.

    Calculate how many clock cycles the CPU needs to complete the program.
    If the CPU clock frequency is 1 MHz, how long it takes the CPU to complete the program?
    Calculate also the speed of the CPU in MIPS.

    2.Mia other CPU features two sets of commands. The commands in Group A, last 5 cycles, while Group B commands 8 cycles. The CPU performs a program that has 150 commands 300 type A and type B Commands

    Calculate how many clock cycles the CPU needs to complete the program.
    If the CPU clock frequency is 4 MHz, how long it takes the CPU to complete the program?
    Calculate also the speed of the CPU in MIPS.
    If the CPU 1 of the question did the same job, which of the two CPU is in your opinion the fastest and why?

    3.Posous registers needed to store the number in 123.456.78910 = 1110101101111001101000101012

A) a 32-bit CPU: _____________

B) a 16-bit KME: _____________

                        C) an 8-bit CPU: _____________

Hint: Divide the binary representation of numbers in sections to fit into a katatachoriti, starting from right to left. Count the number of parts needed (from LSB to MSB).

Add comment


Security code
Refresh