1 / 21

The CPU

The CPU. The Central Presentation Unit Language Levels Fetch execute cycle Processor speed. Language G enerations: Evolution of Programming Languages . First Generation . The first generation of languages was very difficult to understand and also to code

rimona
Download Presentation

The CPU

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The CPU The Central Presentation Unit Language Levels Fetch execute cycle Processor speed

  2. Language Generations:Evolution of Programming Languages

  3. First Generation • The first generation of languages was very difficult to understand and also to code • This language was based on machine code language, hence the programmer would need to use binary to create a program • For this particular generation, punched tape was used, where a hole would represent a 1 and no-hole meant a 0.

  4. 1st Generation traits • This generation was very fast as the computer would not need to translate the language but would understand it right away • It allows limited calculations such as simple arithmetic, logical operators, incrimination or decrementation and shift operations only • It cannot be run on another machine, unless it is identical

  5. Second Generation / Assembly Language • The second generation language, was also based on machine code, • This language was much easier as it used mnemonics (opcodes and operands) • Programming was much easier because the programmer does not have to remember a list of binary digits • Since this code is not in machine code an assembler is used to convert the code to binary

  6. Examples of Opcodes

  7. Third Generation / High-level Language • The third generation of languages was a very big improvement from the second generation • This generation incorporated the use of English-like statements • Since this language is coded in English-like statements a compiler or an interpreter is needed to translate the language to binary

  8. Compiler Vs. Interpreter The Compiler • Translates 3rd Generation languages • The code is translated all at once • Errors shown at the end of the translation • Fast translation The Interpreter • Translates 3rd Generation languages • The code is translated line by line • Errors are shown after each line is translated • Much slower translation

  9. Examples of the 3rd Generations • FORTRAN - mathematics formulas, scientific problems, engineering problems • COBOL – business oriented • BASIC – very easy to understand, ideal to learn programming • PASCAL – mostly used for teaching purposes • C – used to write operating systems, database management system, scientific applications • LISP – artificial intelligence • LOGO – teach children problem-solving and programming skills • C ++ - An improved C, very popular and powerful • JAVA – Very popular and powerful, also cross-platform

  10. Fourth Generation • The fourth generation language is much closer to the human language and is very fast to code • A typical example of the ease of use of 4th generation languages is the creation of a GUI. • To create a GUI in JAVA would be quite difficult because of the code required for each component, with 4GL creating it would be simply drag and drop

  11. Fifth Generation • Lastly we have the fifth generation languages, which are the closest to the human language • This generation is used in artificial intelligence

  12. The Fetch Execute CycleActions that a (CPU) performs to execute instruction

  13. What is the Fetch Execute Cycle? • The Fetch execute cycle is also sometimes know as the Fetch-decode-execute cycle • This cycle explains what goes on within the CPU when an instruction is being processed

  14. Abbreviations • CU = Control Unit • PC = Program Counter • IR = Instruction Register • ALU = Arithmetic Logic Unit • ACC = Accumilator

  15. The Fetch Execute Cycle • The CPU sends the value of the PC on the address bus. • The CPU fetches the instruction from main memoryalong the data bus into the IR • The data in the IR is decoded by the CU • The decoded information is sent to the relevant function units of the CPU (such as reading values from registers, passing them to the ALU, writing them to a certain register) • If there is another instruction the PC is incremented by 1and the cycle is repeated. If not the instruction set ends

  16. Note: When executing the instruction the following takes place: • Get data required from main memory • Place it in Data Registers • Activate correct circuits to work out instruction • Transfer results back to main memory. Start PC = Address of 1st Instruction Fetch Instruction from location found at PC Abbreviation: PC – Program Counter Store a copy of fetched Instruction into IR No PC = PC + 1 End of Program? Yes Execute Instruction End

  17. Assembly Code(Using the FEC) • This allows the user to input 2 numbers and display their total

  18. Processor Speed • The clock rate measures the number of instructions done by the CPU per second, this is measured in hertz. • When comparing the speeds of entire computers you need to look at • the clock rate of the RAM, • the width in bits of the CPU's buses • the amount of cache

  19. Clock Speed History • The original IBM PC,(1981),had a clock rate of 4.77 MHz (4,770,000 cycles/second) • In 1995, Intel's Pentium chip ran at 100 MHz (100 million cycles/second) • In 2002, an Intel Pentium 4 model has a clock rate of 3 GHz (three billion cycles/second)

More Related