Lecture 2
Lecture 2
2022-2023
1
computer architecture and organization CHARTER 1
COMPUTER ARCHITECTURE AND ORGANIZATION CHARTER 1
1.4 Software
1
computer architecture and organization CHARTER 1
COMPUTER ARCHITECTURE AND ORGANIZATION CHARTER 1
language program into the machine language. A separate compiler is needed for
each high level language used in programming the computer system. Note that the
assembler and the compiler are also programs written in one of those languages
and can translate an assembly or high-level language program, respectively, into
the machine language.
Figure 1.1 The difference between the machine language and assembly language and
the high level language
2
computer architecture and organization CHARTER 1
COMPUTER ARCHITECTURE AND ORGANIZATION CHARTER 1
Languages like FORTRAN,C, C++, JAVA, Python, etc., are examples of high-
level languages. All these programming languages use human-understandable
language like English to write program instructions. These instructions are
converted to low-level language by the compiler or interpreter so that it can be
understood by the computer.
3
computer architecture and organization CHARTER 1
COMPUTER ARCHITECTURE AND ORGANIZATION CHARTER 1
Figure 1.2 shows the sequence of operations that occurs once a program is
developed. A program written in either the assembly language or a high-level
language is called a source program. An assembly language source program is
translated by the assembler into the machine language program. This machine
language program is the object code. A compiler converts a high-level language
source into object code. The object code ordinarily resides on an intermediate
device such as a magnetic disk or tape. A loader program loads the object code
from the intermediate device into the memory unit. The data required by the
program will be either available in the memory or supplied by an input device
during the execution of the program. The effect of program execution is the
production of processed data or results.
4
computer architecture and organization CHARTER 1
COMPUTER ARCHITECTURE AND ORGANIZATION CHARTER 1
5
computer architecture and organization CHARTER 1
COMPUTER ARCHITECTURE AND ORGANIZATION CHARTER 1
6
computer architecture and organization CHARTER 1
COMPUTER ARCHITECTURE AND ORGANIZATION CHARTER 1
t memory management.
Definition:
Key Characteristics:
7
computer architecture and organization CHARTER 1
COMPUTER ARCHITECTURE AND ORGANIZATION CHARTER 1
3. Examples:
Interpreter:
Definition:
An interpreter is a program that reads and executes the source code of a program
line by line, translating and executing each line immediately. There’s no
intermediate machine code generated beforehand.
Key Characteristics:
8
computer architecture and organization CHARTER 1
COMPUTER ARCHITECTURE AND ORGANIZATION CHARTER 1
3. Examples:
Compilation vs Interpretation:
Execution Speed:
Debugging:
9
computer architecture and organization CHARTER 1
COMPUTER ARCHITECTURE AND ORGANIZATION CHARTER 1
Examples:
10