Presentation is loading. Please wait.

Presentation is loading. Please wait.

Course Overview. What are Computers? From Outside –CPU box, Monitor, Keyboard, mouse and Printers From inside –ICs, Chipsets, Hard Disks, PCB cards, Drives,

Similar presentations


Presentation on theme: "Course Overview. What are Computers? From Outside –CPU box, Monitor, Keyboard, mouse and Printers From inside –ICs, Chipsets, Hard Disks, PCB cards, Drives,"— Presentation transcript:

1 Course Overview

2 What are Computers? From Outside –CPU box, Monitor, Keyboard, mouse and Printers From inside –ICs, Chipsets, Hard Disks, PCB cards, Drives, Buses –All the above are called Computer Hardware –The physical engine that solves problems

3 Programmability Unique feature of Computers raw HW can not do anything on its own needs programs or software to do things Same hardware can be configured to do a variety of functions Programs provide this ability `run' or `execute' the program in the machine for this

4 What are Programs Sequence of precise instructions or commands tell the HW to read input, to compute simple arithmetic functions and to print outputs etc. Control HW to compute a variety of tasks It is the programs that provide the rich problem solving abilities Programming Main focus of this course

5 Low-level Programming Programs that can run in a computer are low-level, Instructions are simple arithmetic and logical operation on binary numbers (sequences of 0 and 1) specific to the machine and will not run in other machines called as machine programs (assembly programs) very difficult to write and understand, error prone for most common applications not necessary Example mov R1,R2– move the value from R1 to R2 add R2,R3,R4– add R2 and R3 and store it in R4 sto R4, #010110– store R4 in memory

6 High-level programming Instructions are complex operations on a variety of data objects programs are independent of machines closer to problem domain resembles natural language statements easier to write, debug and understand This is the focus of this course Examples –compute the interest for six months of Mr. Sachin's Savings a/c –book a tkt. for Rahul from Mumbai to Bangalore –Switch on the alarm when belt not fastened

7 Translators/Compilers High level programs can not run directly on computers need to be translated to low level instructions compilers do this job compilers are themselves programs - system programs CS students learn how to write compiler software

8 Operating Systems Compilers alone are not enough Other programs required for executing application programs – Operating Systems Provides a high level view of hardware Efficient utilization of resources various utility functions, like reading inputs, printing, etc. UNIX, Windows, SunOS, Solaris, GNU/Linux

9 A Simplified Picture Hard Ware Application Cmd. Interpreter Compilers, Editors OS System Programs

10 OS is the boss OS gateway to the machine All interaction through the OS OS is in control always Safety, Security and Efficiency Watches for inputs (mouse,keyboard) and provides appropriate responses –Giving login Prompts, –Reading user name and passwords –Allows or rejects Runs the command line interpreter (window manager)

11 The Shell The command line interface is called shell Various versions of shell –C-shell, Bash, etc. After login, user commands are interpreted by the shell and appropriate OS commands are executed User commands to create/remove, edit files, compile and execute programs etc. When a user command is executed, there is a momentary transfer of control After execution, control is transferred back

12 Programming Languages Program instructions should be precise enough to be understood by machines or other programs Compilers and Raw HW are dumb need precise syntactic rules and a unique semantics Programming languages define these rules and semantics Hundreds of languages - FORTRAN, Algol 60, PASCAL, BASIC, C, C++, Java,

13 Fortran We teach FORTRAN First High Level Language (1954 – 57) John Bachus (IBM), got Turing Award Revolutionary Step Grand father of all modern PL Name derived from Formula translation Simple idea: Mathematical formulae are high level descriptions of computations

14 Evolution of Fortran Original Fortran very primitive, restrictive and small It has evolved over the years –Fortran II –Fortran IV –Fortran 66, Fortran 77 –Fortran 90, Fortran 95 Fortran 90 compares with all modern languages We will use FORTRAN 90 So, this is a course on Programming in Fortran 90

15 Why Fortran Efficient compilers exist Oldest and widely used Large base of utilities and programs It has all modern features Fortran 90 is just a choice Self-learning of Programming in C, Java or any PL possible after this

16 Main Focus Problem solving using computers Fortran for concreteness Exercises in programming in a HLL All languages, at your level, are equivalent Obtaining a solution is more difficult Representing solution in a PL require mastery over the language and comes with practice


Download ppt "Course Overview. What are Computers? From Outside –CPU box, Monitor, Keyboard, mouse and Printers From inside –ICs, Chipsets, Hard Disks, PCB cards, Drives,"

Similar presentations


Ads by Google