Pp2intro 220503213712
Pp2intro 220503213712
PROGRAMMING
EXPLANATION OF TERMS
OBJECTIVES
By the end of the lesson, you should be to:
Define program
Define programming
Define programming language
State and explain the various classes of programming language.
DEFINITION OF PROGRAM
Disadvantages:
• 1) Machine dependent
• 2) Programming is very difficult
• 3) Difficult to understand
• 4) Difficult to write bug free programs
• 5) Difficult to isolate an error
EXAMPLE
Example
Addition of two numbers
2 0010
+
3 0011
--- ---------------
5 0101
--- ---------------
SYMBOLIC LANGUAGES (OR) ASSEMBLY
LANGUAGE
In the early 1950‘s Admiral Grace Hopper, a mathematician and naval
officer, developed the concept of a special computer program that
would convert programs into machine language. These early
programming languages simply mirrored the machine languages using
symbols or mnemonics to represent the various language instructions.
These languages were known as symbolic languages.
SYMBOLIC LANGUAGES (OR) ASSEMBLY LANGUAGE (CONT’D)
Advantages:
• 1) Easy to understand and use
• 2) Easy to modify and isolate error
• 3) High efficiency
• 4) More control on hardware
SYMBOLIC LANGUAGES (OR) ASSEMBLY LANGUAGE (CONT’D)
Disadvantages:
• 1) Machine Dependent Language
• 2) Requires translator
• 3) Difficult to learn and write programs
• 4) Slow development time
• 5) Less efficient
EXAMPLE
• Example: Add two numbers. E.g. 2 and 3.
2 PUSH 2,A
3 PUSH 3,B
+ ADD A,B
5 PRINT C
HIGH LEVEL LANGUAGES
All high-level languages are procedure-oriented
languages and intended to be machine
independent. Programs are written in statements
in English-like language, a great advantage over
mnemonics in assembly languages which requires
Assembler to translate it to machine readable
language. These languages require translators
(compilers and interpreters) for execution.
HIGH LEVEL LANGUAGES (CONT’D)
The early high-level languages come in the third generation languages,
COBOL, BASIC, APL, JAVA, C++, C+ etc. these languages enable the
programmers to write instructions in English words and familiar
mathematical symbols which makes it easier than technical details of
the computer.
HIGH LEVEL LANGUAGES (CONT’D)
• Advantages:
• 1) Easy to write and understand
• 2) Easy to isolate an error
• 3) Machine independent language
• 4) Easy to maintain
• 5) Better readability
• 6) Low Development cost
• 7) Easier to document
• 8) Portable
HIGH LEVEL LANGUAGES (CONT’D)
• Disadvantages:
• 1) Needs translator
• 2) Requires high execution time
• 3) Poor control on hardware
• 4) Less efficient