Soft Sage Computer Tips Cover Pinterest Pin
Soft Sage Computer Tips Cover Pinterest Pin
INFORMATION
TECHNOLOGY
ASSIGNMENT
#2
Example: In Pascal, a program to calculate the sum of two numbers would look like this:
Program sum;
Var
a, b, sum: intergeer;
Begin
a: = 5:
b; = 10;
sum := a + b;
writeIn( ‘The sum is; ‘ , sum);
end.
Programmers:
Individuals who write, test, and maintain programs using various programming languages.
Example: A Pascal programmer may create applications such as simple calculators, data processing
systems, or educational software using Pascal syntax and logic.
Programming language:
A formal language composed of a set of instructions used to create programs that perform specific tasks on a computer.
Example: Pascal is a high-level programming language known for its structured programming
approach, making it useful for teaching programming fundamentals.
Source code:
The original code written by a programmer in a high-level programming language, readable by humans.
Example: The code written in Pascal (like the example program above) is source code before it is
compiled into a language the computer can execute.
Object code:
The machine-readable code generated by translating the source code into machine code, often through a compiler.
Example: When the Pascal source code is compiled, it produces an object code file that the computer
can directly execute.
Source code is written by the programmer in a human-readable language (e.g., Pascal), while object
code is the translated, machine-readable version of that code, created by the compiler for the
computer to execute.
3. LIST THE TYPES OF TRANSLATIONS AND GIVE EXAMPLES LIST THE LEVELS
OF PROGRAMMING LANGUAGES
Compiler: Converts source code into object code in a single operation, allowing the program to
be executed later.
Example: The Pascal compiler converts Pascal code into an executable file.
Interpreter: Translates and executes code line by line without producing object code.
Example: An assembler is used to convert Assembly language programs into machine code for
specific hardware.