Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

The Role Of The Cpu

10,920 views

Published on

Published in: Technology
  • Be the first to comment

The Role Of The Cpu

  1. 1. Implementing Software Solutions The Role of the CPU
  2. 2. Syllabus <ul><li>The role of the CPU in the operation of software </li></ul><ul><ul><li>Machine code and CPU operation: </li></ul></ul><ul><ul><ul><li>Instruction format </li></ul></ul></ul><ul><ul><ul><li>Use of registers and accumulators </li></ul></ul></ul><ul><ul><ul><li>Use of program counters and the fetch execute cycle </li></ul></ul></ul><ul><ul><ul><li>Addresses called routines </li></ul></ul></ul><ul><ul><ul><li>Linking, including use of DLL’s </li></ul></ul></ul>
  3. 3. Why Does the CPU Do? <ul><li>Controls the transfer of data and instructions. </li></ul><ul><li>All the CPU does is run programs by fetching instructions from RAM, evaluating them, and executing them in sequence. </li></ul><ul><li>Known as the FETCH-EXECUTE-CYCLE </li></ul><ul><li>Responsible for detecting errors. </li></ul>
  4. 4. Machine Code <ul><li>It is the selected language of computer systems known as Binary . </li></ul><ul><li>It is translated by the CPU . </li></ul><ul><li>Each instruction (Binary Sequence) has TWO parts: </li></ul><ul><li>1001 101011011 1110 </li></ul>OPCODE OPERAND
  5. 5. Opcode/Operand <ul><li>Opcode – Is the instruction i.e COPY </li></ul><ul><li>Operand – Has two distinct parts: </li></ul><ul><ul><ul><li>Memeory Address </li></ul></ul></ul><ul><ul><ul><li>Data </li></ul></ul></ul>
  6. 6. Hierarchy of Execution Source Code Machine Code Opcode (Instruction) Operand (Memory Address) Operand (Data) Visual Basic Binary Assembly Language
  7. 7. Fetch-Execute-Cycle RAM ALU Control Unit Decode Execute Fetch Store
  8. 8. Fetch-Execute-Cycle <ul><li>Fetch (Where to Go?) </li></ul><ul><li>The next instruction is retrieved from primary storage. </li></ul><ul><li>Decode (What to do?) </li></ul><ul><li>The control unit decodes the instruction into an opcode (Instruction) and operand (Data). </li></ul><ul><li>Sent to the ALU. </li></ul>
  9. 9. Fetch-Execute-Cycle <ul><li>Execute (Carry out Instruction) </li></ul><ul><li>The ALU performs the instruction. </li></ul><ul><li>Store (Copy Results) </li></ul><ul><li>The control unit places the result of the execution in a register. </li></ul>
  10. 10. Activity 1 <ul><li>Instructions </li></ul><ul><li>LOAD 113 from mem469 and STORE in accumulator. </li></ul><ul><li>Load 214 from mem490 and STORE in accumulator. </li></ul><ul><li>ADD accumulator contents. </li></ul><ul><li>STORE accumulator in mem476. </li></ul><ul><li>Outline the steps with the fetch-execute cycle and their respective processes required in processing the above instructions. </li></ul>
  11. 11. Linking including Use of DLLs <ul><li>During execution the mainline of a program can call on subprograms to perform specific tasks. These include: </li></ul><ul><ul><ul><li>Subprograms written by the developer. </li></ul></ul></ul><ul><ul><ul><li>Subprograms included in the development structure of the programming language. These subprograms form part of a library and can be called upon without writing a specific subprogram. i.e. Randomize function. </li></ul></ul></ul><ul><ul><ul><li>Subprograms built into the operating system. i.e. save or print commands. </li></ul></ul></ul>
  12. 12. Linking including Use of DLLs <ul><li>Linker – Is part of the translation program that handles call and return processes from the mainline to subprograms. </li></ul><ul><li>DLLs – (Dynamic Link Libraries) are common files used in modern programming to reduce the need for multiple subprograms. DLLs can be called from many application and programs can use the same DLL. </li></ul>
  13. 13. Key Terms <ul><li>Machine Code </li></ul><ul><li>CPU </li></ul><ul><li>Processor </li></ul><ul><li>Flag </li></ul><ul><li>Register </li></ul><ul><li>ALU </li></ul><ul><li>Accumulator </li></ul><ul><li>Control Unit </li></ul><ul><li>Program counter </li></ul><ul><li>Buses </li></ul>

×