1 / 28

CSC 1401 S1 Computer Programming I

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. Overview of Computers and Programming. Lecture 1. Lecture 1: Introduction. Objectives.

dinesh
Download Presentation

CSC 1401 S1 Computer Programming I

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CSC 1401 S1Computer 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. Overview of Computers and Programming Lecture 1 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. 3 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. 4 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 5 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 6 Lecture 1: Introduction

  7. Fundamental Characteristics Speed Reliability Storage Capability 7 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 8 Lecture 1: Introduction

  9. Computer Components Memory: Main Memory Secondary Storage CPU I/O devices 9 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. 10 Lecture 1: Introduction

  11. The Machine Cycle • The time required to retrieve, execute, and store anoperation 11 Lecture 1: Introduction

  12. Memory Memory cells Address Contents Main Memory Random Access Memory Read-Only access Memory Secondary Memory CD, DVD, etc. 12 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 = 210 = 1024  1000 Byte MB: Mega Byte = 220  1 million Byte GB: Gega Byte = 230  1 billion Byte TB: Tera Byte = 240  1 trillion Byte 13 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 14 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 ExtendedASCII) A is encoded as 01000001 (66th character) 3 is encoded as 00110011. EBCDIC (used by IBM)-256 characters Unicode - 65536 characters. Two bytes are needed to store a character. 15 Lecture 1: Introduction

  16. ASCII Table

  17. ASCII Table

  18. Computer Software: Operation System (OS) Command-Line Interface UNIX MS-DOS Graphical User Interface Macintosh OS Windows 18 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 19 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 20 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. 21 Lecture 1: Introduction

  22. The Evolution of Programming Languages Early computers were programmed in machine language. Example: Suppose we want to represent the equation Wages = 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 22 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 MULT hour STOR wages Assembler: An assembler is a program that translates a program written in assembly language into an equivalent program in machine language. 23 Lecture 1: Introduction

  24. High-Level Languages: In order to calculate the weekly wages, the equation wages = rate Xhours 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. 24 Lecture 1: Introduction

  25. High-Level Languages 25 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 26 Lecture 1: Introduction

  27. High-Level Language Program 27 Lecture 1: Introduction

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

More Related