1
play

1 How How do do we get the electrons to do the work? we get the - PDF document

CS 240 CS 240 Computer Science I Computer Science I Acknowledgements: These slides were created by Dr. Travis Doom with information, graphics, materials, or aid kindly provided by Dr. Matt Rizki, Gaddiss Starting Out with Java


  1. CS 240 – CS 240 – Computer Science I Computer Science I Acknowledgements: These slides were created by Dr. Travis Doom with information, graphics, materials, or aid kindly provided by Dr. Matt Rizki, Gaddis’s “Starting Out with Java” (Addison Wesley), Patt’s “Introduction to computers” and McConnell’s “Code Complete”.. Wright State University, College of Engineering CS 240 1 Dr. T. Doom, Computer Science & Engineering Computer Science I An engineer’s introduction An engineer’s introduction to abstraction and the digital computer to abstraction and the digital computer The modern general purpose digital computer Abstraction/Encapsulation Design decomposition What What is is a computer? a computer? � What is computation? � There are many sorts of computing devices, they fall into two categories: – Analog: machines that produce an answer that measures some continuous physical property such as distance, light intensity, or voltage. Examples? – Digital: machines that perform computations by manipulating a fixed finite set of elements. Examples? – The difficulty with analog devices is that it is very hard to increase their accuracy The difficulty with analog devices is that it is very hard to increase their accuracy. � Before modern digital computers, the most common digital machines were adding machines. – Adding machines perform exactly one sort of operation. � General purpose digital computers also perform one operation… – Modern computers accept a set of instructions that tell it how to do any sort of computation. � We now make a clear distinction between “calculators” and “computers” Wright State University, College of Engineering CS 240 3 Dr. T. Doom, Computer Science & Engineering Computer Science I 1

  2. How How do do we get the electrons to do the work? we get the electrons to do the work? We describe our problems in English or some other natural language. Computer � problems are solved by electrons flowing around inside the computer. � It is necessary to transform our problem from a natural language to the voltages that influence the flow of electrons. � This transformation is really a sequence of systematic transformations, developed and improved over the last 50 years, which combine to give the computer the ability to carry out what may appear to be very complicated tasks. t th bilit t t h t t b li t d t k In reality, these tasks must decomposed into a number of simple and straight- forward subtasks. Engineering design � – Top down design – Decomposition into smaller problems (Divide and Conquer!) – Levels of Abstraction Wright State University, College of Engineering CS 240 4 Dr. T. Doom, Computer Science & Engineering Computer Science I The principle of design abstraction The principle of design abstraction � General model for Engineering (Byrne, 1992) Alteration Con- Reverse Con- Forward re-think ceptual Engineering ceptual Engineering Abstraction Refinement f re-specify if Requirements Requirements re-design Design Design re-build Implementation Implementation Existing System Target System Wright State University, College of Engineering CS 240 5 Dr. T. Doom, Computer Science & Engineering Computer Science I Levels of abstraction in digital computation Levels of abstraction in digital computation � Design Process The Problem CS 24x, 4xx Computer Science Software level Algorithm & Language CEG 320 Computer Engineering Hardware level ISA & Microarchitecture CEG 260/360 Computer/Elect. Engineering Logic level Circuits & Devices Wright State University, College of Engineering CS 240 6 Dr. T. Doom, Computer Science & Engineering Computer Science I 2

  3. The statement of the problem The statement of the problem � We describe problems that we wish to solve The Problem with a computer in a “natural language.” � Natural languages are fraught with a lot of things unacceptable for providing instructions to a computer. Algorithm & Language � The most important of these unacceptable � The most important of these unacceptable attributes is ambiguity. To infer the meaning of a sentence, a listener is often helped by context that the computer does not have. ISA & Microarchitecture – “Mary had a little lamb and other nursery rhymes.” � A computer can not deal with any ambiguity, thus… Circuits & Devices Wright State University, College of Engineering CS 240 7 Dr. T. Doom, Computer Science & Engineering Computer Science I The algorithm The algorithm � The first step in the sequence of transformations The Problem is to transform the natural language description of the problem to an algorithm. � An algorithm is a step-by-step procedure: – That transforms an input (possibly NULL) into Algorithm & Language some output (or output action) – That is guaranteed to terminate That is guaranteed to terminate � Definiteness : Each step is precisely stated. � Effective computability : Each step must be ISA & Microarchitecture something the computer can perform � Finiteness : The procedure must terminate/repeat � For any computable problem, there are an infinite number of algorithms to solve it. Circuits & Devices – Which solution is best? Wright State University, College of Engineering CS 240 8 Dr. T. Doom, Computer Science & Engineering Computer Science I Exponential growth Exponential growth � 10^1 � 10^2 � 10^3 Number of students in the college of engineering � 10^4 Number of students enrolled at Wright State University � 10^6 Number of people in Dayton � 10 8 Number of people in Ohio � 10^8 Number of people in Ohio � 10^10 Number of stars in the galaxy � 10^20 Total number of all stars in the universe � 10^80 Total number of particles in the universe � 10^100 << Number of possible solutions to traveling salesman (100) � Travelling salesman (100) is computable but it is NOT feasible. Wright State University, College of Engineering CS 240 9 Dr. T. Doom, Computer Science & Engineering Computer Science I 3

  4. The programming language The programming language � The next step is to transform the algorithm into The Problem a computer program � Programming languages are unambiguous “mechanical” languages � There are two kinds of programming Algorithm & Language languages: languages: – High-level languages are machine independent. They are “far above” the (underlying) computer – Low-level languages are machine dependent. ISA & Microarchitecture They are tied to the computer on which the program will execute. There is generally only one such language per machine (referred to as its ASSEMBLY language). Circuits & Devices Wright State University, College of Engineering CS 240 10 Dr. T. Doom, Computer Science & Engineering Computer Science I How do we specify the program? How do we specify the program? � Contemporary languages – Java, C++, C, C#, Perl, Python, Ruby, and many more. � Languages of yore – Fortran, COBOL, and many more. � Specialty languages – VHDL, simulation languages, and many more. g g y � There are over 1,000 “standardized” programming languages today. � The only goal of these languages is to help humans implement their algorithms in the instructions available for a particular ISA – This is what we mean when we say “programming” Wright State University, College of Engineering CS 240 11 Dr. T. Doom, Computer Science & Engineering Computer Science I Universal computing devices Universal computing devices Turing’s Thesis : Computer scientists believe that ANYTHING that can be � computed by a general purpose computer can be computed by any general purpose computer (provided that it has enough time and enough memory). What does this imply? � – All computers (from the least expensive to the most expensive) are capable of computing EXACTLY the same things IF they are given enough time and enough memory. – Some computers can do things faster, but none can do more than any other computer. – All computers can do exactly the same things! � Thus, any given problem is either computable or it is not computable – Problems may be computable, but still not feasible (NPC) Wright State University, College of Engineering CS 240 12 Dr. T. Doom, Computer Science & Engineering Computer Science I 4

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend