CPIHow many cycles are required for a program to run? Could we assume that N cycles will perform N instructions? No, we couldn't because In general
Now for some computer abbreviations and jargon that you need to understand and know: CPI (Cycle per Instruction)
Instruction Count (I_{c}) is the number of machine instructions executed. CPI_{i}is the number of cycles required for instruction type i I_{i} is the number of executed instructions of type i Now, this equation looks daunting... but it isn't so bad when you know what it means. (CPI_{i} x I_{i}) gives you the total number of cycles for one type of instruction as you have multiplied the number of that instruction type by the average time to carry out that instruction type. However as different instructions take different numbers of cycles to perform them... and you do not have an equal number of each type of instruction, you need to add up that value for each type. That is where the 'sigma' term comes in! The sigma term uses the Greek capital letter for 'S' to denote 'sum of'. It means you have to sum all of the terms in the bracket (CPI_{i} x I_{i}) taking i from value 1 to n. In other words: (CPI_{i} x I_{i}) = (CPI_{1} x I_{1}) + (CPI_{2} x I_{2}) .......... + (CPI_{n1} x I_{n1}) + (CPI_{n} x I_{n}) After summing them all you have to divide your sum total by Ic  the instruction count, the number of instructions carried out (of all types). That will then give you a more accurate picture of the average number of cycles for an instruction. What is the real time for a program to run?
T = I_{c} x CPI x Another method for calculating CPI
Example: From the data below calculate
Average CPI = (1 x 0.6) + (2 x 0.18) + (4 x 0.12) + (8 x 0.1) = 2.24 MIPS rate = instruction count/(CPU execution time x 10^{6})= I_{c}/(T x 10^{6}) MIPS rate = (400 x 10^{6}) / (2.24 x 10^{6}) ≈ 178 (round down) MIPS rate is useful for comparing performance between similar processors but machines with different instruction sets and programs with different instruction mixes cannot be easily differentiated between by using it. MFLOPS is useful for comparing performance if the processor has to perform a lot of computations with floatingpoint numbers. 
