0% found this document useful (0 votes)
17 views5 pages

Chapter 4 Comp

Chapter 4 introduces programming concepts, detailing the evolution of programming languages from machine language to artificial intelligence. It discusses various generations of programming languages, their characteristics, and the role of language translators like assemblers, compilers, and interpreters. Additionally, it covers programming paradigms such as modular, procedural, object-oriented, and event-driven programming.

Uploaded by

nishithadevon2
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)
17 views5 pages

Chapter 4 Comp

Chapter 4 introduces programming concepts, detailing the evolution of programming languages from machine language to artificial intelligence. It discusses various generations of programming languages, their characteristics, and the role of language translators like assemblers, compilers, and interpreters. Additionally, it covers programming paradigms such as modular, procedural, object-oriented, and event-driven programming.

Uploaded by

nishithadevon2
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/ 5

Chapter 4

Introduction to Programming Concepts


Computer programs are collections of instructions that tell a computer how to interact with the user,
interact with the computer hardware and process data. The first programmable computers required
the programmers to write explicit instructions to directly manipulate the hardware of the computer.

A computer program is written in a specific language that a computer can understand and interpret.

This language is called a computer language or programming language.

The person writing the computer program is called a programmer or a corder.

Generations of Programming Languages


The evolutions of computer languages is called as generations.
First Generation (1 GL) Machine Language

This was used in 1940s.

Here information was entered into the computer in the form of long series of 1s and 0s or the
binary codes. Binary instructions are equivalent to the on/off signals.

Second Generation (2 GL) Assembly Language

This language was developed in the mid-1950s.

Programs written in assembly language require a translator to convert them into machine
language. This is we called an assembler.

Assembly languages are improvement over machine languages.

This languages occur very high chances of making mistakes.

Third Generation (3 GL) Assembly Language

This generation of language contains instructions in the form of English like commands to
perform a task.

A translator needed to translate the symbolic instructions in the form of English like
commands to perform a task.

Ex: BASIC, C, C++,C#,Java


Fourth Generation (4 GL) Assembly Language

This is a programming environment designed with a specific purpose of development of


commercial business software.

Basic features of fourth generation languages.

Instructions are written in English-like statements.

These are non-procedural

Increase productivity because programmers have to type fewer lines of codes to get
something done.

Ex: IBM’S ADRS2, APL, CSP AND AS, POWER BUILDER, Access and Structured Query Language
(SQL)

Fifth Generation (5 GL) - Artificial Intelligence

This generation languages are designed to make the computer solve a given problem without
much involvement of the programmer.

These languages are used mainly in artificial intelligence research.Means computer are now
have the ability to think for themselves and draw their own inferences using programmed
information in large databases.

Ex: Prolog, OPS5, Mercury

Computer Language Translators

This is defined as a computer program that converts instructions written in a given computer
language to another.

A translator is a programming language processor that converts a computer program from


one language to another. It takes a program written in source code and converts it into machine
code.

The product is called the target cade or object code.


Assembler
Assembler (computing), a computer program (Utility software) which translates assembly
language to machine language. Assembly language, a more readable interpretation of a processor's
machine code, allowing easier understanding and programming by humans.

The output of the assembler program is then called the object code or the machine code.

Complier
Compiler is a program that translates source code into object code. ...
Because compilers translate source code into object code, which is unique for each type of
computer, many compilers are available for the same language. For example, there is a
FORTRAN compiler for PCs and another for Apple Macintosh computers.

Draw fig 4.1 in your text book (pg 63)

The basic disadvantage of using complier is that a lot of disk space is used.

Interpreter
In computer science, an interpreter is a computer program that directly executes instructions
written in a programming or scripting language, without requiring them previously to have been
compiled into a machine language program.

The disadvantage of an interpreter is that it has no memory to store the translated lines.Every
time a program is executed, the source code has to be converted afresh.

Ex: BASIC, COBOL, PERL


Important terms and definitions

Modular Programming
Modular programming is a software design technique that emphasizes separating the functionality
of a program into independent, interchangeable modules, such that each contains everything
necessary to execute only one aspect of the desired functionality.

It is also called top-down align or step-wise refinement.

Procedural programming

Procedural Programming involves writing down a list of instructions to tell the computer what it
should do step-by-step to finish the task at hand.

Object Oriented Programming (OOP)

In OOP Programed is no longer series of instructions but the collections of objects. These
objects contain both data and instructions that are assigned to classes and can perform
specific task.

Advantages

1. Programmers can build programs form preexisting objects and can use features
from one program in another.
2. Result in faster development and save times.
3. Reduces maintain cost
4. Improves flexibility for future reference.
Ex: C++, Java, ADA

Even-driven Programming
In computer programming, event-driven programming is a programming paradigm in which the
flow of the program is determined by events such as user actions (mouse clicks, key presses),
sensor outputs, or messages from other programs or threads.

Rapid Application Development

The process of rapidly creating an application without extensive pre-planning is typically referred
as RAD

Ex: RAD

Exercise

You might also like