10
Introduction to Computer Programming By: Mr. Baha Hanene Chapter 1

Introduction to Computer Programming

  • Upload
    flower

  • View
    52

  • Download
    0

Embed Size (px)

DESCRIPTION

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 - PowerPoint PPT Presentation

Citation preview

Page 1: Introduction to Computer Programming

Introduction to Computer Programming

By: Mr. Baha Hanene

Chapter 1

Page 2: Introduction to Computer Programming

Learning outcomesIn this chapter we will cover learning outcome L01 partially.

Discuss the features of a high-level language (L01).

Page 3: Introduction to Computer Programming

What is a ComputerHardware & Software DivisionsData & InformationProgramming IntroductionProgramming LanguagesTranslators

Page 4: Introduction to Computer Programming

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)

Page 5: Introduction to Computer Programming

Hardware & software divisionsA 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.)

Page 6: Introduction to Computer Programming

Data & informationData: 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.

AlgorithmDATA / INPUT : 50 & 3INSTRUCTION : Multiply (x)INFORMATION : 150

Page 7: Introduction to Computer Programming

What is computer programmingDefinition: It is basically a set of instructions given to a computer to perform specific tasks

orDefinition: It’s the way you communicate with computer to perform the selected operations of your own choice.

DEVELOPMENT OF A PROGRAMThere 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

Page 8: Introduction to Computer Programming

Programming languages

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)

The special language you use to instruct computer for performing different tasks is called computer programming language.

Page 9: Introduction to Computer Programming

TranslatorA 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

AssemblerAn 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

Page 10: Introduction to Computer Programming

translatorCompilerIt 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.

InterpreterIt is used to interpret (translate) the programs written in High level languages into

itsequivalent machine codes. It interprets one line at a time. It stops on syntax errorsthat is why the process of debugging is faster in it. It is slower than Compiler.

DebuggingIt is the process of locating and correcting errors in a program.