0% found this document useful (0 votes)
14 views11 pages

DPPT

Uploaded by

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

DPPT

Uploaded by

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

Basic Computer Engineering

TOPIC - Introduction to Programming


Languages.

Submitted by- Submitted to-


Diya Wadhwa Ms.
Ms.Arti
AartiJoshi
Joshi
Programming Language

 First-generation: Machine language


 Second-generation: Assembly language
 Third-generation: High-level language
 Fourth-generation: Some examples are SQL,
ACCESS, Informix and FOCUS.
 (Fifth-generation): Used mainly in artificial
intelligence. For example: OPS5 and MERCURY.
1GL: Machine language

 A first-generation programming language (1GL) is a machine-level programming


language and belongs to the low-level programming languages. A first
generation (programming) language (1GL) is a grouping of programming
languages that are machine level languages used to program first-generation
computers.
 The instructions in 1GL are made of binary numbers, represented by 1s and 0s.
This makes the language suitable for the understanding of the machine but far
more difficult to interpret and learn by the human programmer.
 First generation languages are very much adapted to a specific computer and
CPU, and code portability is therefore significantly reduced in comparison
to higher level languages.
2GL: Assembly language

An assembly language is a type of low-level programming language that is


intended to communicate directly with a computer's hardware. Unlike
machine language, which consists of binary and hexadecimal characters,
assembly languages are designed to be readable by humans.
Low-level programming language to represent machine-language instructions
 E.g.: ADDF3 R1, R2, R3
 Assembly code need to be converted into machine code by using an
assembler
 Assembly program
 is platform dependent
 Combination of mnemonic and machine instruction
3GL: High-level language

 A high-level language (HLL) is a programming language, such as C, FORTRAN,


or Pascal, that allows a programmer to develop programmes that are
independent of the type of machine they are running on. all these languages are
classified as high-level because they are more comparable languages than
machine languages.
 English-like and easy to learn and program.
 E.g.:
 Area = 5 * 5 * 3.1415;
 COBOL, FORTRAN, BASIC, Pascal, Ada, C, Visual Basic, Delphi, C++, C#,
Java
 Source program is compiled into machine code by a compiler and linked to
supporting library code by a linker to form an executable file.
4GL / 5GL

 3GL offered greater power to the programmer, while 4GL


open up the development environment to a wider
population. (Applications Development Without
Programmers)
 Database query languages: SQL…
 Data manipulation, analysis, and reporting languages:
MATLAB, SPSS…
Category (3GL)

 Windows Application
 C, C++, Java, Visual Basic, C#

 Web Application
 Server Side

 PHP, JSP (Java), ASP.NET (Visual Basic,


C#), …
 Client Side

 JavaScript, VBScript
The Binary Machine

 Machine code, also known as machine language, is the elemental language


of computers. It is read by the computer's central processing unit (CPU), is
composed of digital binary numbers and looks like a very long sequence of
zeros and ones.
 A modern computer can run programs written in JavaScript, Pascal, Visual
Basic, Visual C++, etc.
 However, computers can only understand one language: the machine
language it is not easy to use.
 The machine language of a Sun workstation is different from a PC (or other
platform), however, they can run the same C++ program.
Two types of Translators
(3GL to 1GL)

 Interpreter:
 translate and run the source code one line at a time.
Easy to write and easy to find the errors in the
program, but running very slow.
 JavaScript, VBScript, PHP, …

 Compiler:
 translates the source code once and for all, producing
a complete machine language program. Very fast, but
when the program fails, difficult to show the
programmer where are the errors.
 C, C++, Java, C#, and so on.
Implement a Language

 Generally, the action of any translating program can be divided


into three phases
 Scanning

 Parsing

 Code generation.
THANK YOU.

You might also like