programming languages and software

16
Prog Languages 1 Programming Languages and Software Lesson 6 0x006 110

Upload: shawna

Post on 06-Jan-2016

29 views

Category:

Documents


0 download

DESCRIPTION

Lesson 6 0x006 110. Programming Languages and Software. Main Topics Programming Language Definition. Machine Language. Assembly Language. High Level Language. Features of High Level Language. Types of High Level Language . Application Programs. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Programming Languages and Software

1 Prog Languages

Programming Languages and Software

Lesson 6 0x006

110

Page 2: Programming Languages and Software

2 Prog Languages

Main TopicsProgramming Language Definition.Machine Language.Assembly Language. High Level Language.Features of High Level Language.Types of High Level Language.Application Programs

Page 3: Programming Languages and Software

3 Prog Languages

A language is a system communication method.

Programming language is a set of symbols, characters, and rules that permit people to communicate with computers.

The Instructions of the programming language should perform :

Input/output.Calculation / Text manipulation. Logic / comparison.Flow control (Loops & If Statements etc)

Page 4: Programming Languages and Software

4 Prog Languages

Machine language

A computer machine language consists of binary numbers ( 0’s & 1’s) that the processor directly understands.

Advantages:1. Efficient use of storage for the instructions and

data.2. Instructions are immediately executed.3. Instructions can be used to manipulate the

individual bits.

Disadvantages:1. It is a machine dependent.2. It take a long time to make a program.3. Computer storage locations must be addressed

directly.4. It requires high level of programming skills.

Page 5: Programming Languages and Software

5 Prog Languages

Machine language sample

Machine code: who would ever want to program in this?

Page 6: Programming Languages and Software

6 Prog Languages

Assembly Language

Notes: The first introduced for the assembly language

in the second generation computers. the assembler enables the computer to

convert the assembly language instructions into machine language. The set of instructions written by the programmer in assembly language is the source program. After it has been converted to machine language by an assembler its referred to as the object code.

Assembly Code Assembler Machine Code

Page 7: Programming Languages and Software

7 Prog Languages

Assembly Program Sample

mov DX, 5Add DX, 5Mov CX, 40sub CX, 1Add DX,CX

mov DX, 0XYZ:Sub DX, 02Add DX, 04Mov CX, 2And BX, 03Xor DX, DXCmp DX, 1jne XYZ

1010101111110011101010100010111111110011

Assembler

Assembly Code Machine Code

Sample

The function of the assembler

Page 8: Programming Languages and Software

8 Prog Languages

Advantages: 1. Easier than the machine language.2. Fewer errors.3. Programs run very fast (saves time).

Disadvantages:1. Requires knowledge of H.W.2. Programs are written for one type of

computers. (Because its machine dependent language).

3. writing a program take a lot of time.

Page 9: Programming Languages and Software

9 Prog Languages

High Level Language (HLL)

Note: these languages introduced in forth generation computer.

Advantages:1. Easy to learn.2. Almost Machine Independent.3. Require less time to write.4. Provide good documentation.

Disadvantages:1. Slow execution speed.2. Occupy more space in memory.

Page 10: Programming Languages and Software

10 Prog Languages

Features of High Level Language1. They have an extensive vocabulary of words,

symbols and sentences.2. Programs are written in the language are translated

into many of machine language instructions, this translation are often done by special program called compiler.

3. Libraries of procedures and functions can be incorporated.(Structured programming)

4. A set of rules must be obeyed when writing the program.

5. Instructions in high level language are usually called statements.

HLL Code Compiler Machine Code

Page 11: Programming Languages and Software

11 Prog Languages

Types of High Level Language1. Commercial languages:

Such as COBOL (Common Business Oriented Language). Has been used mostly in business field.

COBOL 2002 supported object-oriented

2. Scientific languages: For example FORTRAN (FORmula TRANslator),

ALGOL (ALGOrithm Language), and BASIC (Beginners All Purpose Symbolic Instruction Code).

It suits  numeric computation

Features: Extensive arithmetic computational ability. Large library of built in mathematical functions.

Page 12: Programming Languages and Software

12 Prog Languages

3.Special Purpose Languages: Used for particular type of problems such as:-

– Machine Control.– Simulation.– Control of an experiment.

For example: LISP (LISt Processing), PROLOG (PROgramming in LOGic) for Artificial Intelligence applications

4.Language for operating systems: It is used to control the operations of

computer. Such as

C C ++ , uses Object Oriented techniques Objective C , uses Object Oriented techniques

Page 13: Programming Languages and Software

13 Prog Languages

5. General Purpose Language:Java C, C++, Objective CBasic PL/I by IBM

Note: there are many implementation s, made by different companies, of the above languages such as :

MS-Visual BASIC. And VB.NET MS Visual C++. And Visual C#, by Microsoft Eclipse for Java. Free JDeveloper, for Java by Oracle XCode , for C & Objective C by Apple Others

Page 14: Programming Languages and Software

14

Application Program: is a program that designed to perform a particular task required by the user.

Examples :Word Processors.Inventory management programs. Payroll program.Accounting System.Registration System .Games etc.

Application Program

Page 15: Programming Languages and Software

15

Examples of General purpose Application packages

1. Word processor: to prepare text information such as Microsoft word.

2. Spread sheet (EXCEL) : it divides the display area into cells arranged in rows and columns. The numeric data in the cells can be processed (totaled, averaged, …).

3. DBMS “Data Base Management System”: that enable users to define data tables, where each table consist from fields (each column called field) and records (each row called record), combine records into file, decide the relationship's between these tables, and then manipulate and retrieve data in various ways.

Examples MS-Access, by MicrosoftMS-SQL, by MicrosoftOracle DBMS, by Oracle

Application Program

Page 16: Programming Languages and Software

16

Note: there are a lots of new applications programs such as :

DacEasy Accounting.Typing Master.3D Max.Anti-Virus.AutoCAD.Adobe Photoshop.And many others

Application Program