[go: up one dir, main page]

0% found this document useful (0 votes)
22 views4 pages

Soft Sage Computer Tips Cover Pinterest Pin

yup

Uploaded by

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

Soft Sage Computer Tips Cover Pinterest Pin

yup

Uploaded by

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

BY: MELENA DEFREITAS GRADE: 11T

INFORMATION
TECHNOLOGY
ASSIGNMENT
#2

TEACHER: SIR POORAN


1. DEFINITION AND EXAMPLE RELATING TO PASCAL PROGRAMMING
 Program:

A sequence of instructions written in a programming language to perform a specific task when


executed by a computer.

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.

2. DIFFERENTIATE BETWEEN SOURCE CODE AND OBJECT CODE.

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: Python uses an interpreter, which executes code line by line.

 Assembler: Converts assembly language into machine code.

Example: An assembler is used to convert Assembly language programs into machine code for
specific hardware.

 Low level language (machine or assembly):


Languages close to machine code, making them more efficient but harder to program.

Examples: Machine language (binary code) and Assembly language.

 High level e.g. Visual Basic, Pascal and C programming:


Languages that are more abstract and easier for humans to read, focusing on programming logic
rather than hardware specifics.

Examples: Visual Basic, Pascal, C.

4. LIST OF THE GENERATION OF PROGRAMMING LANGUAGES EXPLANATION OF


EACH GENERATION OF PROGRAMMING LANGUAGES WITH EXAMPLES.

 First Generation (1GL): Machine Language:


The most basic code in binary (0s and 1s) that directly communicates with the hardware.

Example: Binary code used directly by a computer's processor.

 Second Generation (2GL): Assembly Language:


A step above machine language, using symbolic codes (like MOV and ADD) that correspond to
binary instructions.

Example: Assembly language for the x86 processor.

 Third Generation (3GL): High-Level Languages:


Languages that are more abstract and include words and symbols, making them easier for humans to
understand.
Examples: Pascal, C, Fortran.

 Fourth Generation (4GL): Declarative Languages:


Languages that allow programmers to state what they want the program to accomplish, focusing
more on results than process.

Examples: SQL (for databases), MATLAB.

 Fifth Generation (5GL): Logic-Based and AI-Oriented Languages:


Languages used mainly in artificial intelligence and expert systems, focusing on problem-solving.

Examples: Prolog, LISP (used in AI research).

You might also like