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

Icps Module 1 Part3 of 5

The document discusses different types of programming languages and how they are used. It covers low-level languages like machine language and assembly language as well as high-level languages. It also discusses different types of software like system software and application software, with operating systems and compilers/interpreters as examples. Programming languages allow writing programs that computers can execute through translation.

Uploaded by

fevay55076
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)
24 views11 pages

Icps Module 1 Part3 of 5

The document discusses different types of programming languages and how they are used. It covers low-level languages like machine language and assembly language as well as high-level languages. It also discusses different types of software like system software and application software, with operating systems and compilers/interpreters as examples. Programming languages allow writing programs that computers can execute through translation.

Uploaded by

fevay55076
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

5.

1 Introduction to Programming Languages

● A Programming Language consists of a set of vocabulary and grammatical rules, to


express the computations and tasks that the computer has to perform.
● Programming languages are used to write a program.
● Each language has a unique set of keywords (words that it understands) and a special
syntax for organizing program instructions.
● The programming language should be understood, both by the programmer (who is
writing the program) and the computer.

○ A computer understands the language of 0∙s and 1∙s, while the programmer is

more comfortable with English-like language.


● Programming languages fall into three categories

5.1.1 Programming Language

1. Low level Language


○ Machine language
○ Assembly language
2. High level Language
Machine Language Assembly language High-level language

The computer can easily Not so easy for the computer to Difficult for the computer to
understand the programs understand. understand
written in machine language
directly.

Translation is not needed Translation is needed. Translation is needed.

The program written is the source The program written is the


code. source code.
It has to be converted into It has to be converted into
machine code(object code) using machine code(object code)
translator software called using translator softwares like
assembler. interpreter or compiler

difficult for the programmer Not so easy as high level language Easier for programmer to
to understand. but easier than machine language read, write and understand.
(Complexity lies between machine English-like language
language and high level language.)
difficult to write a program in
machine language

Machine language is Assembly language programs are Not machine dependent


machine-dependent. machine-dependent. So portable from one computer
to another.
Since each line of the assembly A line of code in high-level
Each kind of CPU has its own
language program is converted into program may correspond to
unique machine language. one or more lines of machine code. more than one line of machine
Code.

Consists of 0s and 1s (binary English-like representation is used English-like language with


code) to write the program in assembly keywords and specific syntax.
language.

Uses symbolic representation


(mnemonics) of machine codes

Program written in machine Assembly language programs are


language can be executed generally written where the
very fast efficiency and the speed of
program are the critical issues, i.e.
programs requiring high speed and
efficiency.
Python
C
C++
Java

Generations Of Programming Languages

First Generation Machine language

Second Generation Assembly language

Third Generation C, COBOL, Fortran, Pascal, C++, Java,


ActiveX (Microsoft) etc.

Fourth Generation .NET (VB.NET, C#.NET etc.) Scripting


language (Javascript, Microsoft
Frontpage etc.)

Fifth Generation LISP, Prolog

Application software is usually written in high-level languages.


The program written in a programming language is also called the source code.

5.2 Translator Software


● Translator software is used to convert a program written in high-level language and
assembly language to a form that the computer can understand.
● Translator software converts a program written in assembly language, and high-level
language to a machine-level language program.
● The translated program is called the object code.
There are three different kind of translator software:
1. Assembler,
2. Compiler, and
3. Interpreter.

5.2.1 Assembler
● Assembly language is also referred to as a symbolic representation of the machine code.
● Assembler is a translator software that converts a program written in assembly language
into machine code.
● There is usually a one-to-one correspondence between simple assembly statements and
machine language instructions.

● The machine language is dependent on the processor architecture, though computers are
generally able to carry out the same functionality in different ways.
○ Thus the corresponding assembly language programs also differ for different
computer architectures.

5.2.1 Compiler and Interpreter


● The program written in high-level language is referred to as the source code and
translated program is referred as the object code.
Compiler Interpreter

translates the program written in a high-level translates the program written in a high-level
language to machine language (object code- language to machine language (object code-
binary). binary).

Compiler looks at the entire source code. Interpreter looks at a source code line-by-line.

Compiler converts the entire source code into Interpreter converts a line into machine
object-code and creates the object code. executable form, executes the line, and proceeds
The object code is then executed by the user. with the next line.

Once source code is compiled, the object code Interpreter executes line-by-line,
is created and that is executable.
This object code can be executed multiple During each execution, every time the source
code is first interpreted and then executed.
number of times by the user.

During execution of an object code, the Both interpreter and the source code is required
compiler is not required. during execution (because source code is
interpreted during execution).

Fast Slow

Languages that use compiler: C,C++,COBOL Languages that use interpreter Python, BASIC

The compilation process generally involves


two parts—
● breaking down the source code into
small pieces and creating an
intermediate representation
● constructing the object code for the
intermediate representation.
The compiler also reports syntax errors, if
any, in the source code.

5.3 SOFTWARE
Software tells the computer how the tasks are to be performed; hardware carries out these tasks
Types Of Software
Software can be broadly classified in two categories:
1. System Software,
2. Application Software

● System software provides the basic functions that are performed by the computer. It is
necessary for the functioning of a computer. The system software interacts with
hardware at one end and with application software at the other end. E .g. Operating
system, compiler, assembler
● Application software is used by the users to perform specific tasks(applications). The
application software interacts with the system software and the users of the computer.
E.g. Microsoft word, Paint

Fig. Software hierarchy

5.3.1 SYSTEM SOFTWARE


System software provides basic functionality to the computer. System software is required for
the working of computer itself. The user of computer does not need to be aware about the
functioning of system software, while using the computer.
The purposes ofthe system software are:
● To provide basic functionality to computer,
● To control computer hardware, and
● To act as an interface between user, application software and computer hardware.
● System software for the management and functionality of computer relates to the
functioning of different components of the computer
● System software for the development of application software provides services required
for the development and execution of application software.

I )System Software for Computer Management

5.3.2 Operating System (OS)

● Operating System (OS) is an important part of a computer. OS intermediates between the


user of a computer and the computer hardware.
● OS controls and coordinates the use of hardware among the different application software
and the users

The key functions of OS


are—
● It provides an environment in which users and application software can do work.
● It manages different resources of the computer like the CPU time, memory space, file
storage, I/O devices etc.
○ During the use of computer by other programs or users, operating system
manages various resources and allocates them whenever required, efficiently.
● It controls the execution of different programs to prevent occurrence of error.
● It provides a convenient interface to the user in the form of commands and graphical
interface, which facilitates the use of computer.

Fig:View of components of computer system


Operating system (OS) is the software that provides an interface between the computer
hardware, and the application programs or users

5.3.2.1 Objectives Of Operating System


OS has two main objectives—
(1) to make the computer system convenient and easy to use, for the user, and
(2) to use the computer hardware in an efficient way, by handling the details of the operations
of the hardware.

● OS hides the working of the hardware from the user and makes it convenient for the
user to use the machine.
● The different resources of computer hardware have to be managed and controlled.
○ This includes managing the communication between different devices, controlling
the sequence and execution of processes, allocating space on hard disk, providing
error handling procedures etc.
● OS supervises and manages the hardware of the computer.

Operating systems E.g. Microsoft Disk Operating System (MS-DOS), Windows 7, Windows
XP, Linux, UNIX, and Mac OS X Snow Leopard.

5.3.2.2 Types Of Operating Systems(OS)


OS are classified into different types depending on their capability of processing—(1) Single
user, (2) Multiuser, (3) Multitasking, (4) Multiprocessing, (5) Real time, and (6) Embedded.

5.3.2.3 Functions Of Operating Systems(OS)

Functions of OS are:
Fig. Functions of OS

5.3.3 Device Driver


● A device driver acts as a translator between the hardware and the software that uses the
devices.
● Device driver intermediates between the device and the software, in order to use the
device.
● Some devices that are commonly connected to the computer are—keyboard, mouse, hard
disk, printer, speakers, microphone, joystick, webcam, scanner, digital camera, and
monitor.
○ For proper working of a device, its corresponding device driver must be
installed on the computer.
● The device drivers of mouse, webcam, and keyboard. are pre-installed on the computer.
○ The operating system can automatically detect the device when it is connected to
the computer. Such devices are called plug and play devices.

● Each device has its own device driver .


● Whenever a new device is connected to a computer, its device driver has to be loaded
in the computer∙s memory, to enable use of the device.
○ When we buy a new printer, you get the device driver CD with it. We must install
the device driver on our computer, to use the new printer.

● Device drivers can be character or block device drivers.


○ Character device drivers are for character based devices like keyboard, which
transfer data character by character.
○ Block device driver are for devices that transfer data as a block, like in hard
disk.

Device driver (i) CD of a printer (ii) Sony audio recorder

5.3.4 System Utilities


● System utility software is required for the maintenance of computer.
● System utilities are used for supporting and enhancing the programs and the data in
computer.
● Some system utilities may come embedded with OS and others may be added later on.
● Some examples of system utilities are:
○ Anti-virus utility to scan computer for viruses.
○ Data Compression utility to compress the files.
○ Disk Cleaners
○ Cryptographic utility
○ Disk Partitioning
○ Backup Utility
● The system utilities on a computer working on Windows XP OS can be viewed by
clicking
<Start><All Programs><Accessories><System Tools>.

II) System Software for developing software


● Programming language: A Programming Language consists of a set of vocabulary and
grammatical rules, to express the computations and tasks that the computer has to
perform.
● Translator software is used to convert a program written in high-level language and
assembly language to a form that the computer can understand.
○ Three different kind of translator software:
■ Assembler
■ Compiler
■ Interpreter.
● Linker - Linker is a program that links several object modules and libraries to a single
executable program.
○ Before execution of the program, modules and the required libraries are linked
together using the linker software.
○ The compiled and the linked program are called the executable code.
● Loader - The loader software is used to load and re-locate the executable program in
the main memory. Software has to be loaded into the main memory during execution.

Fig. Hierarchy of program execution

You might also like