csc 110 fluency in information technology chapter 9 principles of computer operation n.
Skip this Video
Loading SlideShow in 5 Seconds..
CSC 110 – Fluency in Information Technology Chapter 9: Principles of Computer Operation PowerPoint Presentation
Download Presentation
CSC 110 – Fluency in Information Technology Chapter 9: Principles of Computer Operation

CSC 110 – Fluency in Information Technology Chapter 9: Principles of Computer Operation

477 Vues Download Presentation
Télécharger la présentation

CSC 110 – Fluency in Information Technology Chapter 9: Principles of Computer Operation

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. CSC 110 – Fluency in Information TechnologyChapter 9: Principles of Computer Operation Dr. Curry Guinn

  2. Today’s Class • The CPU • Is there free will? • Fetch-Execute Cycle

  3. The First Exam • Friday, October 3 • On the preceding Wednesday, I’ll review • I’ll tell you everything on the exam • Exam covers Chapters 1-11 • You may bring one 8 ½ X 11 sheet of paper to the exam as a “crutch” • You can put anything on that sheet • Front and back if you want • Tiny font, images, whatever your heart desires

  4. The CPU • Underneath it all, the CPU performs arithmetic using logic gates • But we don’t think about problems in that way • If I’m balancing my check book, I’m not thinking in terms of AND, XOR, NOT • I’m thinking ADD, SUBTRACT, COMPARE.

  5. All computers … • Utilize the Fetch/Execute cycle • Deterministic! • What does that mean?

  6. According to book … • Computers have no imagination or creativity. • Computers have no intuition. • Computers are literal, with no sense of irony, subtlety, proportion, or decorum. • Computers don’t joke or have a sense of humor. • Computer are not vindictive or cruel. • Computers are not purposeful. • Computer have no free will.

  7. He’s Right! • But can’t the same thing be said for a neuron in your brain? • Aren’t neurons deterministic? • If they are, then how can be people have free will? • Only the single most influential force behind modern Western philosophy.

  8. Descartes • “Animals are nothing more than unconscious machines. Lacking consciousness, they lack reason or language.” • “The bodies of animals and men act wholly like machines and move in accordance with purely mechanical laws.” Rene Descartes French Philosopher (1596 – 1650)

  9. Dualism vs. Materialism • Descartes proposed a theory of dualism • This theory is opposed to materialism. • Debate is open (Minsky, Dennett, Hofstadter, Johnson, Kurzweil, Dick)

  10. Ok, Back to the Deterministic Computer • In a digital computer, the CPU has • Access to memory elements by referring to addresses • A program counter which tells it the address of the current instruction to carry out • An instruction register to store the current instruction • An arithmetic logic unit (ALU) to carry out the instruction • Register(s) to store intermediate results

  11. The CPU and ALU The Arithmetic Logic Unit (ALU) carries out the Instruction in the Instruction Register. Program Counter Contains the address of the next instruction. Instruction Register Contains the current instruction to be executed. Registers for Temporary Values Contains results computed by the ALU after executing the last instruction.

  12. Memory Memory Address The location in memory Program in Memory Each simple command is stored in one address in memory. Working Memory The program may also read and write to other memory locations.

  13. CPU and Memory Memory Address Program in Memory Program Counter Instruction Register Memory Registers for Temporary Values

  14. Fetch/Execute • Looks at the program counter, fetches the next instruction from that address, executes it, repeat. • What instructions are out there? • Very basic • COPY to and from memory locations • ADD two numbers • SUBTRACT two numbers • MULTIPLY/DIVIDE two numbers • COMPARE two numbers (Equal (=), Greater than (>), Less than (<) • JUMP to different program counter

  15. Let’s Watch It • Downloading • Extract to a local directory (not temp) • Double click on tihacw.exe. • Ugly! It’s in DOS! • In the menu, under Software, choose Load Pascal Program. • Choose example1.pas.

  16. First We Have to Compile • Compile? What’s that? • Pascal is an example of a high-level programming language • It allows us to think more abstractly than just ADD, COPY, JUMP • We can use variable names rather than refer to memory addresses • Other high-level languages include FORTRAN (1957!), COBOL (1959!), C (1978), C++ (1986), Java (1991), JavaScript (1994)

  17. Compilation • The computer must convert the high-level language (like Pascal) to Assembly Language • There are standard rules for following out this compilation • Our example program converts from Pascal to Assembly Language

  18. Some Example Program Executions

  19. … And now for the Lab • Now, you download “This Is How A Computer Works” to your lab machine • Here’s the .zip file: • Once you download it, extract it to some directory on your machine. • Go to that directory in explorer and open tihacw.exe.

  20. Opening a Pascal File • On the menu, choose Software – Load Pascal Program. • Select example1.pas. • Now you need to compile it. • You can set the speed at which the animations run. Look under Options. • Choose Compile. Compile Step will compile it one line at a time.

  21. Running the program • Choose Hardware – Execute. • You can execute one cycle at a time. This is the best way to watch it.

  22. Try example2.pas and example3.pas • Either quit the program and restart • Or • Just choose Load Pascal Program under the Software menu. • Repeat the steps you performed for example1.pas.

  23. Modifying example1.pas • Using notepad, edit example1.pas and change the values and/or the mathematical equation. • In other words, make the program do something different.

  24. Wrap-up • Homework • Your circuit design due 09/25. • Begin preparing your “crutch” for the exam • 6th Homework: Ch10 & Ch11 questions, due 11:59pm 09/23