* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Slide 1
Document related concepts
Chapter 1 Introduction to Computer Programming By: Mr. Baha Hanene Learning outcomes In this chapter we will cover learning outcome L01 partially. Discuss the features of a high-level language (L01). What is a Computer Hardware & Software Divisions Data & Information Programming Introduction Programming Languages Translators What is a computer A computer is a dull machine. It requires Human / Instructions to work. It performs only three tasks • Input • Processing • Output MAJOR COMPONENTS Hardware: All Tangible / Touchable parts of a computer are called hardware (Monitor, System Unit, Keyboard, Mouse etc.) Software: All Non-Tangible parts of computer are called software (Microsoft Windows, MS Office & Computer Games) Hardware & software divisions A computer Hardware can be divided into four parts. Input Units (Keyboard, Mouse, Scanner etc.) Output Units (Monitor, Printer, Projector etc.) Storage Devices (Hard Disks, Floppy, CD,DVD etc.) Process Units (Central Processing Units CPU ) A computer software can be divided into two parts. Application Software (Pinball Game, MS Word, Programming Languages etc.) System Software (Microsoft Windows, Linux, Unix, Dos etc.) Data & information Data: All unprocessed / raw / unrecognized collection of facts is called Data. e.g. Soccer, 23, Abu Dhabi. Information: When we process that raw data in a manner that it start giving sense, is called information. e.g. A soccer match to be held on 23rd Feb, 2010 in Abu Dhabi. Algorithm DATA / INPUT : INSTRUCTION : INFORMATION : 50 & 3 Multiply (x) 150 What is computer programming Definition: It is basically a set of instructions given to a computer to perform specific tasks or Definition: It’s the way you communicate with computer to perform the selected operations of your own choice. DEVELOPMENT OF A PROGRAM There are basically 7 different steps towards the development of a computer program. Define the problem Outline the solution Develop the outline into an algorithm Test the algorithm Code the algorithm Run the program Document & maintain the program Programming languages The special language you use to instruct computer for performing different tasks is called computer programming language. There are mainly two types of programming languages High Level Languages (VB/VB.Net, C/C++, COBOL, Fortran, Java etc.) Low Level Languages (Assembly Language) Translator A Translator is a set of program that translates High level language into Low level Language or machine understandable language or machine codes. There are three types of translator: Assembler Compiler Interpreter Assembler An assembler is a program that takes basic computer instructions and converts them into a pattern of bits that the computer's processor can use to perform its basic operations translator Compiler It is used to compile (translate) the programs written in High level languages into its equivalent machine codes. It compiles whole program at once and then gives detail about the total no. of Errors. It is faster than Interpreter. Interpreter It is used to interpret (translate) the programs written in High level languages into its equivalent machine codes. It interprets one line at a time. It stops on syntax errors that is why the process of debugging is faster in it. It is slower than Compiler. Debugging It is the process of locating and correcting errors in a program.