Presentation is loading. Please wait.

Presentation is loading. Please wait.

ICS 101 – Introduction to Computer Programming I Putu Danu Raharja Information & Computer Science Department CCSE - King Fahd University.

Similar presentations


Presentation on theme: "ICS 101 – Introduction to Computer Programming I Putu Danu Raharja Information & Computer Science Department CCSE - King Fahd University."— Presentation transcript:

1 ICS 101 – Introduction to Computer Programming I Putu Danu Raharja raharja @kfupm.edu.sa Information & Computer Science Department CCSE - King Fahd University of Petroleum & Minerals Copyright Ahmad Ridha 2007

2 ICS101 Term 0632 Instructor Name: I Putu Danu Raharja E-mail: raharja @kfupm.edu.sa Office: Building 23 Room 062 Phone: 4027 Office hours: SUMT 13:00 – 14:00

3 ICS101 Term 0633 Lab Schedule SUMT, 14.10 – 17.10 pm (15 minutes break for prayer time) Building 14 Room 256

4 ICS101 Term 0634 Course Description An overview of the computer system, its main components and their functions. Programming in FORTRAN 77 with emphasis on a modular and structured problem solving approach that includes program coding, algorithm design, debugging and testing. Various programming problems will be illustrated as examples in the class.

5 ICS101 Term 0635 Textbook Introduction to Computer Programming using FORTRAN 77, Second Edition by Al-Dhaher, et, al. KFUPM Press, 1995. If you haven't got it, get it from the Bookstore as soon as possible.

6 ICS101 Term 0636 Grading Policy LAB WORK(13%) Attendance, seriousness, activity, and aptitude. LAB QUIZZES (12%) Three quizzes. Neither makeup Labs nor quizzes are allowed.

7 ICS101 Term 0637 General Lab Objectives Lab work is given to provide an opportunity for students to exercise programming Be active in class and lab discussion Home-works will be given as exercises for the quizzes Practice!!! Practice!!! Practice!!!

8 ICS101 Term 0638 Major Concepts in the Course Description Computer Components Functions Programming Fortran 77 Algorithm Coding Testing Debugging

9 ICS101 Term 0639 What is a Computer? A computer is an electronic device that accepts input, processes it according to a series of instructions (called computer programs or software), and produces output.

10 ICS101 Term 06310 What is a Computer System? A complete computer system consists of four parts 1.Hardware 2.Software 3.Users 4.Data

11 ICS101 Term 06311 Hardware The physical devices that make up the computer are called hardware A computer’s hardware consists of interconnected electronic devices Computer hardware illustration Next slide

12 ICS101 Term 06312 Hardware Illustration

13 ICS101 Term 06313 Main Components Main categories of computer hardware are Processor Memory (also called main memory or primary memory Storage ( also called secondary memory) Input/output devices

14 ICS101 Term 06314 Processor What are the examples of CPUs? Also known as processor Can a computer work with a CPU? The heart of a computer system Performs the execution of instructions given Uses the data stored in the memory

15 ICS101 Term 06315 Processors (cont.)

16 ICS101 Term 06316 Processor (cont.) A processor consists of three functional units Arithmetic Logic Unit (ALU) - -- performs arithmetic operations such as addition and subtraction. Registers --- hold data that is being processed by the ALU Control Unit (CU) --- fetches each instruction from the memory and instructs the ALU to process it Instruction cycle Execution of each instruction consists of 4 steps: 1.Fetch 2.Decode 3.Execute 4.Store Processor speed is measured in MegaHertz (MHz) --- one million instruction cycles per second GigaHertz (GHz) --- one billion instruction cycles per second

17 ICS101 Term 06317 Memory Memory of a computer is hardware that is used to store programs and data There are many types of memory. RAM (random Access Memory) ROM (Read Only Memory) Cache memory The most common type of memory is the Random Access Memory (RAM)

18 ICS101 Term 06318 Random Access Memory (RAM) Data can be both written to and read from the memory. It is important to note that the RAM is volatile Size of RAM determines a computer’s speed and power The more RAM a computer has, the more data and programs it can store and it can perform tasks faster.

19 ICS101 Term 06319 Storage A computer needs a place to store program files and related data when they are not in use. Storage is used to store programs and data permanently Storage is similar to electronic file cabinet There is more space in storage than in memory. Contents are retained in storage when the computer is turned off. Storage is very slow when compared to the memory Storage is cheaper than the memory.

20 ICS101 Term 06320 Storage (cont.) Two components of storage are Device and medium Hard disk drive and hard disk Diskette drive and Diskettes or floppy disks CD-ROM drive and Compact disks (CDs) Compact Disk-Read-Only Memory (CD-ROM) CD-Recordable (CD-R) CD-Rewritable (CD-RW) DVD (Digital Video Disk) player and DVD USB flash drive

21 ICS101 Term 06321 Software An ordered set of instructions to solve a problem in finite steps. Two categories of software System software Programs primarily for the computer’s use, helping it to perform tasks and manage its own resources like operating systems, network management systems, device drivers, compilers Application software Programs developed for the users, enabling them to perform tasks such as word processors, library systems, Student Information System (SIS) at KFUPM

22 ICS101 Term 06322 Programming Languages How is it to tell the computers what to do? Can we speak directly to the computers? Computers speak in binary What number system do we usually use? Programming languages Standards (what is the standard for human language?)

23 ICS101 Term 06323 FORTRAN One of the earliest programming languages Since 1954 and still widely used Latest standard: Fortran 2003 We will learn Fortran77 (a widely used standard) See: http://www.levenez.com/lang/history.html

24 ICS101 Term 06324 Let’s start the show! Open Microsoft Developer Studio Open My Computer Double-click C Drive Double-click MSDEV folder Double-click BIN folder Double-click MSDEV file

25 ICS101 Term 06325 Creating a simple program Create a text file File → New... → Text File Save the file File → Save As... Type the name of the file (lab0) +.for extension to tell the MSDEV that it is a Fortran program You should see a green mark in the file

26 ICS101 Term 06326 A Very Simple Print Program After the green mark type: PRINT *, 'ICS 101 LAB WORK' END

27 ICS101 Term 06327 Running A Program Compile the program Build → Compile Lab0.for Build the executable Build → Build Proj0.exe Execute the executable Build → Execute Proj0.exe


Download ppt "ICS 101 – Introduction to Computer Programming I Putu Danu Raharja Information & Computer Science Department CCSE - King Fahd University."

Similar presentations


Ads by Google