You are on page 1of 18

Computer Languages

There are mainly three different languages with the help of which
we can develop computer programs. And they are

 Machine Level language


 Assembly Level Language and
 High-Level Language

Machine Level Language


The computer can understand only the language of Digital
Electronics. Digital Electronics deals with the presence and
absence of voltages. Within the computer there are two logics can
play their role. These logics are −
 Positive Logic − Here presence of voltage will be denoted
by 1 and absence of voltage will be denoted by 0
 Negative Logic − Here presence of voltage will be denoted
by 0 and absence of voltage will be denoted by 1
The data can also be specified and represented using only 0s and
1s. Such a program is called Machine Language program.
Machine language was the first in the evolution of computer
programming languages. Computer directly understands a
program written in the machine language. So as a result, the
machine language program does not require any translator to
convert from one form to another. In fact, even to this day,
basically, computers understand only the 0s and 1s.
Assembly Level Language
After machine level language, the next level of development in the
evolution of computer languages was the Assembly Language.
Machine level language uses only the binary language. But on the
other hand, assembly language uses mnemonics or symbolic
instructions in place of a sequence of 0s and 1s. As fewer
examples, we can consider that to add register A and B in a
particular computer, assembly language uses the mnemonic
‘ADD B’ in place of 10001111. In assembly language, we use
symbolic names to denote addresses and data. A number of such
examples are dealt with in the successive chapters. Thus writing
a program in assembly language has advantages over writing the
same in a machine language.
High Level Language
High level language is the next development in the evolution of
computer languages. Examples of some high-level languages are
given below

 PROLOG (for “PROgramming LOGic”)


 FORTRAN (for ‘FORrmula TRANslation’)
 LISP (for “LISt Processing”)
 Pascal (named after the French scientist Blaise Pascal).
High-level languages are like English-like language, with less
words also known as keywords and fewer ambiguities. Each high
level language will have its own syntax and keywords. The
meaning of the word syntax is grammar.
Translators
Compilers, interpreters, translate programs written in high-level
languages into machine code that a computer understands. And
assemblers translate programs written in low-level or assembly
language into machine code.
1. Compiler :
The language processor that reads the complete source program
written in high-level language as a whole in one go and translates
it into an equivalent program in machine language is called a
Compiler. Example: C, C++, C#, Java.
In a compiler, the source code is translated to object code
successfully if it is free of errors. The compiler specifies the errors
at the end of the compilation with line numbers when there are
any errors in the source code. The errors must be removed before
the compiler can successfully recompile the source code again.

2. Assembler :
The Assembler is used to translate the program written in
Assembly language into machine code. The source program
is an input of an assembler that contains assembly language
instructions. The output generated by the assembler is the
object code or machine code understandable by the
computer.

3. Interpreter :
The translation of a single statement of the source program into
machine code is done by a language processor and executes
immediately before moving on to the next line is called an
interpreter. If there is an error in the statement, the interpreter
terminates its translating process at that statement and displays
an error message. The interpreter moves on to the next line for
execution only after the removal of the error. An Interpreter
directly executes instructions written in a programming or scripting
language without previously converting them to an object code or
machine code.
Example: Perl, Python and Matlab.

Difference between Compiler and Interpreter –

Compiler Interpreter
A compiler is a program that An interpreter takes a source
converts the entire source program and runs it line by
code of a programming line, translating each line as it
language into executable comes to it
machine code for a CPU.

The compiler takes a large An interpreter takes less


amount of time to analyze the amount of time to analyze the
entire source code but the source code but the overall
overall execution time of the execution time of the program
program is comparatively is slower.
faster.

Generates intermediate object No intermediate object code is


code. generated.
For Security purpose compiler The interpreter is a little
is more useful. vulnerable in case of security.
Examples: C, C++, Java Examples: Python, Perl,
JavaScript, Ruby

Software is a set of programs, which is designed to perform a


well-defined function. A program is a sequence of instructions
written to solve a particular problem.
There are two types of software −

 System Software
 Application Software
 Utility Software

System Software

The system software is a collection of programs designed to


operate, control, and extend the processing capabilities of the
computer itself. System software is generally prepared by the
computer manufacturers. These software products comprise of
programs written in low-level languages, which interact with the
hardware at a very basic level. System software serves as the
interface between the hardware and the end users.
Some examples of system software are Operating System,
Compilers, Interpreter, Assemblers, etc.
Here is a list of some of the most prominent features of a system
software −

 Close to the system


 Fast in speed
 Difficult to design
 Difficult to understand
 Less interactive
 Smaller in size
 Difficult to manipulate
 Generally written in low-level language

Application Software

Application software products are designed to satisfy a particular


need of a particular environment. All software applications
prepared in the computer lab can come under the category of
Application software.
Application software may consist of a single program, such as
Microsoft's notepad for writing and editing a simple text. It may
also consist of a collection of programs, often called a software
package, which work together to accomplish a task, such as a
spreadsheet package.
Examples of Application software are the following −

 Payroll Software
 Student Record Software
 Inventory Management Software
 Income Tax Software
 Railways Reservation Software
 Microsoft Office Suite Software
 Microsoft Word
 Microsoft Excel
 Microsoft PowerPoint

Features of application software are as follows −

 Close to the user


 Easy to design
 More interactive
 Slow in speed
 Generally written in high-level language
 Easy to understand
 Easy to manipulate and use
 Bigger in size and requires large storage space

3. Utility Software: This type of software is used to support the


computer infrastructure. It is designed to analyze, configure,
optimize and maintains the system, and take care of its
requirements as well. For example, antivirus, disk fragmenter,
memory tester, disk repair, disk cleaners, registry cleaners, disk
space analyzer, etc.
Difference between system software and application
software
Now, let us discuss some difference between system software
and application software:
System Software Application Software
It is designed to manage the It is designed to fulfill the
resources of the computer requirements of the user for
system, like memory and performing specific tasks.
process management, etc.
Written in a low-level language Written in a high-level
language
Less interactive for the users More interactive for the users
System software plays vital Application software is not so
role for the effective functioning important for the functioning of
of a system. the system, as it is task
specific.
It is independent of the It needs system software to
application software to run. run.

Operating System
An operating system (OS) is a collection of software that
manages computer hardware resources and provides common
services for computer programs. The operating system is a vital
component of the system software in a computer system.
Some popular Operating Systems include Linux Operating
System, Windows Operating System, VMS, OS/400, AIX, z/OS,
etc.
Need of Operating System:

 OS as a platform for Application programs:


Operating system provides a platform, on top of which, other
programs, called application programs can run. These
application programs help the users to perform a specific
task easily. It acts as an interface between the computer and
the user. It is designed in such a manner that it operates,
controls, and executes various applications on the computer.

 Managing Input-Output unit:


Operating System also allows the computer to manage its
own resources such as memory, monitor, keyboard, printer,
etc. Management of these resources is required for effective
utilization. The operating system controls the various system
input-output resources and allocates them to the users or
programs as per their requirement.
 Consistent user interface:
Operating System provides the user an easy-to-work user
interface, so the user doesn’t have to learn a different UI
every time and can focus on the content and be productive
as quickly as possible.

 Multitasking:
Operating System manages memory and allows multiple
programs to run in their own space and even communicate
with each other through shared memory. Multitasking gives
users a good experience as they can perform several tasks
on a computer at a time.

Functions of an Operating System

An Operating System (OS) is an interface between a computer


user and computer hardware. An operating system is a software
which performs all the basic tasks like file management, memory
management, process management, handling input and output,
and controlling peripheral devices such as disk drives and
printers.
Some popular Operating Systems include Linux Operating
System, Windows Operating System, VMS, OS/400, AIX, z/OS,
etc.
Following are some of important functions of an operating
System.
 Processor Management: This deals with the management
of the Central Processing Unit (CPU). The operating system
takes care of the allotment of CPU time to different
processes. When a process finishes its CPU processing
after executing for the allotted time period, this is called
scheduling. There is various type of scheduling techniques
that are used by the operating systems:
1. Shortest Job First(SJF): The process which needs the
shortest CPU time is scheduled first.
2. Round Robin Scheduling: Each process is assigned a
fixed CPU execution time in a cyclic way.
3. Priority Based scheduling : In this scheduling,
processes are scheduled according to their priorities,
i.e., the highest priority process is scheduled first. If
priorities of two processes match, then schedule
according to arrival time.

 Device Management:
The Operating System communicates with the hardware and
the attached devices and maintains a balance between them
and the CPU. This is all the more important because the
CPU processing speed is much higher than that of I/O
devices. In order to optimize the CPU time, the operating
system employs two techniques – Buffering and Spooling.

o Buffering:
In this technique, input and output data is
temporarily stored in Input Buffer and Output
Buffer. Once the signal for input or output is sent to
or from the CPU respectively, the operating system
through the device controller moves the data from
the input device to the input buffer and for the
output device to the output buffer. In the case of
input, if the buffer is full, the operating system
sends a signal to the program which processes the
data stored in the buffer. When the buffer becomes
empty, the program informs the operating system
which reloads the buffer and the input operation
continues.

o Spooling (Simultaneous Peripheral Operation on


Line):
This is a device management technique used for
processing different tasks on the same input/output
device. When there are various users on a network
sharing the same resource then it can be a possibility
that more than one user might give it a command at the
same point in time. So, the operating system
temporarily stores the data of every user on the hard
disk of the computer to which the resource is attached.
The individual user need not wait for the execution
process to be completed. Instead, the operating system
sends the data from the hard disk to the resource one
by one.
Example: printer

 Memory management:
In a computer, both the CPU and the I/O devices interact
with the memory. When a program needs to be executed it is
loaded onto the main memory till the execution is completed.
Thereafter that memory space is freed and is available for
other programs. The common memory management
techniques used by the operating system are Partitioning
and Virtual Memory.
 Partitioning:
The total memory is divided into various partitions of the
same size or different sizes. This helps to accommodate a
number of programs in the memory. The partition can be
fixed i.e. remains the same for all the programs in the
memory or variable i.e. memory is allocated when a program
is loaded onto the memory. The latter approach causes less
wastage of memory but in due course of time, it may
become fragmented.

 Virtual Memory:
This is a technique used by the operating systems which
allows the user to load programs that are larger than the
main memory of the computer. In this technique, the
program is executed even if the complete program can not
be loaded inside the main memory leading to efficient
memory utilization.
Virtual memory is a feature of an operating system that
enables a computer to be able to compensate shortages
of physical memory by transferring pages of data from
random access memory to disk storage. ... This process
allows for RAM to be freed up so that a computer can
complete the task.

 File Management:
The operating system manages the files, folders, and
directory systems on a computer. Any data on a computer is
stored in the form of files and the operating system keeps
the information about all of them using File Allocation Table
(FAT). The FAT stores general information about files like
filename, type (text or binary), size, starting address, and
access mode (sequential/indexed sequential/direct/relative).
The file manager of the operating system helps to create,
edit, copy, allocate memory to the files, and also updates the
FAT.
 Command interpreter- When a user types in a command it is
the job of operating system to interpret (understand and
execute) that command,

Types of Operating System

1. Batch operating system

The users of a batch operating system do not interact with the


computer directly. Each user prepares his job on an off-line
device like punch cards and submits it to the computer operator.
To speed up processing, jobs with similar needs are batched
together and run as a group. The programmers leave their
programs with the operator and the operator then sorts the
programs with similar requirements into batches.

The problems with Batch Systems are as follows −


 Lack of interaction between the user and the job.
 CPU is often idle, because the speed of the mechanical I/O
devices is slower than the CPU.

2. Time-sharing operating systems

Time-sharing is a technique which enables many people, located


at various terminals, to use a particular computer system at the
same time. Processor's time which is shared among multiple
users simultaneously is termed as time-sharing.
Multiple jobs are executed by the CPU by switching between
them, but the switches occur so frequently. Thus, the user can
receive an immediate response. Advantages of Timesharing
operating systems are as follows −
 Provides the advantage of quick response
 Reduces CPU idle time.

3. Distributed operating System

Distributed systems use multiple central processors to serve


multiple real-time applications and multiple users. Data
processing jobs are distributed among the processors
accordingly.
The processors communicate with one another through various
communication lines. These are referred as loosely coupled
systems or distributed systems. Processors in a distributed
system may vary in size and function. These processors are
referred as sites, nodes, computers, and so on.
The advantages of distributed systems are as follows −
 Better service to the customers.
 Reduction of the load on the host computer.
 Reduction of delays in data processing.

Network operating System

A Network Operating System runs on a server and provides the


server the capability to manage data, users, groups, security,
applications, and other networking functions. The primary purpose
of the network operating system is to allow shared file and printer
access among multiple computers in a network, typically a local
area network (LAN), a private network or to other networks.
Examples of network operating systems include Microsoft
Windows Server 2003, Microsoft Windows Server 2008, UNIX,
Linux, Mac OS X, Novell NetWare, and BSD.
The advantages of network operating systems are as follows −
 Centralized servers are highly stable.
 Security is server managed.
 Remote access to servers is possible from different locations
and types of systems.
The disadvantages of network operating systems are as follows
 High cost of buying and running a server.
 Dependency on a central location for most operations.
 Regular maintenance and updates are required.

Real Time operating System

A real-time system is defined as a data processing system in


which the time interval required to process and respond to inputs
is so small that it controls the environment. The time taken by the
system to respond to an input and display of required updated
information is termed as the response time. So in this method,
the response time is very less as compared to online processing.
Real-time systems are used when there are rigid time
requirements on the operation of a processor or the flow of data.
A real-time operating system must have well-defined, fixed time
constraints, otherwise the system will fail. For example, Scientific
experiments, medical imaging systems, industrial control systems,
weapon systems, robots, air traffic control systems, etc.

You might also like