0% found this document useful (0 votes)
21 views40 pages

INTRO NEW

The document provides an overview of programming languages, categorizing them into low-level (machine and assembly languages) and high-level languages, with examples and their respective advantages and disadvantages. It also discusses the generations of programming languages, from machine language to natural language, and highlights features such as data types, variables, constants, and expressions. Additionally, it outlines the different types of high-level programming languages based on application areas and design paradigms.

Uploaded by

Peter Asane
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views40 pages

INTRO NEW

The document provides an overview of programming languages, categorizing them into low-level (machine and assembly languages) and high-level languages, with examples and their respective advantages and disadvantages. It also discusses the generations of programming languages, from machine language to natural language, and highlights features such as data types, variables, constants, and expressions. Additionally, it outlines the different types of high-level programming languages based on application areas and design paradigms.

Uploaded by

Peter Asane
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 40

PROGRAMMING

PROGRAMMING LANGUAGES

PROGRAMMING LANGUAGE IS AN ARTIFICIAL LANGUAGE


USED TO WRITE A SEQUENCE OF INSTRUCTIONS (A
COMPUTER PROGRAM) THAT CAN BE RUN BY A COMPUTER
CATEGORIES OF PROGRAMMING LANGUAGE

There are two categories of programming


language. They are;
•1. Low-level Language
•2. High-level Language
EXAMPLES OF LOW-LEVEL LANGUAGE

•1. Machine Code


•2. Assembly Language
MACHINE LANGUAGE
This is the lowest-level programming language
that store data in binary format form, that is
zeros(0s) and ones(1s).
Machine Languages are the only language
understood by computers.
Advantages of Machine Language
1. Fast execution speed.
2. Programmer’s full control of the
computer and its capability.

3. No translation needed
Disadvantages of Machine Language
1. Difficult to learn
2. Highly prone to errors
3. Totally machine-dependent (Programs
written in ML will only execute on the specific
machine they were written).
Assembly Language
Assembly Languages are between machine languages
and high-level languages. Assembly Languages are
similar to machine languages, but they are much easier
to program in because they allow a programmer to
substitute names for numbers. It uses symbolic names or
mnemonic codes to refer to machine code instructions.
Advantages of Assembly Language
1. It is efficient in processing time and in the use of
memory space.
2. It encourages Modular Programming, where
programs are broken into modules.
3. It provides an error listing which is useful in
debugging.
Disadvantages of Assembly Language
1. It is cumbersome in usage.
2. It has one-to-one relationship with machine
language, hence has to be translated into ML
instruction.
3. Assembly Language is machine-dependent like
Machine Language.
DIFFERENCES BETWEEN MACHINE LANGUAGE AND
ASSEMBLY LANGUAGE
DIFFERENCES BETWEEN MACHINE LANGUAGE AND ASSEMBLY
LANGUAGE PROGRAMS

MACHINE LANGUAGE ASSEMBLY LANGUAGE


• It is the actual instructions in
• It is human readable
computer memory
• The computer needs an
• The computer executes
assembler to translate the
machine code directly into 1s
code
and 0s
• It composed of only • It uses mnemonic codes to
numbers, usually refer to machine code
represented in either binary instructions
or hexadecimal
HIGH-LEVEL LANGUAGE

• High-level languages are relatively sophisticated sets of


statements utilizing words and syntax from human language.
They are more similar to normal human languages than assembly
or machine languages and are therefore easier to use for writing
complicated programs. EG. C++, C, JAVA, PYTHON, PHP, SQL,
JavaScript, perl, Pascal, Ruby, CSS, FORTRAN, COBOL,Rust, etc.
CATEGORIES OF HIGH-LEVEL PROGRAMMING
LANGUAGES

• Categorization based on Application Area


• Categorization based on Design paradigm
CATEGORIZATION BASED ON APPLICATION AREA

• Commercial languages
• Scientific languages
• Special purpose languages
• General purpose languages
COMMERCIAL LANGUAGES

• These programming languages are


dedicated to the commercial domain and
are specially designed for solving business-
related problems. Eg. COBOL
SCIENTIFIC LANGUAGES
• These programming languages are dedicated
to the scientific domain and are specially
designed for solving different scientific and
mathematical problems. E.g. FORTRAN
SPECIAL PURPOSE LANGUAGES
• These programming languages are specially
designed for performing some dedicated
functions. For example, SQL is a high-level
language specially designed to interact with the
database programs only.
GENERAL PURPOSE LANGUAGES
• These programming languages are used for
developing different types of software
application regardless of their application
area. Eg. BASIC, C, C++, and java.
QUESTIONS TIME
• WHAT IS A HIGH LEVEL PROGRAMMING LANGUAGE
• LIST 6 EXAMPLES OF HIGH LEVEL PROGRAMMING LANGUAGES
• GIVE ONE EXAMPLE OF A COMMERCIAL PROGRAMMING LANGUAGE
• GIVE ONE EXAMPLE OF A SCIENTIFIC PROGRAMMING LANGUAGE
• GIVE ONE EXAMPLE OF A SPECIAL PURPOSE PROGRAMMING LANGUAGE
• GIVE ONE EXAMPLE OF A GENERAL PURPOSE PROGRAMMING LANGUAGE
CATEGORIZATION BASED ON DESIGN PARADIGM

•Procedure-oriented languages
•Logic-oriented languages
•Object-oriented languages
PROCEDURE-ORIENTED LANGUAGES

• In this language, a program is written as a


sequence of procedures, Each procedure contains a
series of instruction for performing a specific task.
eg FORTRAN, ALGOL, C, BASIC, and ADA
LOGIC-ORIENTED LANGUAGES

• These languages use logic programming


paradigms as the design approach for solving
various computational problems. Eg Prolog,
Datalog, answer set programming, etc.
OBJECT-ORIENTED LANGUAGES

• In this programming language, a problem is divided


into a number of objects, which can interact by
passing messages to each other. Eg. Java, C++ , C#,
python, ruby, javascript, pascal, perl, Dart,
smalltalk etc.
DIFFERENCES BETWEEN LOW-LEVEL LANGUAGE AND HIGH-
LEVEL LANGUAGE

LOW-LEVEL LANGUAGE HIGH-LEVEL LANGUAGE

• Long programming development • short programming development time


time • Much lower programmer’s skilled
required
• High programmer’s skill required
• Ease of modification is very easy
• Ease of modification is difficult
• Slow speed of processing
• Very high speed of processing
GENERATIONS OF COMPUTER LANGUAGE

There are five levels of programming language


1. Machine Language or First-Generation Programming Language
2. Assemble Language or Second-Generation Programming Language
3. A third-generation programming language (3GL)
4. Fourth-generation programming languages (4GLs)
5. Natural Language – Fifth Generation
MACHINE LANGUAGE OR
FIRST-GENERATION PROGRAMMING LANGUAGE

• Machine language is a low-level programming


language that consists of binary code (0s and 1s)
that is directly executed by a computer's CPU. It
is highly specific to the architecture of the
computer hardware.
ASSEMBLE LANGUAGE OR
SECOND-GENERATION PROGRAMMING LANGUAGE

•considered as low-level language uses


Mnemonic codes (abbreviations that easy to
remember).
THIRD-GENERATION
PROGRAMMING LANGUAGE (3GL)
• is a high-level programming language that is more
programmer-friendly and machine-independent than
first- and second-generation languages. Eg. C, C++,
Java, Python, PHP, Perl, C#, COBOL, BASIC, Pascal,
and Fortran
FOURTH-GENERATION
PROGRAMMING LANGUAGES (4GLS)

• They are computer languages that automate


the creation of code to increase programmer
efficiency. Examples of 4GLs include SQL,
MATLAB, SAS, and Visual Basic
NATURAL LANGUAGE – FIFTH GENERATION

• Fifth-generation programming languages (5GLs) are high-


level languages that use constraints to solve problems, rather
than algorithms. They are often used in the development of
artificial intelligence (AI), expert systems, and natural
language understanding. Examples of 5GLs include PROLOG,
LISP, Mercury, and OPS5.
END OF LESSON
QUESTIONS TIME
EXERCISE
1. What is a high level programming language
2. List 5 examples of high level programming
languages
3. Identify 2 logic oriented programming languages
4. Second generation languages are also known as
5. What is a commercial programming languages
FEATURES OF PROGRAMMING LANGUAGES

Data Types

A data type represents a type of the data which you can process using your
computer program. It can be numeric, alphanumeric, decimal, etc
Variables

Variables are the names you give to computer memory locations


which are used to store values in a computer program.
Constants
a constant in QBasic is a variable whose value cannot be
changed, i.e., the value is constant.
Expressions

An expression is any legal combination of symbols that represents a


value. Every expression consists of at least one operand and can
have one or more operators

You might also like