BA (Computer) S1U1E
BA (Computer) S1U1E
BA (Computer) S1U1E
UNIT - 1
Lesson Nos :
1.1.2 Introduction
In the contemporary age of Information Technology, computers are used as an
ultimate initiation point pertaining to creating, managing, processing and
exchanging information. Its charisma (attraction) can be found in almost in all
walks of life such as education, communication, entertainment, banking,
business, medicine, weather forecasting, scientific research, defense, transport
reservation systems, etc.
Undoubtedly, computers are powerful tools, which can be used to perform a wide
range of functions. But they ask for clear and complete instructions to perform a
task comprehensively. That is why; use of computer is subjugated to the skills of
its user. Dexterity is directly proportional to practice it and rehearsals. Minor
distortions can lead to complete malfunctioning of this basic time and effort
saving techno-service.
High speed processing, accuracy maintained by it, massive storage capabilities,
diligence, versatility in its usage and cost effectiveness are the bare minimum
benefits. These can be easily approved to be in conjugal relationships while
using Computers for any job.
When computers were first introduced in India, cost and maintenance involved
allowed a limited number of institutions to afford computers. Only the top-of-
the-line educational institutions, such as the Indian Institute of Technology and
the Indian Institute of Management (IITs and IIMs), had a computer laboratory.
In addition to these, only government sponsored research laboratories, such as
Indian Space Research Organization (ISRO) and Bhaba Atomic Research Centre
were able to afford them. In the late 1980s, the country witnessed a sweeping
change.
There is an escalating trend towards the usage of Computers in our daily life.
Portability, owing to its small size and huge processing and storage capacity has
made it very popular. Easy to use graphical user interface, reusable software and
robust operating environments is the second critical factor, which adds to the
success story of usage of computers. Introduction of the computers into even
B.A. Part-I (Semester-I) 3 Paper : BAP-101 (Fundamentals of IT)
Computers are used for official and home use i.e you can write papers on it,
download music, play games and compose e-mail, instant message friends on it.
It is a tool for all things high-tech and a staple of the college student's life.
Computer can also help take care of simple tasks that are easy to do i.e. your
computer can wake you up in the morning, tell you when a test is, make a long-
distance phone call for you and even keep in touch with friends through video. It
is much more than a program to check e-mail. If you want to take the time,
Outlook can keep up with all your test times, homework assignments and various
dates of high importance. An easy-to-navigate planner also allows effortless
setup of recurring appointments. You can also keep in touch with friends using
a webcam with computer. It is this diligence and its versatility that makes
computers a robust machine.
Speed
The speed of modern computers is amazing. Today, the computers are able to
calculate even in pico seconds (10-12 second). A Computer can do more than 3
lac calculations like addition, substraction etc. in only one second. Its internal
speed is virtually instantaneous. This characteristic of computers is very
important and useful for human because forecasting is easy. Computers can
forecast weather in advance and thus the information of the weather can be given
well in advance to the people living at sea-shores or in hilly areas.
Accuracy
The accuracy of the computers is consistently very high. The work performed by
the computers is error-free and if there is any error, it is due to its wrong use.
Mostly the errors are made by the user himself and not by the machine. If the
programming is correct and the data feeded into the computer is accurate, then
the results furnished by the computers are always accurate. Computers are
capable of performing almost any job without any sign of tiredness.
Storage
Computer has the capability to store data on a large scale in its memory. A large
quantity of data/information can be stored in it and can be recalled in no time in
case of need. A computer has two types of memory. One is called permanent and
B.A. Part-I (Semester-I) 5 Paper : BAP-101 (Fundamentals of IT)
Communications
Today computer is mostly used to exchage messages or data through computer
networks all over the world. The information can be received or send through the
internet with the help of computer. It is the most important feature of modern IT.
Consistency
People often have difficulty to repeat their instructions again and again e.g. a
lecturer feels difficult to repeat the same lecture in a class room again and again.
Computer can repeat actions consistently without loosing its concentration.
Versatility
A Computer is capable of performing logical operations. For logical operations it
makes use of its internal control (CPU). It can perform the job given to it without
any break for a very long duration. It is capable of doing the following functions:
• It transfers the data internally.
• It can perform the functions of comparison.
• It performs arithmetical operation.
• It exchanges information with the outside world.
Automation
Automation is one of the most important characteristics of the computer. Once
the command is given to the computer, it can perform the job without the need of
human intervention until the completion of the job. If something is to be printed
in output form and the necessary instructions are given to the computer, it
transfers the data continuously to the printer until the completion of work. The
automation of computers is of utmost importance in Industries.
B.A. Part-I (Semester-I) 6 Paper : BAP-101 (Fundamentals of IT)
Diligence
Computer does not suffer from the human traits of tiredness. It is capable of
performing the job with full concentration. It can be put to work continuously for
several hours and it will perform the job with same speed and accuracy.
Due to these characteristics, the computers are being used in designing, science,
engineering, hospitals, schools and universities etc.
1.6 Limitations of Computers
Computers are very good at what they do, but there are many tasks that they
can’t do. They can’t do anything unless they are first programmed with specific
instructions. Computer can’t decide how they are to be programmed or provide
their own input; they can’t interpret the data they generate; they can’t implement
any decisions that they suggest; and they can’t “THINK”. For example they can be
programmed to store recipes, but they can’t decide to fix dinner. They can keep
track of scientific data, but they can’t conceive of express the ideas for continued
research. Their memories can contain the contents of encyclopedias, but only
humans can decide what to do with that knowledge.
The input device supplies the data to the computer. Most commonly used input
devices are: Keyboard, Magnetic tape, Floppy disk drive, Hard disk drive, Mouse,
MICR and Scanners etc. We specify the data in a form which we use in our
B.A. Part-I (Semester-I) 7 Paper : BAP-101 (Fundamentals of IT)
everyday life, that is in the numeric and alphabetic form. These are converted
into the form which computer can ‘understand’ i.e. binary form. After the
computer has processed the data, results are obtained on the output devices.
Commonly used devices are printers and plotters. The results obtained are in the
human readable form.
Normally when we say computer - that means a complete computer system.
Figure-2
Hardware:
Hardware refers to objects that we can actually touch, like disks, disk drives,
display screens, keyboards, printers, boards and chips etc.
Software:
Software is a set of instructions. It is untouchable. Software exists as ideas,
concepts, and symbols, but it has no substance. The distinction between
software and hardware is sometimes confusing because they are so integrally
linked. Clearly, when you purchase a program, you are buying software. But to
buy the software, you need to buy the disk (hardware) on which the software is
recorded.
Books provide a useful analogy. The pages and the ink are the hardware, while
the words, sentences, paragraphs and the overall meaning are the software. A
computer without software is like a book full of blank pages -- you need software
to make the computer useful just as you need words to make a book meaningful.
Similarly TV is hardware. Programs being relayed are software. If no program is
being relayed then TV is nothing but a waste box. Similarly without software
computer is nothing but a waste box.
1.1.9 Summary
Computer can be described as an information-processing machine which can
perform arithmetic operations (Addition, Subtraction, Multiplication and Division
etc.) and which can take logical decisions. Main characteristics of computer are
speed, accuracy, storage, versatility, automation and diligence. The speed of
modern computers is amazing. Today, the computers are able to calculate even in
pico seconds (10⁻12 second). A Computer can do more than 3 lac calculations
like addition, subtraction etc. in only one second. Its internal speed is virtually
instantaneous. The accuracy of the computers is consistently very high. The work
performed by the computers is error-free and if there is any error, it is due to its
wrong use. Mostly the errors are made by the user himself and not by the
machine. Computer has the capability to store data on a large scale in its
memory. A large quantity of data/information can be stored in it and can be
recalled in no time in case of need. A computer has two types of memory. One is
called permanent and another is temporary. Automation is one of the most
important characteristics of the computer. Once the command is given to the
computer, it can perform the job without the need of human intervention until
the completion of the job. Computer can be used for vast variety of applications.
Computer does not suffer from the human traits of tiredness. It is capable of
performing the job with full concentration. It can be put to work continuously for
several hours and it will perform the job with same speed and accuracy. Due to
these characteristics, the computers are being used in designing, science,
engineering, hospitals, schools and universities etc. Computer system consists of
a computer and supporting devices for input, output and storage of data. Several
types of input/output devices can be attached to the computer. The computer
does all the computing and data processing work in Central Processing Unit
(C.P.U.). Main components of CPU are Arithmetic and Logical Unit (ALU); Control
B.A. Part-I (Semester-I) 12 Paper : BAP-101 (Fundamentals of IT)
Unit (CU) and Main Memory Unit (MMU). All arithmetic operations-addition,
subtraction, multiplication, division and logical operations-comparison, decision
etc. are performed by the ALU unit. Control unit acts as a supervisor in a
computer system. It obtains instructions from the main memory, interprets them,
decides the action to be taken and directs other units to execute them. Main
memory unit stores all the data which are to be processed and the program
instructions for carrying out the processing/computing work. The main memory
is also referred to as Primary or Main storage. It is extremely fast (High speed
memory) and generally consists of magnetic cores (older systems) or semi-
conductor/microprocessors (modern systems). Information can be
entered/retrieved at random from the main memory.
1.1.10 Keywords
CPU
ALU
CU
MMU
1.1.12 Long answer type Questions
1.2.2 Introduction
In the contemporary age of Information Technology, computers are used as an
ultimate initiation point pertaining to creating, managing, processing and
exchanging information. Its charisma can be found in almost in all walks of life
such as education, communication, entertainment, banking, business, medicine,
weather forecasting, scientific research, defense, transport reservation systems,
etc.
1. Analog Computers
2. Digital Computers
3. Hybrid computers
from pocket size to large systems. All personal computers are digital. Digital
computers can be designed for special or for general purpose.
Micro computers
Mini computers
Mainframes
Super computers
Manufacturers design a vast range of computers, Input/Output devices and
software to meet different requirements of users. Computers come in various
sizes. We speak of Micro, Mini, Large, Super Computers and so on. These terms
are convenient but not precise.
1.2.4.4.3 Mainframes
Mainframe computers are generally 32-bit machines or on the higher side. These
are suited to big organisations, to manage high volume applications. Few of
popular mainframe series are MEDHA, Sperry, DEC, IBM, HP, ICL, etc.
Mainframes are also used as central host computers in distributed systems.
Libraries of application programs developed for mainframe computers are much
larger than those of the micro or minicomputers because of their evolution over
B.A. Part – I (Semester-I) 20 Paper : BAP-101 (Fundamentals of IT)
several decades as families of computing. All these factors and many more make
the mainframe computers indispensable even with the popularity of
microcomputers. Mainframes as, the name implies are used on a large scale jobs
in organizations and factories. They have enormous storage and other special
capabilities. They vary in sizes and performances. They are expensive, but larger,
quicker and smarter than their counterparts. Mainframe computers are used
when you access your bank account from a automated teller. The bank’s
mainframes handle all the transactions. A mainframe is a computer that can
process and store large amounts of information and support many users at the
same time. They can handle processing of many users at a time. Terminals are
used to connect a user to this computer and users submit there task through
mainframe. Terminal is a device which has keyboard and a screen. By using
terminal users put inputs into the computer and get the output through screen.
A small mainframe computer might be a rack of equipment about eight feet tall
and ten to twenty feet wide. It is kept in a special room with heavy air
conditioning. One of the biggest mainframe computers are those at an IRS
regional office. They take up many rooms and have hundreds of terminals, tape
stands and disk drives.
There were ten teeth on each wheel. These represented digits from 0 to 9. When a
wheel was rotated past 9, a small indicator on one wheel caused the next wheel
to rotate automatically. This way, when one wheel turned past digit 9, it
exchanged its ten teeth for one tooth on the next wheel. Pascal’s machine could
perform additions. It was later improved upon by Leibnitz, a German
mathematician whose machine could perform multiplications and divisions as
well.
Charles Babbage, an English
mathematician, developed a mechanical
calculating device, called Difference
Engine for automatic computation of
mathematical tables around 1830.
Babbage was also involved in the design
of another calculating machine which
could perform many general functions
in an automatic way. After much effort,
he constructed a machine called
Analytical Engine. This machine had
a memory device, an arithmetic device,
a punched card input system and an
external memory store. Thus, Babbage’s
analytical engine had many of the same
fundamental features as the modern
computers about which you will learn in the next lesson. However, the analytical
and difference engines were never produced commercially.
B.A. Part – I (Semester-I) 23 Paper : BAP-101 (Fundamentals of IT)
This was because of the lack of manufacturing technology at that time. But
Babbage is considered one of the great pioneers in the field of computation for his
foresight to design the analytical engine.
These were all mechanical machines and their reliability was rather poor.
Nevertheless, they laid the basis for the development of advanced
calculating machines for the future.
circuitry and magnetic drums for memory and often covered enormous space and
bulky, taking up entire rooms.
They were very expensive to operate and in addition to using a great deal of
electricity, generated a lot of heat, which was often the cause of malfunctions.
First generation computers relied on machine language to perform operations
and they could only solve one problem at a time. Their memory was limited and
used punched card and punched paper tape for input and output of data. These
machines used low level programming languages and involved manual controls.
They were special purpose machines. Their operating systems were primitive
(Operating system is a collection of programs supplied by the manufacturers. It
helps to reduce the human intervention and increase the efficiency of the
computer.)
ENIAC (Electronic Numerical Integrator and Calculator), EDSAC (Electronic
Delayed Storage Automatic Computer), UNIVAC I (Universal Automatic
Computer), IBM 650 are the examples of first generation computers.
B.A. Part – I (Semester-I) 25 Paper : BAP-101 (Fundamentals of IT)
The transistor was far superior to the vacuum tube, allowing computers to
become smaller, faster, cheaper, more energy-efficient and more reliable than
their first-generation predecessors. They required less power to operate. They
were much more reliable as compared to the first generation computers. Though
the transistor still generated a great deal of heat that subjected the computer to
damage, it was a vast improvement over the vacuum tube. Second-generation
computers still relied on punched cards and paper tapes for input and printouts
for output.
Second-generation computers moved from cryptic binary machine language to
symbolic, or assembly, languages, which allowed programmers to specify
instructions in words. High-level programming languages were also being
B.A. Part – I (Semester-I) 26 Paper : BAP-101 (Fundamentals of IT)
developed at this time, such as early versions of COBOL and FORTRAN. These
were also the first computers that stored the instructions in memory, which
moved from a magnetic drum to magnetic core technology.
Second generation computers had more speed (about 106 operations per second),
larger memory and faster Input/Output devices.
The second-generation computers span spreads over the years 1960-65. Several
companies started manufacturing computers. Systems were designed for special
applications, for business and scientific data processing.
IBM 1401, IBM 7090/7094 series, IBM 1620, Burroughs B5000, CDC 1640, GE
635, Honeywell 400 series, UNIVAC III and several others are the examples of
second-generation computers.
memory. Computers for the first time became accessible to a mass audience
because they were smaller and cheaper than their predecessors. Video display,
graphic terminals, plotters, magnetic disks, drums, tapes etc. may be used with
them.
Third generation computers were mostly general purpose, that is, they may be
used for processing business, scientific or text oriented problems. Some examples
of third generation computers are IBM 360 series, Burroughs 6700/7700 series,
CDC 6000/7000 series, Digital Equipment PDP-8/11 series, UNIVAC 1108/9
series, ICL 1900/2900 series, and so on.
During the decade optical disks emerged as mass storage particularly for read
only files.
Optical storage sizes were of order of 600MB on a 5.25 disk. The availability of
optical disks at low cost saw the emergence of multimedia applications.
Multimedia workstations emerged as widely used systems.
Computer Networks came of age. The networks become very powerful with the
advent of fibre optic Local Area Networks which could transmit 100MB/sec. to 1
GB/sec. Mainframes were replaced by powerful workstations connected by fibre
optic network.
In the area of languages C language became popular. This was followed by a new
method of design called Object Oriented Design. The primary objectives of Object
Oriented Design are to generalize programs and to reuse objects. The C++
language emerged as the most popular Object Oriented Language. One also saw a
trend towards design of specification oriented languages. PROLOG was designed
for Logic Oriented Specification Language. With the emergence of distributed
computers connected by networks considerable effort has gone into programming
distributed systems. A number of parallel computers were built but no commonly
accepted standard parallel programming language emerged.
Microprocessors also moved out of the realm of desktop computers and into
many areas of life as more and more everyday products began to use
microprocessors.
As these small computers became more powerful, they could be linked together to
form networks, which eventually led to the development of the Internet. Fourth
generation computers also saw the development of GUIs, the mouse and
handheld devices.
B.A. Part – I (Semester-I) 30 Paper : BAP-101 (Fundamentals of IT)
Third 1964- Integrate High speed 0.1 to 1 About FORTRA Data base
75 d magnetic micro- 100 N IV, managemen
Circuits cores. Large second hrs. COBOL t systems.
disks (100 68. On line
B.A. Part – I (Semester-I) 31 Paper : BAP-101 (Fundamentals of IT)
1.2.6 Summary
In the contemporary age of Information Technology, computers are used as an
ultimate initiation point pertaining to creating, managing, processing and
exchanging information. Computer can be described as an information-
processing machine which can perform arithmetic operations (Addition,
Subtraction, Multiplication and Division etc.) and which can take logical
decisions. Computers can be classified on the basis of many factors such as
Classification due to historical development of computers - On the basis of
historical development, computers are classified into five generations,
Classification according to purpose - Computers can be used either for general
purposes or for some specific purpose. Classification according to type of data-
handled techniques - According to the basic data handling principle, computers
can be classified into Analog, Digital and Hybrid computers. Analog computer
accepts, processes and generates continuous data. Digital computer accepts,
processes and generates discrete data (discontinuous data). Hybrid computers
are computers that comprise features of analog computers and digital computers.
Classification according to functionality - Based on the physical size,
performance and application areas, computers are classified into the four major
categories, viz Micro computers, Mini computers, Mainframes, Super computers.
A micro computer is a small, low cost digital computer. These computers use a
B.A. Part – I (Semester-I) 33 Paper : BAP-101 (Fundamentals of IT)
1.2.7 Keywords
ANOLOG Analog computer accepts, processes and generates
COMPUTER continuous data.
Number System
1.3.0 Introduction
1.3.1 Number Systems
1.3.2 Decimal Number System
1.3.3 Binary Number systems
1.3.4 Conversion of Binary Number System into Decimal Number System
1.3.5 Conversion of integer decimal number to binary number
1.3.6 Conversion of fractional decimal into binary number
1.3.7 Octal Number System
1.3.8 Conversion of Decimal Number System to Octal Number System
1.3.9 Conversion of Octal Number into Binary & Vice-Versa
1.3.10 Hexadecimal Number System
1.3.11 Conversion of Decimal Number to Hexadecimal
1.3.12 Conversion of Hexadecimal Number into Binary Number
1.3.13 Binary Arithmetic
1.3.13.1 Binary Addition
1.3.13.2 Binary Subtraction
1.3.13.3 Binary Multiplication
1.3.13.4 Binary Division
1.3.14 Summary
1.3.0 Introduction
Number Systems are very important to understand because the design and
organization of a computer is dependent upon the number systems. We are familiar
B.A. Part- I (Semester-I) 36 Paper : BAP-101 (Fundamentals of IT)
with decimal number system which is used in our day-to-day work. The Computer,
however, does not use the decimal number system. It uses the binary number
system which has base 2. This base 2 system uses only 2 digits, namely 0 and 1. A
user who works on a computer is allowed to use decimal digits 0, 1, 2 …9; letters A,
B, C…Z, a, b, c,……….z, usual special symbols +, -, ……. etc. for his convenience.
The decimal digits, letters, special symbols etc. are converted to binary codes in the
form of 0’s and 1’s within the computer. To understand the operation of computer
knowledge of binary, octal and hexadecimal number system is essential. This
chapter deals with these number systems.
the 4 in 400 has a different value than 4 in 40000. Hence the value of each digit in a
number depends upon the following.
a) The digit itself.
b) The base of the system
c) The position of the digit in the number.
Computer circuits have to handle only two binary digits (bits) rather than 10.
So, binary system simplifies the design, reduce the cost and improve the
reliability of computer system.
Everything that can be done with decimal system can also be done in binary
system.
2 30 0
2 15 0
2 7 1
2 3 1
0 .500
2
1 .000
Hence (.625)10= (.101)2
Observe that we have found the same fractional .6, therefore, this lead to a non
terminating binary fraction
Hence (.6)10 = ( .1001(1001))2
B.A. Part- I (Semester-I) 41 Paper : BAP-101 (Fundamentals of IT)
Recurring
8 225 1 Remainder
8 28 4
8 3
Thus (225)10=(341)8
Fractional part
.225
Digits 8
1 .800
8
6 .400
8
3 .200
8
1 .600
8
4 .800
Thus (.225)10 = .16314(6314)8
Hence (225.225)10 = 341.16314(6314))8
B.A. Part- I (Semester-I) 43 Paper : BAP-101 (Fundamentals of IT)
(225.34)8 = 2 2 5 3 4
= 010 010 101 011 100
= (010010101011100)2
Fractional Part
.225
Digits 16
3 .600
9 .600
Hence (225.225)10 = (E1.39)16
X Y SUM CARRY
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1
Carry 0 0 1
1 0 0 1
1 0 1
1 1 1 0
Carry 1 1 1
1 0 1 1 1 0 . 1 0 0 1
1 1 0 0 1 . 0 1 0 0
1 0 0 0 1 1 1 . 1 1 0 1
B.A. Part- I (Semester-I) 48 Paper : BAP-101 (Fundamentals of IT)
0 0 0 0
0 1 1 1
1 0 1 0
1 1 0 0
1 1 0
0 0 0 X
1 1 0 X X
1 1 1 1 0
1 1 0 0 1
1 0 0 1
1 1 0 0 1
0 0 0 0 0 x
0 0 0 0 0 x x
1 1 0 0 1 x x x
1 1 1 0 0 0 0 1
11 11011 1001
11
00011
11
00
B.A. Part- I (Semester-I) 50 Paper : BAP-101 (Fundamentals of IT)
1.3.14 Summary
In this chapter we have discussed the basic number system related to the computer
architecture. We have discussed the conversion between various number systems.
The part we discussed is related to Binary Arithmetic.
B.A. PART–I COMPUTER SCIENCE
SEMESTER-I PAPER – BAP-101 FUNDAMENTALS OF IT
INPUT DEVICES
1.4.1 Objectives of the lesson
1.4.2 Introduction
1.4.3 Input Devices
1.4.3.1 Punched Paper Tape
1.4.3.2 Punched Cards
1.4.3.3 Magnetic Tape
1.4.3.4 Magnetic Drum
1.4.3.5 Keyboard
1.4.3.6 Mouse
1.4.3.7 Floppy Diskette
1.4.3.8 Hard Disk Drive
1.4.3.9 Track ball
1.4.3.10 Touch Screen
1.4.3.11 Joy Stick
1.4.3.12 Digitizer Tablet/ Pen tablet
1.4.3.13 Light Pen
1.4.3.14 Scanner
1.4.3.15 MICR
1.4.3.16 Microphone
1.4.3.17 Vision System (Webcam/Digital/ Video cameras)
1.4.3.18 CD-ROM/DVD
B.A .Part - I (Semester-I) 52 Paper : BAP-101 (Fundamentals of IT)
1.4.4 Summary
1.4.5 Keywords
1.4.6 Short answer type Questions
1.4.7 Long answer type Questions
1.4.8 Suggested Readings
1.4.1 Objectives of the lesson
Objectives of this lesson are to familiarize with the various input devices, which
are being used to communicate with the computer.
1.4.2 Introduction
As already explained that to communicate with the computer, we need input and
output devices. For computer processing, data needs to be entered into the
computer through input devices and the result of processing needs to be
communicated to the user through output devices. Several input and output
devices have been developed so far. With the passage of time and with the advent
of new technologies, new advanced more efficient input and output devices have
been developed. As a result of this some of the input output devices have become
obsolete. Input/Output devices form an integral part of a computer system.
Without them, a computer is hardly of any use. The Input/Output devices are
also referred to as the Peripheral Devices. Following are some of the commonly
used input devices which are developed so far.
communication, and later for input, output and for storage medium
for minicomputers. Now-a-days these have become obsolete.
1.4.3.2 Punched Card
A punch card or punched card (or punchcard or Hollerith card or IBM
card), is a piece of stiff paper that contains digital information
represented by the presence or absence of holes in
B.A .Part - I (Semester-I) 54 Paper : BAP-101 (Fundamentals of IT)
1.4.3.5 Keyboard:
Keyboard is an input device partially modeled after the typewriter keyboard
which uses an arrangement of buttons or keys which act as electronic switches.
A keyboard typically has characters engraved or printed on the keys and each
press of a key typically corresponds to a single written symbol. However, to
produce some symbols requires pressing and holding several keys
simultaneously or in sequence. While most keyboard keys produce letters,
numbers or signs (characters), other keys or simultaneous key presses can
produce actions or computer commands.
B.A .Part - I (Semester-I) 55 Paper : BAP-101 (Fundamentals of IT)
On most computers, a keyboard is the primary text input device. (The mouse is
also a primary input device but lacks the ability to easily transmit textual
information.) The keys on computer keyboards are often classified as follows:
The computer keyboard uses the same key arrangement as the mechanical and
electronic typewriter keyboards that preceded the computer. Because many
keyboard users develop a cumulative trauma disorder, such as carpal tunnel
syndrome, a number of ergonomic keyboards have been developed. Approaches
include keyboards contoured to alleviate stress and foot-driven pedals for certain
keys or keyboard functions
B.A .Part - I (Semester-I) 56 Paper : BAP-101 (Fundamentals of IT)
1.4.3.6 Mouse
It is a small device that controls the movement of the cursor or pointer on a
display screen. It can be rolled along a hard, flat surface, in order to point to a
place on a display screen and to select one or more actions to take from that
position. Its name is derived from the real mouse as its shape, which looks a bit
like a mouse and the mouse pointer can be moved very quickly on the display
screen just like as the real mouse moves very fast. As you move the mouse, the
pointer on the display screen moves in the same direction. It contains at least one
button and sometimes as many as three, which have different functions
depending on what program is running.
The most conventional kind of mouse has two buttons on top: the left one is used
most frequently. In the Windows operating systems, it lets the user click once to
send a "Select" indication that provides the user with feedback that a particular
position has been selected for further action. The next click on a selected position
or two quick clicks on it causes a particular action to take place on the selected
object. For example, in Windows operating systems, it causes a program
associated with that object to be started. The second button, on the right, usually
provides some less-frequently needed capabilities. For example, when viewing a
Web page, you can click on an image to get a popup menu that, among other
B.A .Part - I (Semester-I) 57 Paper : BAP-101 (Fundamentals of IT)
things, lets you save the image on your hard disk. Some mouses have a third
button for additional capabilities. Some mouse manufacturers also provide a
version for left-handed people else left and right mouse buttons can also be
interchanged through software.
There are three basic types of mouse:
right or left. Users of graphic design and CAD applications can use a stylus and a
specially-sensitive pad to draw as well as move the cursor. Other display screen-
positioning ideas include a video camera that tracks the user's eye movement and
places the cursor accordingly.
Mouse can be connected to Serial, PS/2 USB port and using wireless interface.
For different ports different mouse are available.
Cordless mouse are not physically connected at all. Instead they rely on
infrared or radio waves to communicate with the computer. Cordless mice are
more expensive than both serial and bus mice, but they do eliminate the cord,
which can sometimes get in the way.
Maintenance of Mouse
1. Always use a mouse pad.
2. If there is no mouse pad then place the mouse on a clean flat surface.
3. Do not stretch the mouse cable.
4. Do not expose the mouse to excessive moisture.
5. Regularly clean you mouse to work it properly.
1.4.3.9 Trackball
A trackball is a pointing device consisting
of a ball housed in a socket containing sensors to
detect rotation of the ball about two axes—like an
B.A .Part - I (Semester-I) 59 Paper : BAP-101 (Fundamentals of IT)
Pen tablet
A digitizer tablet that is specialized for handwriting and hand marking. LCD-
based tablets emulate the flow of ink as the tip touches the surface and pressure
is applied. Non-display tablets display the handwriting on a separate computer
screen.
B.A .Part - I (Semester-I) 61 Paper : BAP-101 (Fundamentals of IT)
The Flatbed scanner is one of the most commonly used and most recommended
scanners. This scanner allows the user to place a full piece of paper, book,
magazine, photo or any other object onto the bed of the scanner and have the
capability to scan
Drum Scanners
Before the advent of desktop scanning, most images
were loaded into computers through drum scanners.
Expensive and difficult to operate, these units were
found primarily in color prepress companies.
Technicians there would carefully mount originals on
B.A .Part - I (Semester-I) 63 Paper : BAP-101 (Fundamentals of IT)
a glass cylinder, which would then be rotated at high speeds around a sensor
located in the center.
Handheld Scanners
Today, not commonly used scanner option and can be
difficult to find at stores. The handheld option allows
the user to drag over select sections of pages,
magazines, books and other objects. While it is a very
inexpensive solution, it can be tedious to drag the
handheld correctly. While scanning, it will be difficult to have a straight scan as
well as if it is moved to slow / fast can cause distortion in the image being
scanned. It is difficult to obtain a high-quality image with it.
Cardscan scanners
Excellent solution for anyone interested in scanning business cards for record
purposes.
OMR Scanners
Optical Mark Reader (OMR scanner) is a high-tech data input device.
OMR (Optical Mark Recognition) is used for recognizing optical
marks. Typical applications of OMR scanners are the processing of
questionnaires, ballots, educational tests and reporting, ordering
sheets, data statistics and evaluation in fields such as vote,
transportation, human resources, fiscal taxation and finance etc.,
where the documents to be processed are form-like and filled in by
hand by the respondents.
Bar Code scanners
A barcode reader, also called a price scanner or point-of-sale ( POS )
scanner, is a hand-held or stationary input device used
B.A .Part - I (Semester-I) 64 Paper : BAP-101 (Fundamentals of IT)
1.4.3.15 MICR
Magnetic Ink Character Recognition or MICR (pronounced my-ker or micker), a
character recognition technology adopted mainly by the banking industry to
facilitate the processing of cheques. Magnetic Ink Character Recognition is a
character recognition system that uses special ink and characters. When a
document that contains this ink needs to be read, it passes through a machine,
which magnetizes the ink and then translates the magnetic information into
characters. Numbers and characters found on the bottom of cheques (usually
B.A .Part - I (Semester-I) 65 Paper : BAP-101 (Fundamentals of IT)
containing the cheque number, sort number, and account number) are printed
using Magnetic Ink. MICR provides a secure, high-speed method of scanning and
processing information. In addition to their unique fonts, MICR characters are
printed with a magnetic ink, usually containing iron oxide. Magnetic printing is
used so that the characters can be reliably read into a system, even when they
have been overprinted with other marks such as cancellation stamps or
signatures etc. The MICR typeface has only 14 characters in it: the numbers 0-9
and special symbols.
1.4.3.16 Microphone
Input to a computer can also be given through voice via microphone. Microphone
is a device for converting sound waves into electrical energy or to convert sound
waves or signals
into electric signals. Most of the computers now have a built-in microphone to
record speech and sounds into the computer.
B.A .Part - I (Semester-I) 66 Paper : BAP-101 (Fundamentals of IT)
Digital camera
It is a camera that captures images electronically rather than on film.
The image is captured by an array of charge-
coupled devices (CCDs), stored in the camera's
random access memory or a special diskette,
and transferred to a computer for
modification, long-term storage, or printing
out. Since the technology produces a graphics
file, the image can be readily edited using
suitable software. Models designed and priced
for the mass consumer market—as opposed to costly models designed
for photojournalism and industrial photography. They appeal
particularly to users who want to send pictures over the Internet or
to crop, combine, enhance, or otherwise modify their photographs.
It records images in digital form, unlike traditional film cameras that
record a light image on film (analog), digital cameras record discrete
numbers for storage on a flash memory card or optical disc. As with
all digital devices, there is a fixed, maximum resolution and number
of colors that can be represented. Images are transferred to the
B.A .Part - I (Semester-I) 67 Paper : BAP-101 (Fundamentals of IT)
1.4.4 Summary
To communicate with the computer, we need input and output devices. For
computer processing, data needs to be entered into the computer through input
devices and the result of processing needs to be communicated to the user
through output devices. Several input and output devices have been developed so
far. With the passage of time and with the advent of new technologies new
advanced and more efficient input and output devices have been developed.
Different Input Devices are Punched Paper Tape, Punched Cards, Magnetic Tape,
Magnetic Drum, Keyboard, Mouse, Floppy Diskette, Hard Disk Drive, Track ball,
Touch Screen, Joy Stick, Digitizer Tablet/ Pen tablet, Light Pen, Scanner, MICR,
Microphone, Vision System (Digital/ Video cameras) and CD-ROM/DVD.
Punched Paper tape is a paper tape of consisting of a long strip of
paper in which holes are punched to store data. Punched card is a
piece of stiff paper that contains digital information represented by
the presence or absence of holes in predefined positions. Keyboard is
the primary text input device. The computer keyboard uses the same key
arrangement as the mechanical and electronic typewriter keyboards that
preceded the computer. Mouse is a small device that controls the movement of
the cursor or pointer on a display screen. It can be rolled along a hard, flat
surface, in order to point to a place on a display screen and to select one or more
actions to take from that position. Trackball is a pointing device consisting
of a ball housed in a socket containing sensors to detect rotation of
the ball about two axes—like an upside-down mouse. Touch Screen is
a display screen that is sensitive to the touch of a finger or stylus. It
allows a user to interact with the computer by touching pictures or
words on the screen. Joystick is a lever that moves in all directions
and controls the movement of a pointer or some other display
symbol. A joystick is similar to a mouse, except that with a mouse
the cursor stops moving as soon as you stop moving the mouse. With
a joystick, the pointer continues moving in the direction the joystick
B.A .Part - I (Semester-I) 69 Paper : BAP-101 (Fundamentals of IT)
Punched Cards
Keyboard
Mouse
B.A .Part - I (Semester-I) 70 Paper : BAP-101 (Fundamentals of IT)
Track ball
Touch Screen
Joy Stick
Light Pen
Scanner
OUTPUT DEVICES
1.5.1 OBJECTIVES OF THE LESSON
1.5.2 INTRODUCTION
1.5.3 OUTPUT DEVICES
1.5.3.1 Punched Tape
1.5.3.2 Punched Cards
1.5.3.3 Magnetic Tape
1.5.3.4 Magnetic Drum
1.5.3.5 Visual Display Units (Monitors)
1.5.3.6 Floppy Diskette
1.5.3.7 Hard Disk Drive
1.5.3.8 Printers
1.5.3.9 Plotters
1.5.3.10 Voice Response System (Speakers/Headphones)
1.5.3.11 CD - RW/DVD-RW
1.5.3.12 Multimedia Projector
1.5.4 Summary
1.5.5 Keywords
1.5.6 Short answer type Questions
1.5.7 Long answer type Questions
1.5.8 Suggested Readings
B.A. Part–I (Semester-I) 72 Paper : BAP-101 (Fundamentals of IT)
1.5.2 INTRODUCTION
As already explained that to communicate with the computer, we need input and
output devices. For computer processing, data needs to be entered into the
computer through input devices and the result of processing needs to be
communicated to the user through output devices. Several input and output
devices have been developed so far. With the passage of time and with the advent
of new technologies new advanced and more efficient input and output devices
have been developed. Following are some of the commonly used output devices
which are developed so far.
ubes (CRTs). Nearly all LCD monitors today use TFT technology. A typical 17-inch
TFT monitor has about 1.3 million pixels and 1.3 million transistors.
There are many ways to classify monitors. The most basic is in terms of color
capabilities, which separates monitors into three classes:
Monochrome : Monochrome monitors actually display two colors, one for the
background and one for the foreground. The colors can be black and white, green
and black or amber and black.
Color: Color monitors can display anywhere from 16 to over 1 million different
colors. Color monitors are sometimes called RGB monitors because they accept
three separate signals -- red, green, and blue.
Another important aspect of a monitor is its screen size. Like televisions, screen
sizes are measured in diagonal inches, the distance from one corner to the
opposite corner diagonally. These are available in different sizes like 12”, 14”, 15”,
17”,19” and 22” etc. The screen size is sometimes misleading because there is
always an area around the edge of the screen that can't be used. Therefore,
monitor manufacturers must now also state the viewable area -- that is, the area
of screen that is actually used.
B.A. Part–I (Semester-I) 75 Paper : BAP-101 (Fundamentals of IT)
Tips: -
1. Turn off the monitor when not in use
2. Keep away devices that emit electromagnetic signals.
3. Do not touch the screen with your hands or sharp objects.
4. Keep UPS/ CVTS away from monitors.
5. Make use of screen savers.
1.5.3.8 Printers
A device that prints text or illustrations. Printer is the main output device for
taking Hard copy (permanent human-readable text and/or graphics) of the
required information on documents stored in electronic form, usually on
physical print media such as paper or transparencies. Printers vary in size,
speed, sophistication and cost. In general, more expensive printers are used for
higher-resolution color printing. Printers can be distinguished as impact or non-
impact printers.
Impact printers – these printers use a type head which physically hits an
inked ribbon. It is pressed against the paper and imprints it. Due to
advancements in technology, these printers are no longer being manufactured
and the only type of impact printer which is still commonly found today, is the
dot matrix printer.
Print speed: expressed in pages per minute (ppm), For colour printers, a
distinction is generally made between monochrome and colour print speed.
Warm-up time: the waiting time necessary before the first print-out.
Onboard memory: the quantity of memory that allows the printer to store print
jobs. The higher the amount of memory, the longer the printer queue can be.
Paper format: depending on their size, printers are able to accept different sized
documents.
Paper feed: the method of loading paper into the printer, characterizing the way
in which blank paper is stored. The paper feed can change depending on where
the printer will be placed (rear loading is advised for printers that will be up
against a wall).
Interface: how the printer is connected to the computer. The main interfaces
are:
USB, Serial, Parallel, Network. There are also WiFi printers that are available
through a wireless network.
There are many different types of printers. In terms of the technology utilized,
printers fall into the following categories:
are known as Letter Quality Printers (LQP). These printers are obsolete
because they are costly, extremely noisy and very slow.
Line Printers : The line printer is a form of high speed impact printer in which
one line of type is printed at a time. They are mostly
associated with the early days of computing, but the
technology is still in use. Print speeds of 600 to 1200
lines-per-minute (approximately 10 to 20 pages per
minute) were common.
Laser Printers
The laser printer produces quality print-outs inexpensively at a high print speed.
Laser printer is a popular type of personal computer printer that uses a non-
impact (keys don't strike the paper), photocopier
technology. When a document is sent to the
printer, a laser beam "draws" the document on a
selenium-coated drum using electrical charges.
After the drum is charged, it is rolled in toner, a
dry powder type of ink. The toner adheres to the
charged image on the drum. The toner is
transferred onto a piece of paper and fused to the
paper with heat and pressure. After the document
is printed, the electrical charge is removed from the drum and the excess toner is
collected. Most laser printers print only in monochrome. A color laser printer is
more expensive than a monochrome laser printer. IBM introduced the first laser
printer in 1975 for use with its mainframe computers. In 1984, Hewlett-Packard
revolutionized laser-printing technology with its first LaserJet, a compact, fast
and reliable printer that personal computer users could afford. Since then, laser
printers have decreased further in price and increased in quality. Hewlett
Packard continues to be the leading manufacturer with competitors including
B.A. Part–I (Semester-I) 79 Paper : BAP-101 (Fundamentals of IT)
Lexmark, Okidata, and Xerox. The laser printer is different from an inkjet printer
in a number of ways. The toner or ink in a laser printer is dry. In an inkjet, it is
wet. Over time, an inkjet printer is about ten times more expensive to operate
than a laser printer because ink needs replenishing more frequently. The printed
paper from an inkjet printer will smear if wet, but a laser-printed document will
not. Because both the printers do not have mechanical heads, they operate
quickly and quietly and allow fonts to be added by using font cartridges or
installing soft fonts. If your printing needs are minimal, an inkjet printer is
sufficient. But if your printing volume is high, consider buying a laser printer.
Resolution: The standard resolution in most laser printers today is 600 dots-
per-inch (dpi). This resolution is sufficient for normal everyday printing including
small desktop publishing jobs. A high-end production printer might have a
resolution of 2400 dpi. Some laser printers still use a resolution of 300 dpi. This
resolution can cause jagged lines to appear on the outer edge of an image.
Hewlett Packard created RET (Resolution Enhancement Technology) to correct
this. RET inserts smaller dots at the edges of lines and to smooth the rough
edges. RET does not improve the resolution, but the document looks better.
1.5.3.9 Plotters
Plotters are used in the making of hard copy of graphical output. These are used
to draw sketch diagrams and designs such as maps and floor maps. Plotters
differ from printers in that they draw lines using a pen. As a result, they can
produce continuous lines, whereas printers can only simulate lines by printing a
closely spaced series of dots. Multicolor plotters use different-colored pens to
draw different colors. This means that plotters are restricted to line art rather
than creating a solid region of colours like printers. Still, plotters can shade an
area by drawing a number of close regular lines. There are two main types of
plotters:
B.A. Part–I (Semester-I) 80 Paper : BAP-101 (Fundamentals of IT)
Flatbed plotters: In this type of plotter, the paper lies flat on the plotter and a
pen moves along the paper drawing the image. Some flat bed plotters can
produce coloured images with the arm retrieving different coloured pens from the
side of the plotter. Flatbed plotters are typically used for plotting maps and
designing complicated images.
Drum plotters: In this type of plotter, the paper moves vertically (back and
forth) by means of rollers while the pen moves horizontally along the
paper. Drum
B.A. Part–I (Semester-I) 81 Paper : BAP-101 (Fundamentals of IT)
1.5.3.11 CD-RW/DVD-RW - These are discussed in the next Unit under the
heading Storage devices
Advantages: Display can include Its display can include text, graphics and
colours; Larger screen size. Small in size and portable.
1.5.5 Keywords
Keywords of this lesson are “Output devices, Visual Display Units
(Monitors), Printers, Plotters, Voice Response System
(Speakers/Headphones), CD - RW/DVD-RW, Multimedia Projector and
Plotters”. These have been explained briefly in the summary.
B.A. Part–I (Semester-I) 83 Paper : BAP-101 (Fundamentals of IT)
Punched Tape
Punched Cards
Printers
Plotters
Multimedia Projector
3. What is the difference between impact and non-impact printers ?
9.2
The control unit that operates the CPU bus system directs the information flow
through the registers and ALU by selecting the various components in the
system. For example to perform the operation
R1R2 + R3
The control must provide binary selection variables to the following selector
inputs:
1. MUX A selector (SELA): to place the contents of R2 into bus A.
2. MUX B selector (SELB): to place the contents of R3 into bus B.
3. ALU operation selector (OPR): to provide the arithmetic addition A + B.
4. Decoder destination selector (SELD): to transfer the contents of the output
bus into R1.
B.A Part-I (Semester-I) 87 Paper : BAP-101 (Fundamentals of IT)
The four control selection variables are generated in the control unit and must be
available in the beginning of the clock cycle. The data from the two source
register propagate through the gates in the multiplexers and the ALU, to the
output bus, and into the inputs of the destination register, all during the clock
cycle interval. Then, when the next clock transition occurs, the binary
information from the output bus is transferred into R1. To achieve a fast
response time, the ALU is constructed with the high speed circuits.
Control Word
There are 14 binary selection inputs in the unit, and their combined value
specifies a control word. The 14 bit control word is defined in figure 6.2 (b). It
consists of four fields. Three fields contain 3 bits each and the one field has 5
bits. The 3 bits of SELA selects the source register for the A input of the ALU. The
3 bits of SELB selects a register for the B input of the ALU. The 3 bits of SELD
select a destination register using the decoder and its seven load outputs. The 5
bits of OPR select one of the operations in the ALU. The 14 bit control word when
applied to the selection inputs specify a particular microoperation.
The encoding of the register selections is specified in the table 6.1
Table 6.1: Encoding of register selection fields
The 3 bit binary code listed in the first column of the table specifies the binary
code for each of the three fields. The register selected by fields SELA, SELB, and
SELD is the one whose decimal number is equivalent to the binary number in
the code. When SELA or SELB is 000, the corresponding multiplexer selects the
external input data. When SELD = 000, no destination register is selected but
the contents of the output bus are available in the external output.
The ALU provides arithmetic and logic operations. In addition, the CPU must
provide shift operations. The shifter may be placed in the input of the ALU to
B.A Part-I (Semester-I) 88 Paper : BAP-101 (Fundamentals of IT)
Stack Organization
A useful feature that is included in the CPU of most computers is a stack or last-
in, first-out (LIFO) list. A stack is a storage device that stores information in such
a manner that the item stored last is the first item retrieved. The operation of a
stack can be compared to a stack of trays. The last tray placed on top of the
stack is the first to be taken off.The stack in digital computers is essentially a
memory unit with an address register that can count only (after an initial value is
loaded into it). The register that holds the address for the stack is called a stack
pointer (SP) because its value always points at the top item in the stack. Contrary
to a stack of trays where the tray itself may be taken out or inserted, the physical
registers of a stack are always available for reading or writing. It is the content of
the word that is inserted or deleted.The two operations of a stack are the
insertion and deletion of items. The operation of insertion is called push (or push-
down) because it can be thought of as the result of pushing a new item on top.
The operation of deletion is called pop (or pop-up) because it can be thought of as
the result of removing one item so that the stack pops up. However, nothing is
pushed or popped in a computer stack. These operations are simulated by
incrementing or decrementing the stack pointer register.
B.A Part-I (Semester-I) 89 Paper : BAP-101 (Fundamentals of IT)
Register Stack
A stack can be placed in a portion of a large memory or it can be organized as a
collection of a finite number of memory words or registers. Figure 6.3 shows the
organization of a 64-word register stack. The stack pointer register SP contains a binary
number whose value is equal to the address of the word that is currently on top of the
stack. Three items are placed in the stack: A, B, and C, in that order. Item C is on top of
the stack so that the content of SP is now 3. To remove the top item, the stack is
popped by reading the memory word.At address 3 and decrementing the content of SP.
Item B is now on top of the stack since SP holds address 2. To insert a new item, the
stack is pushed by incrementing SP and writing a word in the next-higher location in
the stack Note that item C has been read out but not physically removed. This does not
matter because when the stack is pushed, a new item is written in its place.
In a 64-word stack, the stack pointer contains 6 bits because 26 = 64. Since
SP has only six bits, it cannot exceed a number greater than 63 (111111 in
binary). When 63 is incremented by 1, the result is 0 since 111111 + 1 =
1000000 in binary, but SP can accommodate only the six least significant bits.
Similarly, when 000000 is decremented by 1, the result is 111111. The one-bit
register FULL is set to 1 when the stack is full, and the one-bit register EMTY is
set to 1 when the stack is empty of items. DR is the data register that holds the
binary data to be written into or read out of the stack.
Initially, SP is cleared to 0, EMTY is set to 1, and FULL is cleared to 0, so that SP
points to the word at address 0 and the stack is marked empty and not full. If the
stack is not full (if FULL = 0), a new item is inserted with a push operation. The
push operation is implemented with the following sequence of microoperations:
SPSP+1 Increment stack pointer
M [SP]DR Write item on the top of the stack.
If (SP=0) then (FULL1) Check if status if full
EMTY0 Mark the stack not empty
The stack pointer is incremented so that it points to the address of the next-
higher word. A memory write operation inserts the word from DR into the top of
the stack. Note that SP holds the address of the top of the stack and that M [SP]
denotes the memory word specified by the address presently available in SP. The
first item stored in the stack is at address 1. The last item is stored at address 0.
If SP reaches 0, the stack is full of items, so FULL is set to 1. This condition is
reached if the top item prior to the last push was in location 63 and, after
incrementing SP, the last item is stored in location 0. Once an item is stored in
location 0, there are no more empty registers in the stack. If an item is written in
the stack, obviously the stack cannot be empty, so EMTY is cleared to 0.
A new item is deleted from the stack if the stack is not empty (if EMTY = 0). The
pop operation consists of the following sequence of microoperations:
DRM [SP] Read item form the top of stack
SPSP-1 Decrement stack pointer
If (SP=0) then (EMTY1) Check if stack is empty
FULL0 Mark the stack not full
The top item is read from the stack into DR. The stack pointer is then
B.A Part-I (Semester-I) 91 Paper : BAP-101 (Fundamentals of IT)
decremented. If its value reaches zero, the stack is empty, so EMTY is set to 1.
This condition is reached if the item read was in location 1. Once this item is read
out, SP is decremented and reaches the value 0, which is the initial value of SP.
Note that if a pop operation reads the item from location 0 and then SP is
decremented, SP changes to 111111, which is equivalent to decimal 63. In this
configuration, the word in address 0 receives the last item in the stack. Note also
that an erroneous operation will result if the stack is pushed when FULL = 1 or
popped when EMTY = 1.
Memory Stack
A stack can exist as a stand-alone unit as in Fig. 6.3 or can be implemented in a
random-access memory attached to a CPU. The implementation of a stack in the
CPU is done by assigning a portion of memory to a stack operation and using a
processor register as a stack pointer. Figure 6.4 shows a portion of computer
memory partitioned into three segments:
Program, Data and Stack. The program counter PC points at the address of the
next instruction in the program. The address register AR points at an array of
data. The stack pointer SP points at the top of the stack. The three registers are
connected to a common address bus, and either one can provide an address for
memory. PC is used during the fetch phase to read an instruction. AR is used
during the execute phase to read an operand. SP is used to push or pop items
into or from the stack.
6.4
B.A Part-I (Semester-I) 92 Paper : BAP-101 (Fundamentals of IT)
As shown in Fig. 6.4, the initial value of SP is 4001 and the stack grows with
decreasing addresses. Thus the first item stored in the stack is at address 4000,
the second item is stored at address 3999, and the last address that can be used
for the stack is 3000. No provisions are available for stack limit checks.
We assume that the items in the stack communicate with a data register DR. A
new item is inserted with the push operation as follows:
SPSP-1
M [SP]SP
The stack pointer is decremented so that it points at the address of the next
word. A memory write operation inserts the word from DR into the top of the
stack. A new item is deleted with a pop operation as follows:
DRM [SP]
SPSP+1
The top item is read from the stack into DR. The stack pointer is then incre-
mented to point at the next item in the stack.
Most computers do not provide hardware to check for stack overflow (full stack)
or underflow (empty stack). The stack limits can be checked by using two
processor registers: one to hold the upper limit (3000 in this case), and the other
to hold the lower limit (4001 in this case). After a push operation, SP is compared
with the upper-limit register and after a pop operation, SP is compared with the
lower-limit register.
The two microoperations needed for either the push or pop are (1) an access to
memory through SP, and (2) updating SP. Which of the two microoperations is
done first and whether SP is updated by incrementing or decrementing depends
on the organization of the stack. In Fig. 2.4 the stack grows by decreasing the
memory address. The stack may be constructed to grow by increasing the
memory address as in Fig. 2.3. In such a case, SP is incremented for the push
operation and decremented for the pop operation. A stack may be constructed so
that SP points at the next empty location above the top of the stack. In this case
the sequence of microoperations must be interchanged.
A stack pointer is loaded with an initial value. This initial value must be the
bottom address of an assigned stack in memory. Henceforth, SP is automatically
decremented or incremented with every push or pop operation. The advantage of
a memory stack is that the CPU can refer to it without having to specify an
B.A Part-I (Semester-I) 93 Paper : BAP-101 (Fundamentals of IT)
address, since the address is always available and automatically updated in the
stack pointer.
Example Let two operand X and Y be added then polish notation will be + X
Y
Instructions Formats
The physical and logical structure of computer is normally described in reference
manuals provided with the system. Such manuals explain the internal
construction of the CPU, including the processor registers available and their
logical capabilities. They list all hardware-implemented instructions, specify their
binary code format, and provide a precise definition of each instruction. A
computer will usually have a variety of instruction code formats. It is the function
of the control unit within the CPU to interpret each instruction code and provide
the necessary control functions needed to process the instruction.
The format of an instruction is usually depicted in a rectangular box symbolizing
the bits of the instruction as they appear in memory words or in a control
register. The bits of the instruction are divided into groups called fields. The most
common fields found in instruction formats are:
1. An operation code field that specifies the operation to be performed.
2. An address field that designates a memory address or a processor register.
3. A mode field that specifies the way the operand or the effective address is
determined.
Other special fields are sometime employed under certain circumstances, as for
example a field that gives the number of shifts in a shift type instruction.
The operation code field of an instruction is a group of bits that define various
processor operations such as add, subtract, complement and shift.
The bits that define the mode field of an instruction code specify a variety of
alternatives for choosing the operands from the given address. Operations
specified by computer instructions are executed on some data stored in memory
or processor registers. Operands residing in memory are specified by their
memory address. Operands residing in processor registers are specified with a
register address. A register address is a binary number of k bits that defines one
of 2k registers in the CPU. Thus a CPU with 16 processor registers R0 through
R15 will have a register address field of four bits. The binary number 0101, will
designate register R5.
Computers may have instructions of several different lengths containing varying
number of addresses. The number of address fields in the instruction format of a
computer depends on the internal organisation of its registers. Most computers
fall into one of the three types of CPU organization :
B.A Part-I (Semester-I) 95 Paper : BAP-101 (Fundamentals of IT)
operands with an address field since all operands are implied to be in the stack.
MEMORY
1.7.1 Objectives of the lesson
1.7.2 Introduction
1.7.3 Some basic definitions
1.7.4 Units to measure the capacity of memory
1.7.5 Units for Measurement of Speed
1.7.6 Access and Access time
1.7.7 Random and Sequential access
1.7.8 Primary Memory
1.7.9 Secondary Memory
1.7.10 Type of Computer Memories - On the basis of technology:
1.7.10.1 Magnetic core memory:
1.7.10.2 Semiconductor Memory :
1.7.11 Classification of memories on the basis of functionality
1.7.12 Sequential and Random Access Memories :
1.7.13 Random Access Memory (RAM) :
1.7.13.1 DRAM
1.7.13.2 SRAM
1.7.13.3 SDRAM
1.7.13.4 DDR-SDRAM
1.7.14 Read Only Memory (ROM) :
1.7.14.1 PROM (Programmable, Read Only Memory)
B.A. Part-I (Semester-I) 100 Paper : BAP-101 (Fundamentals of IT)
1.7.2 Introduction
As already explained in previous lessons that computer consists of Primary/Main
memory and secondary memory. Main memory is the electronic place for holding
the instructions and data that computer's microprocessor can reach quickly.
Before proceeding further, we need to refresh some of the terms, which are
covered in the previous unit.
Byte:
A byte is the basic unit of measurement of information storage in computer
science. In many computer architectures it is a unit of memory addressing, most
often consisting of eight bits. A byte is one of the basic integral data types in
some programming languages, especially system programming languages.
A byte is an ordered collection of bits, with each bit denoting a single binary value
of 1 or 0. The size of a byte can vary and is generally determined by the
underlying computer operating system or hardware, although the 8-bit byte is
the standard in most of the systems. Historically, byte size was determined by the
number of bits required to represent a single character from a Western character
set. Its size was generally determined by the number of possible characters in the
supported character set and was chosen to be a divisor of the computer's word
size. Historically bytes have ranged from five to twelve bits.
Since computer memory comes in a Power of two rather than 10, a large portion
of the software and computer industry use binary estimates of the quantities,
8 bits = 1 byte
1024 bytes = 1 kilobyte (KB)
1024 KB = 1 megabyte (MB)
1024 MB = 1 gigabyte (GB)
1024 GB = 1 terabyte (TB)
small. Such memories were bulky and very slow. Alternative memory elements
have been developed. Commonly used are magnetic cores and semi conductor
memories.
Random access memory indicates that the information stored anywhere in the
memory can be reached directly. There is no step by step scan involved in this.
Magnetic core and semiconductor memories are examples of this. Generally,
Random Access Memories are much faster than sequential access memories.
bytes of RAM and a hard disk that can hold 40 billion bytes. RAM comes in the
form of "discrete" (meaning separate) microchips and also in the form of modules
that plug into holes in the computer's motherboard. These holes connect through
a bus or set of electrical paths to the processor. The hard drive, on the other
hand, stores data on a magnetized surface that looks like a phonograph record.
Most personal computers are designed to allow you to add additional RAM
modules up to a certain limit. Having more RAM in the computer reduces the
number of times that the computer processor has to read data in from the hard
disk, an operation that takes much longer than reading data from RAM. (RAM
access time is in nanoseconds; hard disk access time is in milliseconds.)
Following are the some of the popular types of RAM, which are being
used.
1.7.13.1 DRAM
Dynamic random access memory (DRAM) is a type of random access memory that
stores each bit of data in a separate capacitor within an integrated circuit. Since real
capacitors leak charge, the information eventually fades unless the capacitor charge
is refreshed periodically. Because of this refresh requirement, it is a dynamic
memory as opposed to SRAM and other static memory. Its advantage over SRAM is
its structural simplicity: only one transistor and a capacitor are required per bit,
compared to six transistors in SRAM. This allows DRAM to reach very high density.
Like SRAM, it is in the class of volatile memory devices, since it loses its data when
the power supply is removed.
1.7.13.2 SRAM
Static random access memory (SRAM) is a type of semiconductor memory. The
word "static" indicates that the memory retains its contents as long as power
remains applied, unlike dynamic RAM (DRAM) that needs to be periodically
refreshed (nevertheless, SRAM should not be confused with read-only memory
and flash memory, since it is volatile memory and preserves data only while
power is continuously applied).
1.7.13.3 SDRAM
Short for Synchronous DRAM, a type of DRAM that can run at much higher clock
speeds than conventional memory. SDRAM actually synchronizes itself with the
CPU's bus
B.A. Part-I (Semester-I) 107 Paper : BAP-101 (Fundamentals of IT)
1.7.13.4 DDR-SDRAM
Short for Double Data Rate-Synchronous DRAM, a type of SDRAM that supports
data transfers on both edges of each clock cycle (the rising and falling edges),
effectively doubling the memory chip's data throughput. DDR-SDRAM also
consumes less power, which makes it well-suited to notebook computers.
1.7.19 Summary
A bit is a binary digit, taking a value of either 0 or 7. Binary digits are a basic
unit of information storage and communication in digital computing and digital
information theory. A byte is an ordered collection of bits, with each bit denoting
a single binary value of 1 or 0. Bit, Byte, Kilobytes, Megabytes, Gigabytes and
Terabytes are the units for measuring the capacity of memory. In computer
science speed is measured in Millisecond, Microsecond, Nanosecond,
Picosecond and Femtosecond. Magnetic core memory, or ferrite-core
memory, is an early form of computer memory. It uses small magnetic ceramic
rings, the cores, to store information. Semiconductor memory consists of
electronic circuits prepared on silicon- chips. RAM, as the name suggests, is a
Random access type memory. Information can be read or written into the
memory at random. RAM a memory chip is an integrated circuit (IC) made of
millions of transistors and capacitors. Dynamic random access memory
(DRAM) is a type of random access memory that stores each bit of data in a
B.A. Part-I (Semester-I) 110 Paper : BAP-101 (Fundamentals of IT)
1.7.20 Keywords
Keywords of this lesson are Bit, Byte, Millisecond, Microsecond, Nanosecond,
Picosecond, Femtosecond, Attosecond, Access time, Random and Sequential
access, Primary Memory, Secondary Memory, Magnetic core memory,
Semiconductor Memory, RAM, DRAM, SRAM, SDRAM, DDR-SDRAM, ROM,
PROM, EPROM, EEPROM, Flash and Cache Memory.
Write short notes on RAM, ROM, DRAM, SRAM, PROM AND EPROM.
STORAGE DEVICES
1.8.1 Objectives of the lesson
1.8.2 Introduction
1.8.3 Random and Sequential Storage devices
1.8.4 Storage Devices
1.8.4.1 Punched Paper Tape
1.8.4.2 Punched Cards
1.8.4.3 Paper
1.8.4.4 Magnetic Tape
1.8.4.5 Magnetic Drum
1.8.4.6 Floppy Diskette
1.8.4.7 Hard Disk Drive
1.8.4.8 Compact Disk
1.8.4.9 DVD
1.8.4.10 USB/Pen drives
1.8.5 Summary
1.8.6 Keywords
1.8.7 Short answer type Questions
1.8.8 Long answer type Questions
1.8.9 Suggested Readings
1.8.2 Introduction
Computer storage refers to the data stored in an electromagnetic form to be used
by the processor. The amount of data stored on a computer can be measured just
as we can measure the amount of water in a container, although measurement
units are different. The storage capacity defines the amount of data that can be
stored on a storage device. Units to measure the memory or storage capacity have
been discussed in earlier lesson.
Normally, when we talk about memory, we mean the primary memory, when we
talk about storage, we mean the secondary memory. Various types of primary
memories have been discussed in the previous lesson. In this lesson, we will
discuss about the various devices, which are used for secondary storage devices.
These are the physical mediums that hold the much larger amounts of data that
won't fit into RAM and may not be immediately needed there. Commonly storage
devices include hard disks, floppy disks, CD-ROM, DVD and Pen drives. The
terms auxiliary storage, auxiliary memory and secondary memory have also been
used for this kind of data repository. There are number of devices which can be
used as input, output and storage purposes. Following are some of the commonly
used storage devices. These devices can be used to store the information
permanently. The main advantages of these are that these devices can store the
huge amount of information and data and very less space is required to store
these.
Punched Cards
Paper
Magnetic Tape
Magnetic Drum
Floppy Diskette
Compact Disk
DVD
USB/Pen drives
B.A. Part-I (Semester-I) 114 Paper : BAP-101 (Fundamentals of IT)
A floppy disk looks like a phonogram record. It is provided with a protective card
board envelope. Usually Floppies come in 51/4 ” and 3.5 ” sizes in capacities of
360 KB, 1.2 MB and 1.44 MB. Different types of Floppies have different tracks
like 48 TPI, 96 TPI. TPI stands for Tracks per inch. Some Floppies are Single Side
Single Density (SSSD), some are Double Side Double Density (DSDD) and some
are Double Side High Density (DSHD). Floppy disk drive is a random access
device.
B.A. Part-I (Semester-I) 117 Paper : BAP-101 (Fundamentals of IT)
8-inch: The first floppy disk design, invented by IBM in the late 1960s and used
in the early 1970s as first a read-only format and then as a read-write format.
5¼-inch: The common size for PCs made before 1987 and the predecessor to
the 8-inch floppy disk. This type of floppy is generally capable of storing between
100K and 1.2MB (megabytes) of data. The most common sizes are 360K and
1.2MB.
digital form. CDs have replaced the phonograph record and tape recorders for
playing back music. At home, CDs have tended to replace the tape cartridge
although the latter is still widely used in cars and portable playback devices.
Initially, CDs were read-only, but newer technology allows users to record as well.
CDs will probably continue to be popular for music recording and playback. A
newer technology, the digital versatile disc (DVD), stores much more in the same
space and is used for playing back movies.
CD ROM
(Compact Disc, read-only-memory) - is an adaptation of the CD that is designed
to store computer data in the form of text and
graphics, as well as hi-fi stereo sound. CD-ROM is a
drive which reads aluminum-coated round plastic
discs, however does not write to the discs. Similar to
FDD, Diskette or disk or disc is the media and to
read or write on this, we need the corresponding
drive.
Standard CD-ROM diskettes are 120 mm (4.75
inches) in diameter and 1.2 mm (0.05 inches) thick.
The diskette is made of a polycarbonate wafer and is
coated with a metallic film, usually an aluminum alloy. This aluminum film is the
portion of the disc that the CD-ROM drive reads for information. The aluminum
film is then covered by a plastic polycarbonate coating that protects the
underlying data. A label will usually be placed on the top of the disc and data is
read from the bottom of the CD.
Today, CD-ROMs are standardized and work in any standard CD-ROM drive. CD-
ROM drives can also read audio compact discs for music, although CD players
cannot read CD-ROM discs.
The CD-ROM, like other CD adaptations, has data encoded in a spiral track
beginning at the center and ending at the outermost edge of the disc. The spiral
track holds approximately 650 MB of data. That's about 5.5 billion bits. The
distance between two rows of pits, measured from the center of one track to the
center of the next track is referred to as track pitch. The track pitch can range
from 1.5 to 1.7 microns, but in most cases is 1.6 microns.
Constant Linear Velocity (CLV) is the principle by which data is read from a CD-
ROM. This principal states that the read head must interact with the data track
B.A. Part-I (Semester-I) 121 Paper : BAP-101 (Fundamentals of IT)
CD-R
(CD Recordable) – On these types of diskettes data can be written only once. Once
it is written, it cannot be erased.
CD-RW
(Compact disc, rewriteable) is a compact disc (CD) format that allows repeated
recording on a disc. Now any user with a CD Recorder drive could create their
own CDs from their desktop computers. CD-RW drives can write both CD-R and
CD-RW discs and can read any type of CD. Only drives designated as "Multi
Read" can read CD-RW diskettes reliably.
CD-RW discs usually hold 74 minutes (650
MB) of data, although some can hold up to
80 minutes (700 MB) and, according to some
reports, can be rewritten as many as 1000
times. With packet writing software and a
compatible CD-RW drive, it is possible to
save data to a CD-RW in the same way as
one can save it to a floppy disk. CD
recorders (usually referred to as CD
burners), were once much too expensive for the home user, but now are similar
in price to CD-ROM drives. CD-RW drive is a popular alternative to the CD-R
drive.
1.8.4.9 DVD
Digital Video Disc or Digital Versatile Disc - An optical digital disc for storing
movies and data. disc uses the same diameter platter as a CD (120mm/4.75"
diameter), but holds 4.7GB (of digital information on a single-sided, single-layer
disc) rather than 700MB. High-density double-sided compact disc can store up to
B.A. Part-I (Semester-I) 122 Paper : BAP-101 (Fundamentals of IT)
Originally these were named as "Digital Video Disc." Since the technology
became important to the computer world, the "video" was dropped, and it was
dubbed as "Digital Versatile Disc" by the DVD Forum.
computer. USB flash drives have less storage capacity than an external hard
drive, but they are smaller and more durable because they do not contain any
internal moving parts.
USB flash drives also are called thumb drives, jump drives, pen drives, key
drives, tokens, or simply USB drives.
Wireless USB
The wireless version of the universal serial bus (USB). Using ultra-wideband
(UWB) technology, wireless USB is designed to provide the same 480 Mbits/sec
data rate as USB 2.0 within two meters (6.6 ft.) or 110 Mbps within 10 meters (33
ft.). Although it can be used with desktop computers, wireless USB makes it easy
to connect and disconnect USB peripherals from a laptop.
1.8.5 Summary
Paper is the most common and convenient method to store the information
permanently. Normally printers and plotters are used to store the information on
this media. Drawback of this is, once this medium is used, it can not be re-used.
Magnetic Tape is a sequential storage medium used for data collection, backup
and archiving. Like videotape, computer tape is made of flexible plastic with one
side coated with a ferromagnetic material. Magnetic Drum is an early high-
speed, direct access storage device that used a magnetic-coated cylinder with
tracks around its circumference. Each track had its own read/write head.
Floppy disk drive (FDD) is a drive that can read and write to floppy disks. A
floppy disk looks like a phonogram record. It is provided with a protective card
board envelope. Usually Floppies come in 51/4 ” and 3.5 ” sizes in capacities of
360 KB, 1.2 MB and 1.44 MB. Hard disk drive is a sealed box consisting of
number of magnetic disks and having storage capacity much more than floppy
diskette. Normally hard disk is part of a computer. It provides relatively quick
access to large amounts of data on an electromagnetically charged surface or set
of surfaces. Portable hard disk drive is a drive that is plugged into an
external port of a computer such as USB or FireWire. USB Hard Disk Drive is
a portable hard disk drive fitted in a safe case having USB Connectivity. It is
faster and reliable than pen drives. The only caution is to handle it with care.
Compact Disk is also called optical disc. A nonmagnetic, polished metal disk
used to store digital information. The disk is read by a optical scanning
mechanism that use a high-intensity light source, such as a laser, and mirrors. A
compact disc [sometimes spelled disk] (CD) is a small, portable, round medium
B.A. Part-I (Semester-I) 125 Paper : BAP-101 (Fundamentals of IT)
made of molded polymer (close in size to the floppy disk) for electronically
recording, storing, and playing back audio, video, text, and other information in
digital form. CD ROM is an adaptation of the CD that is designed to store
computer data in the form of text and graphics, as well as hi-fi stereo sound. CD-
R - (CD Recordable) – On these types of diskettes data can be written only once.
Once it is written, it cannot be erased. CD-RW (Compact disc, rewriteable) is a
compact disc (CD) format that allows repeated recording on a disc. DVD (Digital
Versatile Disc) is an optical digital disc for storing movies and data. disc uses the
same diameter platter as a CD (120mm/4.75" diameter), but holds 4.7GB (of
digital information on a single-sided, single-layer disc) rather than 700MB. High-
density double-sided compact disc can store up to 17 gigabytes of digital data-
roughly the equivalent of 24 CDs. It is a better medium for distributing feature-
length films than videocassettes. DVDs can be recorded on both sides as well as
in dual layers. DVD drives/players can read most CD media as well. Originally
these were named as "Digital Video Disc." Since the technology became
important to the computer world, the "video" was dropped, and it was dubbed as
"Digital Versatile Disc" by the DVD Forum. Read-Only Data DVDs - DVD-
ROM are designed for data files, a DVD-ROM disc is a higher-capacity CD-ROM.
Writable/Recordable Data DVDs - DVD-RAM is a rewritable DVD that
functions like a removable hard disk. It uses a phase-change technology like the
CD-RW drives. DVD-RAM media can be rewritten 100,000 times before they are
no longer usable. Pen Drives is a flash memory card that plugs into the
computer's USB port. Small enough to hook onto a keychain, it emulates a small
disk drive and allows data to be easily transferred from one machine to another.
1.8.6 Keywords
Keywords of this lesson are Random and Sequential Storage devices, Storage
Devices, Punched Paper Tape, Punched Cards, Paper, Magnetic Tape, Magnetic
Drum, Floppy Diskette, Hard Disk Drive, Compact Disk, DVD, USB/Pen drives
COMPUTER LANGUAGES
1.9.1 Objectives of the lesson
1.9.2 Introduction
1.9.3 Computer/Programming Languages
1.9.4 Source code
1.9.5 Object code
1.9.6 Classifications of Computer Languages
1.9.6.1 Low level languages
1.9.6.2 High Level Languages
1.9.6.3 Machine Languages
1.9.6.4 Assembly Languages
1.9.7 Historical development of computer languages
1.9.7.1 First Generation Languages
1.9.7.2 Second Generation Languages
1.9.7.3 Third generation Languages
1.9.7.4 Fourth generation Languages
1.9.7.5 Fifth generation languages
1.9.7.6 Sixth generation languages
1.9.8 Translators
1.9.9.1 Assemblers
1.9.9.2 Interpreters
1.9.9.3 Compilers
B.A. Part-I (Semester-I) 128 Paper : BAP-101 (Fundamentals of IT)
1.9.9 Summary
1.9.10 Keywords
1.9.11 Short answer type Questions
1.9.12 Long answer type Questions
1.9.13 Suggested Readings
1.9.2 Introduction
A language is nothing but a way of communication. We, human beings, use
natural languages like Hindi, Punjabi, English, Urdu, Persian and Spanish etc. to
communicate our ideas and emotions with each other. Similarly we communicate
with the computer in the language understood by the computer. The language
understood by the computer is known as Computer language. The language,
which the user employs to interact with the computer, is known as Programming
or Computer Language. Computer needs to be given instructions to perform each
task. The instructions are given in the form of computer programs. The process of
giving instructions using computer languages is known as programming or
coding.
common man until other languages such as assembly and especially high level
languages were developed.
Move the value 61h (or 97 decimal; the h-suffix means hexadecimal)
into the processor register named "AL".
The mnemonic "mov" represents the opcode 1011 which moves the value in the
second operand into the register indicated by the first operand.
B.A. Part-I (Semester-I) 133 Paper : BAP-101 (Fundamentals of IT)
prone to errors. A simple algorithm resulted in lengthy code. This was then
improved to mnemonic codes to represent operations.
another factor as these languages were machine independent and could run on
different machines. The advantages of high level languages include the support
for ideas of abstraction so that programmers can concentrate on finding the
solution to the problem rapidly, rather than on low-level details of data
representation. The comparative ease of use and learning, improved portability
and simplified debugging, modifications and maintenance led to reliability and
lower software costs. Some languages were improved over time and some were
influenced by previous languages, taking the desired features thought to be good
and discarding unwanted ones. New features were also added to the desired
features to make the language more powerful. Then, there were languages that
evolved from other languages like LISP1 developed in 1959 for artificial
intelligence work, and had strong influences languages like MATHLAB, LPL and
PL/I. Language like BALM had the combined influence of ALGOL-60 and LISP.
These third generation languages are less processor dependent than lower level
languages. An advantage in languages like C++ is that it gives the programmers a
lot of control over how things are done in creating applications. This control
however calls for more in depth knowledge of how the operating system and
computer works. Many of the real programmers now still prefer to use these
languages despite the fact the programmer having to devote a substantial
professional effort to the leaning of a new complicated syntax which sometimes
have little relation to human-language syntax even if it is in English. Third
generation languages often followed procedural code, meaning the language
performs functions defined in specific procedures on how something is done. A
disadvantage with fourth generation languages was they were slow compared to
compiled languages and they also lacked control. Programmers whose primary
interests are programming and computing use third generation languages and
programmers who use the computers and programs to solve problems from other
applications are the main users of the fourth generation languages.
generation languages quite clearly are that it must be user friendly, portable and
independent of operating systems, usable by non-programmers, having intelligent
default options about what the user wants and allowing the user to obtain results
fasts using minimum requirement code generated with bug-free code from high-
level expressions (employing a data-base and dictionary management which
makes applications easy and quick to change), which was not possible using
COBOL or PL/I. Examples of this generation of languages are IBM's ADRS2, APL,
CSP and AS, Power Builder, Access. 4GL and 5GL projects are more oriented
toward problem solving and systems engineering. All 4GLs are designed to reduce
programming effort, the time it takes to develop software, and the cost of software
development. Just as the 3GL offered greater power to the programmer, so too
did the 4GL open up the development environment to a wider population. In
terms of applications, a 4GL could be business oriented or it could deal with
some technical domain.
One of the early (and portable) languages that had 4GL properties was Ramis
developed by Gerald C. Cohen at Mathematica, a mathematical software
company. Cohen left Mathematica and founded Information Builders to create a
similar reporting-oriented 4GL, called Focus. Later 4GL types are tied to a
database system and are far different from the earlier types in their use of
techniques and resources that have resulted from the general improvement of
computing with time. An interesting twist to the 4GL scene is realization that
graphical interfaces and the related reasoning done by the user form a 'language'
that is poorly understood. A disadvantage with fourth generation languages was
they were slow compared to compiled languages and they also lacked control.
A number of different types of 4GLs exist:
Report generators take a description of the data format and the report to
generate and from that they either generate the required report directly or
they generate a program to generate the report.
Panther
PowerBuilder
SQLWindows/Team Developer
WinDev
Up ! 5GL
Genero
B.A. Part-I (Semester-I) 138 Paper : BAP-101 (Fundamentals of IT)
SB+/SystemBuilder
Informix-4GL
NATURAL
Progress 4GL
SQL
Report generators
BuildProfessional
GEMBase
IDL-PV/WAVE
LINC
Metafont
NATURAL
Oracle Reports
Quest
Report Builder
RPG-II
ABAP
Aubit-4GL
CorVision
Culprit
DASL
FOCUS
GraphTalk
IDL
IGOR Pro
Informix-4GL
LANSA
LabVIEW
Mathematica
MATLAB
NATURAL
Nomad
PL/SQL
Progress 4GL
PROIV
R
Ramis
S
SAS
SPSS
Stata
Synon
XBase++
SQR
B.A. Part-I (Semester-I) 140 Paper : BAP-101 (Fundamentals of IT)
Data-stream languages
APE
AVS
Iris Explorer
SB+/SystemBuilder
Progress Dynamics
UNIFACE
SB+/SystemBuilder
Oracle Forms
Unify Accell
GUI creators
4th Dimension (Software)
eDeveloper
MATLAB's GUIDE
Omnis Studio
OpenROAD
Sculptor 4GL
B.A. Part-I (Semester-I) 141 Paper : BAP-101 (Fundamentals of IT)
CSS
1.9.8 Translators
As already mentioned, the only language that a computer can understand is the
so called machine language. To convert Assembly language and high level
language programs into machine language, we need translators. Normally for this
purpose Assemblers, Interpreters and Compliers are used. To run a program of
any particular language, we need the corresponding assembler, interpreter or
compiler.
1.9.9.1 Assemblers
A utility program called an assembler is used to translate assembly language
statements into the target computer's machine code. The assembler performs a
more or less isomorphic translation (a one-to-one mapping) from mnemonic
statements into machine instructions and data. Many sophisticated assemblers
offer additional mechanisms to facilitate program development, control the
assembly process and aid debugging. Modern assembler creates object code by
translating assembly instruction mnemonics into op codes, and by resolving
symbolic names for memory locations and other entities. The use of symbolic
references is a key feature of assemblers, saving tedious calculations and manual
address updates after program modifications. More sophisticated high-level
assemblers provide language abstractions such as:
1.9.9.2 Interpreters
An interpreter is a program which takes something written in a programming
language and then runs it by executing a series of machine instructions, which
are clearly defined for each word or token in the language. It is a program that
implements or simulates a virtual machine using the base set of instructions of a
programming language as its machine language. We can also think of an
B.A. Part-I (Semester-I) 143 Paper : BAP-101 (Fundamentals of IT)
1.9.9.3 Compilers
A Compiler is a program that translates code of a programming language in
machine code, also called object code. The object code can be executed directly
on the machine where it was compiled. A compiler is a program which takes
something written in a higher level language, usually called source code, and
translates it into a lower level language, usually called object code. It is a
computer program (or set of programs) that translates text written in a computer
language (the source code) into another computer language (the target language).
Commonly the output has a form suitable for processing by other programs (e.g.,
a linker). The object code is machine-dependent meaning that the compiled
program can only be executed on a machine for which it has been compiled. The
most common reason to translate source code is to create an executable program.
The name "compiler" is primarily used for programs that translate source code
from a high-level programming language to a lower level language (e.g., assembly
language or machine language). A program that translates from a low level
language to a higher level one is a decompiler. A program that translates between
high-level languages is usually called a language translator, source to source
translator, or language converter. A compiler is likely to perform many or all of
the operations like lexical analysis, preprocessing, parsing, semantic analysis,
code generation etc.
1.9.9 Summary
A language is nothing but a way of communication. We, human beings, use
natural languages like Hindi, Punjabi, English, Urdu, Persian and Spanish etc. to
communicate our ideas and emotions with each other. Similarly we communicate
with the computer in the language understood by the computer. The
Programming Language consists of a set of characters, symbols and rules that
allow the user to communicate with the computers. Source code and object code
refer to the "before" and "after" versions of a compiled computer program. Low
level language is the most basic language, in which we directly communicate with
hardware. Low-level languages are difficult to understand. Machine and
Assembly languages are considered to be low level languages. High level
languages are similar to English language and resemble human languages. We
can write programs in English like manner. Computer can understand only one
language and that is binary language, which consists of only 0s and 1s. This
language is called machine language. Main disadvantages of machine language
are that it is machine dependent, difficult to learn, error prone and difficult to
modify. Assembly language implements a symbolic representation of the numeric
machine codes and other constants. Development of computer languages has
been divided into different generations like First Generation Languages, Second
Generation Languages, Third generation Languages, Fourth generation
Languages, Fifth generation languages and Sixth generation languages. As
computer can understand only one language, that is machine language. To
convert Assembly language and high level language programs into machine
language, we need translators. Normally for this purpose Assemblers,
Interpreters and Compliers are used. To run a program of any particular
language, we need the corresponding assembler, interpreter or compiler.
Assembler is used to translate assembly language statements into the target
computer's machine code. An interpreter is a program which takes something
written in a programming language and then runs it by executing a series of
machine instructions, which are clearly defined for each word or token in the
language A Compiler is a program that translates code of a programming
language in machine code, also called object code. The object code can be
executed directly on the machine where it was compiled.
1.9.10 Keywords
Keywords of this lesson are Computer/Programming Languages, Source code,
Object code, Low level languages, High Level Languages, Machine Languages,
B.A. Part-I (Semester-I) 145 Paper : BAP-101 (Fundamentals of IT)
Type Setting :
Department of Distance Education, Punjabi University, Patiala.