Software Lesson 2
Software Lesson 2
LESSON 2
RECAP:
• What are the types of
software?
• How an application run on a
computer?
• What is an interrupt?
2
OBJECTIVE 1: EXPLAIN WHAT IS
MEANT BY A HIGH-LEVEL LANGUAGE
AND A LOW-LEVEL LANGUAGE,
INCLUDING THE ADVANTAGES
AND DISADVANTAGES OF EACH
• Programming Language:
A programming language is a formal
language comprising a set of instructions
used to produce various kinds of output.
• Advantages:
HIGH LEVEL
○ Readability and understandability LANGUAGE
○ Portability
○ Productivity
• Disadvantages:
○ Slower execution
○ Platform dependency
A low-level language is a type of
programming language that is closer to
the language understood by
computers, known as
machine language or binary
code. Like Assembly Language.
• Advantages:
LOW LEVEL
○ Fast execution LANGUAGE
○ Direct hardware access
• Disadvantages:
○ Lack of readability
○ Platform dependency
○ Complex syntax
OBJECTIVE 2: UNDERSTAND THAT
ASSEMBLY LANGUAGE IS A FORM OF LOW-
LEVEL LANGUAGE THAT USES MNEMONICS,
AND THAT AN ASSEMBLER IS NEEDED TO
TRANSLATE AN ASSEMBLY LANGUAGE
PROGRAM INTO MACHINE CODE
ASSEMBLY LANGUAGE AND
ASSEMBLER
• In assembly language, each mnemonic instruction
corresponds directly to a specific machine instruction or
operation, such as moving data between memory
locations, performing arithmetic calculations, or
controlling program flow.
• A mnemonic instruction is a symbolic representation
of a machine-level instruction in assembly language
programming. Like ADD, SUB
• Assembler serves as a bridge between human-
readable assembly language instructions and the low-
level
8
binary instructions understood by the computer
hardware.
ROLES OF ASSEMBLER
1. Translation of Assemble Code represented in
Mnemonic instruction and symbols in to Machine
Code.
2. Error Handling
3. Symbol Resolution
4. Optimization
5. Output Generation
9
OBJECTIVE 3: DESCRIBE THE
OPERATION OF A COMPILER AND AN
INTERPRETER,
INCLUDING HOW HIGH-LEVEL
LANGUAGE IS TRANSLATED BY EACH
AND HOW ERRORS ARE REPORTED
OPERATION OF A COMPILER
• A compiler is a software tool that translates source
code written in a high-level programming language
into machine code or executable code that can be
directly executed by a computer's CPU.
11
OPERATION OF A COMPILER
Here are the tasks performed by Complier:
1. Lexical Analysis (Identifies Key words, Constants &
operators)
2. Syntax Analysis
3. Semantic Analysis (Identifies Functions, Variable
Declaration)
4. Intermediate Code Generation (Initial Step of Translation)
5. Optimization (Minimizing Code)
6. Code Generation (Getting Executable Code)
12
OPERATION OF AN
INTERPRETER
An interpreter is a computer program that reads a
statement from a program written in high – level
language.
Here are the tasks performed by Interpreter:
1. Line by line execution
2. Immediate Feedback
3. Slower Execution
4. provide a flexible and interactive environment for
programming
13
OBJECTIVE
4. EXPLAIN THE
ADVANTAGES AND
DISADVANTAGES OF
A COMPILER AND
AN INTERPRETER
Translat
Advantages Disadvantages
or
• A complied program can be stored
ready for use.
• A complied program can be • It takes longer time to
executed without complier. write, test and debug
Complier • A complied program takes less the program during
memory. development
• A complied program executed in
shorter time.
• Easier and quicker to debug and • Programs cannot be
test the program during run without the
Interprete development interpreter
r • Easier to edit the program during • Program can take
development longer to execute
15
OBJECTIVE 5. EXPLAIN
THE ROLE OF AN IDE IN
WRITING PROGRAM
CODE AND
THE COMMON
FUNCTIONS IDES
PROVIDE
ROLE OF AN INTEGRATED
DEVELOPMENT ENVIRONMENT (IDE)
• An Integrated Development Environment (IDE) is a software
application that provides comprehensive tools and features to
facilitate software development.
• IDEs commonly have following features;
Code editor
Translator
A runtime environment with debugger
Error diagnostics
Auto – completion
Auto – correction
An auto – documenter and prettyprinting
17 Book Page No. 170
THANKS!