1 / 31

The Nature of Computing

The Nature of Computing. INEL 4206 – Microprocessors Lecture 2 Bienvenido V é lez Ph. D. School of Engineering University of Puerto Rico - Mayag ü ez. Some Inaccurate (Although Popular) Perceptions of Computing. Computing = (Electronic) Computers Computing = Programming

bin
Download Presentation

The Nature of Computing

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 Nature of Computing INEL 4206 – Microprocessors Lecture 2 Bienvenido Vélez Ph. D. School of Engineering University of Puerto Rico - Mayagüez

  2. Some Inaccurate (Although Popular) Perceptions of Computing • Computing = (Electronic) Computers • Computing = Programming • Computing = Software INEL 4206 - Microprocessors - Spring 2003

  3. A.K.A. The Computing Device View of Computing Computing = Computers Computing is about solving problems using computers INEL 4206 - Microprocessors - Spring 2003

  4. A.K.A. The Programming Language view of Computing Computing = Programming Computing is about writing programs for computers INEL 4206 - Microprocessors - Spring 2003

  5. A.K.A. The “Floppy Disk” view of Computing Computing = Software Computing is not concerned with hardware design INEL 4206 - Microprocessors - Spring 2003

  6. Outline • What is Computing? • Computing Models and Computability • Interpretation and Universal Computers • Abstraction and Building Blocks INEL 4206 - Microprocessors - Spring 2003

  7. What is computing then? Algorithmic Computation Function Input Information Output Information Computing is the study of Computation: the process oftransforming information INEL 4206 - Microprocessors - Spring 2003

  8. encode compute decode 011011001010100101… 011011001010100101… Problem Solution The Computation Process INEL 4206 - Microprocessors - Spring 2003

  9. Fundamental Questions Addressed by the Discipline of Computing • What is the nature of computation? • What can be computed? • What can be computed efficiently? • How to build practical computing devices? INEL 4206 - Microprocessors - Spring 2003

  10. encode compute decode 011011001010100101… 011011001010100101… Problem Solution Integer Integer Integer Function Computers as Integer Functions INEL 4206 - Microprocessors - Spring 2003

  11. IF ≠ CF All Integer Functions (IF) Halting Problem Computability IF ≟ CF Computable Integer Functions (CF) INEL 4206 - Microprocessors - Spring 2003

  12. The Halting Problem(Alan Turing 1936) Given a program P and an input I to Pdetermine if P stops on I Computer Program P P Halts on I? Input I We cannot build this machine … period INEL 4206 - Microprocessors - Spring 2003

  13. All Integer Functions (IF) We want to formally describe the set of computable functions. BUT HOW??? Halting Problem Computability IF ≠ CF IF ≟ CF Computable Integer Functions (CF) INEL 4206 - Microprocessors - Spring 2003

  14. Mathematical Computers:The Turing Machine (1936) 0 1 Infinite I/O TAPE Tape Head 0/{0,R} 0 1 FSM 1/{1,L} Alan Turing Turing demonstrated how to solve several problems using his LCM computing model INEL 4206 - Microprocessors - Spring 2003

  15. Mathematical Computers:The Turing Machine (1936) 0 1 Infinite I/O TAPE Tape Head 0/{0,R} 0 1 FSM 1/{1,L} Alan Turing Turing demonstrated how to solve several problems using his LCM computing model INEL 4206 - Microprocessors - Spring 2003

  16. A TM Machine Recognizing anbn Rutgers Turing Machine Example http://www.rci.rutgers.edu/~cfs/472_html/TM/anbnTM.html INEL 4206 - Microprocessors - Spring 2003

  17. Cannot build this … period The Halting Problem Proof Sketch (Blackboard) Given a program P and an input I to Pdetermine if P stops on I Computer Program P P Halts on I? Input I INEL 4206 - Microprocessors - Spring 2003

  18. FSM FSM FSM FSM FSM Sorting TM Sorting TM Sorting TM Sorting TM Searching TM FSM Integrating TM Ad-hoc Turing Machines We know we can build TM’s to solve many interesting problems. But building a TM is a lot of work Can we build ONE general purpose TM? INEL 4206 - Microprocessors - Spring 2003

  19. Software • just bits • weightless • effective • computing • models • Hardware • heavy • expensive • cumbersome • computing • model The Universal Turing Machine (UTM)The Paradigm for Modern General Purpose Computers Encoded TM M Encoded Tape for M Universal TM • Capable of Emulating Every other TM • Shown computable by Alan Turing (1936) BIG IDEAS:INTERPRETATION & PROGRAMMABILITY!!! INEL 4206 - Microprocessors - Spring 2003

  20. Other Familiar Models of Computation • Combinational Circuits • Sequential Circuits (FSM’s) • Pentium Instruction Set Architecture • Lambda Calculus • Recursive Functions • C, C++, Java, C#, etc… Can you tell which ones areTuring Universal, or which ones can emulate any other Turing Machine? INEL 4206 - Microprocessors - Spring 2003

  21. Church’s Thesis “Any realizable computing device can be simulated by a Turing machine” “All the models of computation yet developed, and all those that may be developed in the future, are equivalent in power.” Alonso Church Issues not considered: Size, Programmability, Performance But they must be considered if one is to build … INEL 4206 - Microprocessors - Spring 2003

  22. ALU status control Practical Universal Computers(John) Von Neumann Architecture (1945) Memory CPU Program DataPaths AC This looks just like a TM Tape PC Data ABR Control Unit (FSM) CPU is a universal TM An interpreter of some programming language (PL) INEL 4206 - Microprocessors - Spring 2003

  23. All have embedded PL’s Multiple Coexisting Levels of Interpretation Computing in Perspective PSpice Excel MatLab Build Many Pascal C++ Fortran Assembler 1 Assembler 2 Assembler 3 ISA FSM Build One Gate CMOS Programming is the art/science of encoding algorithms INEL 4206 - Microprocessors - Spring 2003

  24. Computing in Perspective people Computer Human Interaction, User Interfaces CS1/CS2, Programming, Data Structures INEL 4206 Programming Languages, Compilers Computer Architecture Each abstraction layer implements an INTERPRETER of some computing/programming model computers People INEL 4206 - Microprocessors - Spring 2003

  25. Because we know of no other way of doing anything Why Abstraction Layers? • Resilience to change: • Each layer provides a level of indirection • Divide and Conquer Approach: • Can work on one small semantic gap at a time • Building Block Approach: • Can build many higher layer on same lower layer INEL 4206 - Microprocessors - Spring 2003

  26. Hardware Building Blocks A B A sel O SEL B O A 2-1 multiplexer Gate-Level Logic Provides a Computing Model INEL 4206 - Microprocessors - Spring 2003

  27. Software Building Blocks The function is one of the most ubiquitous abstraction tools // MUX – Implements a 2-1 binary multiplexer bool MUX(bool a, bool b, bool sel) { switch(sel) { case 0: return a; break; case 1: return b; break; } } Other abstraction tools include: structures, classes, modules INEL 4206 - Microprocessors - Spring 2003

  28. What Makes a Good Building Block • Provides a clear and simple contract • The contract hides irrelevant detail • The contract is general and orthogonal • The contract is easy to remember INEL 4206 - Microprocessors - Spring 2003

  29. Some Properties of a Good Programming Language • Does not hide expressive power of lower layers • Can be efficiently interpreted • Provides adequate higher level abstractions • Provides a variety of constructs for creating new abstractions, layers and modules • Achieves all of the above with minimal complexity INEL 4206 - Microprocessors - Spring 2003

  30. Summary • Computing = Information Transformation • Information Transformation = Integer Functions • Some integer functions are not computable • Turing Machine computations = All computations • Universal Computer = Universal TM • Interpretation => Programmability => Flexibility • Building blocks are abstract contracts INEL 4206 - Microprocessors - Spring 2003

  31. Summary "Computer Science is no more about computers than Astronomy is about telescopes" E. W. Dijkstra 1930-2002 1972 Turing Award INEL 4206 - Microprocessors - Spring 2003

More Related