Presentation is loading. Please wait.

Presentation is loading. Please wait.

Welcome Aboard – Chapter 1 COMP 2610 Dr. James Money COMP 2610 1.

Similar presentations


Presentation on theme: "Welcome Aboard – Chapter 1 COMP 2610 Dr. James Money COMP 2610 1."— Presentation transcript:

1 Welcome Aboard – Chapter 1 COMP 2610 Dr. James Money COMP 2610 1

2 Computer: electronic genius? ▫NO! Electronic idiot! ▫Does exactly what we tell it to, nothing more. Goal of the course: ▫You will be able to write programs in C and understand what’s going on underneath. Approach: ▫Build understanding from the bottom up. ▫Bits  Gates  Processor  Instructions  C Programming How We Will Get There 2 Dr. James Money COMP 2610

3 Abstraction ▫Allows us to be more productive  Can drive a car without knowing how the internal combustion engine works. ▫…until something goes wrong!  Where’s the dipstick? What’s a spark plug? Do you understand how a car works? ▫Important to understand the components and how they work together. Two Recurring Themes 3 Dr. James Money COMP 2610

4 Hardware vs. Software ▫Most people refer to themselves as one who specializes in hardware or software, but not both ▫You should take the opposite approach – it is good to know both and sometimes essential  Hardware engineers added MMX instructions for video when this did not exist yet  Sorting can be dependent on the underlying hardware ▫You are seen as more versatile if you know both Two Recurring Themes 4 Dr. James Money COMP 2610

5 Computer Systems 5 Dr. James Money COMP 2610 ca 1980 It took 10 of these boards to make a Central Processing Unit ca 2000 You can see why they called this CPU a microprocessor!

6 When we mention computer systems, most people do not only think of the CPU. It usually includes the keyboard, mouse, monitor, video card, hard drive, and so on We focus on the CPU and how it does what we want it to do Computer Systems 6 Dr. James Money COMP 2610

7 1.All computers, given enough time and memory, are capable of computing exactly the same things. They are Universal Computing Devices Two important concepts 7 Dr. James Money COMP 2610 == PDA Workstation Supercomputer

8 2.Problem Transformation ▫The ultimate objective is to transform a problem expressed in natural language into electrons running around a circuit! Two important concepts 8 Dr. James Money COMP 2610

9 Mathematical model of a device that can perform any computation – Alan Turing (1937) ▫ability to read/write symbols on an infinite “tape” ▫state transitions, based on current state and symbol Every computation can be performed by some Turing machine. (Turing’s thesis) Computers as Universal Computing Devices 9 Dr. James Money COMP 2610

10 Turing Machines 10 Dr. James Money COMP 2610 T add a,ba+b Turing machine that adds T mul a,bab Turing machine that multiplies For more info about Turing machines, see http://www.wikipedia.org/wiki/Turing_machine/ For more about Alan Turing, see http://www.turing.org.uk/turing/

11 Also known as a Universal Computational Device: a theoretical device that accepts both input data and instructions as to how to operate on the data Universal Turing Machine 11 Dr. James Money COMP 2610

12 U is programmable – just like a computer! instructions are the input data a computer can emulate a Universal Turing Machine A computer is a universal computing device. Computers as Universal Computing Devices 12 Dr. James Money COMP 2610

13 In theory, computer can compute anything that’s possible to compute given enough memory and time In practice, solving problems involves computing under constraints. ▫time  weather forecast, next frame of animation, etc ▫cost  cell phone, automotive engine controller, etc ▫power  cell phone, handheld video game, etc From Theory to Practice 13 Dr. James Money COMP 2610

14 Transformations between layers 14 Dr. James Money COMP 2610 Problems Language Microarchitecture Circuits Devices Algorithms Instruction Set Architecture

15 We describe the problem initially in natural language This is inefficient ▫There are ambiguities in the description normally ▫“Stir until soup is thick” has multiple meanings to different people We cannot have this ambiguity in computer programs We need precision Statement of Problem 15 Dr. James Money COMP 2610

16 In order to make the problem precise, we turn it into an algorithm This process is called software design ▫We choose algorithms and data structures An algorithm is a step by step procedure that is guaranteed to terminate such that each step is precisely stated and can be carried out by a computer. There are three terms for these properties. Algorithm 16 Dr. James Money COMP 2610

17 Definiteness – each step is precisely stated Effective Computability – each step can be carried out by a computer. For example, you cannot ask a computer to find the largest prime number. Finiteness – the algorithm terminates. Algorithm 17 Dr. James Money COMP 2610

18 There are many algorithms for each problems. There may be one with the fewest steps Others may allow concurrent computations Algorithm 18 Dr. James Money COMP 2610

19 We now using programming to convert the algorithm to a program Programming languages are precise and invented to specify a sequence of instructions to the computer Over 1000 languages There are two types of languages: ▫High level – C,C++,Pascal, Java ▫Low Level – Assembly, one language for each computer type Program 19 Dr. James Money COMP 2610

20 Next, by compiling, we convert the programming language into the instruct set of the computer, called the ISA The ISA specifies what instructions the computer can perform, what values it needs, and it’s results We use the term operand to describe the values the instruction needs The ISA specifies acceptable representations for operands called data types The ISA also specifies where the operands are located called the addressing modes Instruction Set Architecture(ISA) 20 Dr. James Money COMP 2610

21 Processor design results in the microarchitecture that runs the ISA The microarchitecture is the detailed particular implementations of the ISA There are many microarchitectures for each ISA ▫Intel, AMD for x86 ▫Different models of Intel chips Microarchitecture 21 Dr. James Money COMP 2610

22 We now implement the microarchitecture using simple logic circuits Here there is a cost tradeoff between cost and performance ▫NOT gates are cheaper than regular ones Many choices just for a simple case of addition This is called the logic circuit design phase Logic Circuit 22 Dr. James Money COMP 2610

23 Finally, process engineering and fabrication results in the devices used to build the logic circuits There might be CMOS, NMOS, and other types of circuits. Devices 23 Dr. James Money COMP 2610

24 Putting it together 24 Dr. James Money COMP 2610 Solve a system of equations Gaussian elimination Jacobi iteration Red-black SORMultigrid FORTRANCC++Java Intel x86PowerPCAtmel AVR CentrinoPentium 4Xeon Ripple-carry adderCarry-lookahead adder CMOSBipolarGaAs Tradeoffs: cost performance power (etc.)

25 Bits and Bytes ▫How do we represent information using electrical signals? Digital Logic ▫How do we build circuits to process information? Processor and Instruction Set ▫How do we build a processor out of logic elements? ▫What operations (instructions) will we implement? Assembly Language Programming ▫How do we use processor instructions to implement algorithms? ▫How do we write modular, reusable code? (subroutines) I/O, Traps, and Interrupts ▫How does processor communicate with outside world? C Programming ▫How do we write programs in C? ▫How do we implement high-level programming constructs? Course Outline 25 Dr. James Money COMP 2610


Download ppt "Welcome Aboard – Chapter 1 COMP 2610 Dr. James Money COMP 2610 1."

Similar presentations


Ads by Google