Personal Computer

Download Report

Transcript Personal Computer

Programming Languages and
Software
1
Prog Languages
Main Topics
Programming Language Definition.
Machine Language.
Assembly Language.
 High Level Language.
Features of High Level Language.
Types of High Level Language.
Application Programs
2
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)
3
Prog Languages
Machine language

A computer machine language consists of binary
numbers ( 0’s & 1’s) that the processor directly
understands.
 Advantages:
1.
2.
3.
Efficient use of storage for the instructions and data.
Instructions are immediately executed.
Instructions can be used to manipulate the individual bits.
1.
2.
3.
4.
It is a machine dependent.
It take a long time to make a program.
Computer storage locations must be addressed directly.
It requires high level of programming skills.
 Disadvantages:
4
Prog Languages
Machine language sample
Machine code: who would ever want to program in this?
5
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
6
Assembler
Machine Code
Prog Languages
Assembly Program Sample
mov DX,
XYZ:
Sub DX,
Add DX,
Mov CX,
And BX,
Xor DX,
Cmp DX,
jne XYZ
mov
Add
Mov
sub
Add
0
02
04
2
03
DX
1
DX, 5
DX, 5
CX, 40
CX, 1
DX,CX
Assembly Code
7
Sample
The function of the
assembler
Assembler
10101011
11110011
10101010
00101111
11110011
Machine Code
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.
8
Prog Languages
High Level Language (HLL)
 Note: these languages introduced in forth
generation computer.
 Advantages:
1.
2.
3.
4.
Easy to learn.
Almost Machine Independent.
Require less time to write.
Provide good documentation.
 Disadvantages:
1. Slow execution speed.
2. Occupy more space in memory.
9
Prog Languages
Features of High Level Language
1. 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
10
Compiler
Machine Code
Prog Languages
Types of High Level Language
1. 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.
11
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
12
Prog Languages
5. General Purpose Language:
Java
C, C++, Objective C
Basic
PL/I by IBM
 Note: there are many implementation s,
made by different companies, of the above
languages such as :
13






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
Prog Languages
 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.
14
Application Program
Examples of General purpose
Application packages
1.
2.
3.
15
Word processor: to prepare text information such
as Microsoft word.
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, …).
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 Microsoft
MS-SQL, by Microsoft
Oracle DBMS, by Oracle
Application Program
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
16
Application Program