Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 CSC 1401 S1 Computer Programming I Hamid Harroud School of Science and Engineering, Akhawayn University

Similar presentations


Presentation on theme: "1 CSC 1401 S1 Computer Programming I Hamid Harroud School of Science and Engineering, Akhawayn University"— Presentation transcript:

1 1 CSC 1401 S1 Computer Programming I Hamid Harroud School of Science and Engineering, Akhawayn University h.harroud@aui.ma http://www.aui.ma/~H.Harroud/CSC1401 Spring 2009

2 Lecture 1: Introduction Overview of Computers and Programming Lecture 1

3 Lecture 1: Introduction 3 Objectives Overview of the development of computers. Computer system components. Software categories and languages. Process of writing, compiling, and executing high-level language programs.

4 Lecture 1: Introduction 4 What Is Computing Science? Is the study of the theoretical foundations of information and computation and their implementation and application in computer systems.

5 Lecture 1: Introduction 5 Fields of computing science Algorithms and data structures Programming languages and compilers Concurrent, parallel, and distributed systems Software engineering System architecture Theory of computation Communications Databases Artificial intelligence Visual rendering (or Computer graphics) Human-Computer Interaction Scientific computing

6 Lecture 1: Introduction 6 What Is a Computer? A machine that can be programmed to receive data, store it and process it into information. Data: raw facts representing people and events Information: data that is organized, meaningful, and useful

7 Lecture 1: Introduction 7 Fundamental Characteristics Speed Reliability Storage Capability

8 Lecture 1: Introduction 8 Computer System Components Hardware Equipment associated with the system Software Instructions that tell the hardware what to do People Computer programmer: writes software User: purchases and uses software Often called end-user

9 Lecture 1: Introduction 9 Computer Components Memory: Main Memory Secondary Storage CPU I/O devices

10 Lecture 1: Introduction 10 Central Processing Unit (CPU) The CPU has two roles: Coordinating all computer operations Performing arithmetic and logical operations in data The processor above can execute a simple instruction such as an integer addition in one six- billionth of a second.

11 Lecture 1: Introduction 11 The Machine Cycle The time required to retrieve, execute, and store an operation

12 Lecture 1: Introduction 12 Memory Memory cells Address Contents Main Memory Random Access Memory Read-Only access Memory Secondary Memory CD, DVD, etc.

13 Lecture 1: Introduction 13 Memory Units 1 Memory Cell = 1 or more Bytes 1 Byte = 8 Bits (Binary Digit) A Bit is either a 0 or a 1 Units for measuring the memory capacity: KB: Kilo Byte = 2 10 = 1024  1000 Byte MB: Mega Byte = 2 20  1 million Byte GB: Gega Byte = 2 30  1 billion Byte TB: Tera Byte = 2 40  1 trillion Byte

14 Lecture 1: Introduction 14 Data Representation Computers understand two things: on and off Data represented in binary form Binary (base 2) number system Contains only two digits, 0 and 1 Corresponds to two states, on and off

15 Lecture 1: Introduction 15 Coding Schemes Provide a common way of representing a character of data Needed so computers can exchange data Coding Scheme ASCII (American Standard Code for Information Interchange). 128 characters ( 256 characters in Extended ASCII ) A is encoded as 01000001 (66 th character) 3 is encoded as 00110011. EBCDIC (used by IBM)-256 characters Unicode - 65536 characters. Two bytes are needed to store a character.

16 ASCII Table

17

18 Lecture 1: Introduction 18 Computer Software: Operation System (OS) Command-Line Interface UNIX MS-DOS Graphical User Interface Macintosh OS Windows

19 Lecture 1: Introduction 19 Operating System A set of programs that lies between applications software and the hardware Manages computer’s resources (CPU, peripheral devices) Establishes a user interface Determines how user interacts with operating system Provides and executes services for applications software

20 Lecture 1: Introduction 20 Kernel Manages the operating system Loaded from hard drive into memory when computer is booted Booting refers to starting the computer Loads other operating system programs from disk storage as needed

21 Lecture 1: Introduction 21 The Language of a Computer Since inside the computer digital signals are processed, the language of a computer is a sequence of 0’s and 1’s. The computer language is called the Machine Language. A sequence of 0s and 1s is also referred as a Binary Number Code.

22 Lecture 1: Introduction 22 The Evolution of Programming Languages  Early computers were programmed in machine language.  Example: Suppose we want to represent the equation W ages = Rate X Hours  to calculate the weekly wages in machine language. 100100 0000 010001 100110 0000 010010 100010 0000 010011 100100 stands for LOAD 100110 stands for MULTIPLY 100010 stands for STORE

23 Lecture 1: Introduction 23 Assembly languages Assembly languages : an instruction in assembly language is an easy-to-remember form called a mnemonic. Using the assembly language instructions, the equation to calculate the weekly wages can be written as follows: LOAD rate MULThour STORwages Assembler: An assembler is a program that translates a program written in assembly language into an equivalent program in machine language.

24 Lecture 1: Introduction 24 High-Level Languages: In order to calculate the weekly wages, the equation wages = rate X hours in C, can be written as follows: wages = rate * hours; Compiler: is a program that translates a program written in a high level language to an equivalent machine language.

25 Lecture 1: Introduction 25 High-Level Languages LanguageApplications AreasOrigin of Name FORTRAN Scientific programmingFormula Translation COBOL Business data processingCommon Business-Oriented Language LISP Artificial IntelligenceList processing C Systems programmingAfter B Prolog Artificial IntelligenceLogic programming Ada Real-time distributed systemsAda Augusta Byron Smalltalk GUI, object-oriented programmingObjects “talk” to one another. C++ Supports objects and object-oriented programming Incremental modification of C Java Support Web programmingOriginally named “Oak”

26 Lecture 1: Introduction 26 Computer Languages Machine Language Collection of binary numbers Not standardized Assembly Language Represented by Mnemonic codes Not standardized High-Level Language Independent of the CPU

27 Lecture 1: Introduction 27 High-Level Language Program

28 Lecture 1: Introduction 28 Flow of Information During Program Execution


Download ppt "1 CSC 1401 S1 Computer Programming I Hamid Harroud School of Science and Engineering, Akhawayn University"

Similar presentations


Ads by Google