Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction Dr. Entesar Ganash. 1.Fundamentals of computer programming Central Processor Unit Main Memory Backing Store OutputInput 1.1 What is a computer?

Similar presentations


Presentation on theme: "Introduction Dr. Entesar Ganash. 1.Fundamentals of computer programming Central Processor Unit Main Memory Backing Store OutputInput 1.1 What is a computer?"— Presentation transcript:

1 Introduction Dr. Entesar Ganash

2 1.Fundamentals of computer programming Central Processor Unit Main Memory Backing Store OutputInput 1.1 What is a computer?

3 Main Memory (Random Access memory (RAM): a set of device in which information ( program instruction or data ) may be store. Central Processor unit (CPU): performs the processes and consists of a control unit and arithmetic unit. Out put device: allows user to get information such as a display screen and printer Input device: allows user to put information such as a keyboard Backing store (Disc drive): magnetic media used by all computers to allow programs and data to be stored in a permanent fashion in the all computer system, such as hard or floppy discs.

4 1.2 A Computer System Hardware is the physical medium Such as keyboard, circuit boards and processors. Software could be computer programs Such as a Fortran program, an operating system and a compiler.

5 1.3 Computer Programs Computers deal with a binary digit (or bit). Bit is the basic unit of information in a computer. It has 0 or 1 value or ( off or on), for example is called 4 in binary system (HOW?). Each place is known as a bit. A byte is the amount of computer memory required for one character and 1 byte= 8 bits BUT decimal system is one hundred. A programming language is the particular set of rules for coding the instructions to a computer. There are many different languages as Fortran, Basic, C, C++, Ada, Pascal and so on. These are known “high level” languages because a method of programming allowed a user to write programs without requires knowledge of computer details itself. Program name.EXE  refers to the execution of program

6 File is a single unit of program or data. each programming language has a very specific Syntax, for example File name.For File name.F90 File name.Bas File name.Cpp As the computers just understand a binary digits, An executable program which runs on CPU must still be represent by this digits. So, the high level program is complied (i.e, translated) by using a compiler that is special part of software. The compilers understand other programs as input and produce a binary executable object file as output. So, object file has the language which is understood by computer

7 What are general steps to solve any computational problem? Problem Statement: Understanding this can be made the Execution and improvement much easy. Solution Algorithm: How will the problem be solved? Execution: Breaking the algorithm into small parts. This can be managed the problem and made its solution easy, then putting all the parts together to solve the main problem. confirmation: Checking the execution solves the main problem.

8 What is FORTRAN? Fortran has been abbreviated to FOR mula TRANslation. It was the first “high level” programming language. Often Scientists and engineers have used it. In late 1953, John Backus proposed The idea of Fortran In 1966 the first standard for a programming language: Fortran 66 In 1978: A new standard, Fortran 77 In 1991: Fortran 90 came out Then Fortran 95/2003/2008 NOTE: in each new revision the basic language does not change. But improvement and some new features are added.

9 Why learn FORTRAN? Fortran is vey useful for scientific computing as it has more intrinsic mathematical functions and multitalented array features such as functions on vectors, matrices and higher dimensional array. Fortran is extensively used programming language in physics science therefore, all physics student should have at least a basic information of it.

10 Overview in FORTRAN Start  programs  Plato IDE  File  New  Free Format Fortran File  Open

11 FORTRAN Toolbar

12 1. Each student will make a new folder on the Desktop of computer and call it as your name. 2. Inside this folder you will make another new folder and call it as lab number, for example lab 1, lab 2 and so on 3. File  Save as  chose Desktop on the left  your folder name  lab NO folder  file name  Save NOTE : In step 3:you can save your file in any place but it is very important to know the path of your file (where is the file) you will see the file name( Example.f95 ) on Title bar FORTRAN Toolbar

13 1. Write your own code 2. File  Save very important after any change in your code Example.f95* before save Example.f95 and after save is changed 3. Build  Build  compile  start Run

14 Compiling i.e, translating. Linking i.e, connect all required files together to solve a problem The path direction.EXE This is step Build  Build

15 Compile i.e., we translate to the computer language and check errors This is step Build  compile

16 Start Run i.e., Make all required work and the results will be given. Press ENTER key to close the black window. In out side we found some fiels as File name.f95 File name.obj File name application = File name.EXE This is step Build  start run

17 References Ellis, T.M.R., 1990, Fortran 77 Programming with an introduction to Fortran 90 standard (2nd Ed.), Addison.Wesley Publishing Company CH1 Hahn, B.D., 1994, Fortran 90 For Scientists and Engineers, Elsevier Fortran 90 Course Nantes, 1997, University of Liverpool, AC Mrshall with help from JS Morgan & JL Schonfelder http://scc.ustc.edu.cn/zlsc/cxyy/200910/W020100308600942099665.pdf Brief Introduction to the Fortran 90 programming language, Fall2013,, Boston University, Anders W. Sandvik, Department of Physics http://physics.bu.edu/py502/lectures1/f90.pdf Fortran 90/95 and ComputationalPhysics, University of Iceland, Jens Hjörleifur Bárðarson http://www.raunvis.hi.is/~jensba/tolvuedl_h2003/f90.pdf MITOPEN COURSEWARE http://ocw.mit.edu/courses/earth-atmospheric-and-planetary-sciences/12-010- computational-methods-of-scientific-programming-fall-2011/lecture-notes/


Download ppt "Introduction Dr. Entesar Ganash. 1.Fundamentals of computer programming Central Processor Unit Main Memory Backing Store OutputInput 1.1 What is a computer?"

Similar presentations


Ads by Google