0% found this document useful (0 votes)
60 views231 pages

Com-311 BMS

The document provides an overview of computer systems, including their basic anatomy, evolution, generations, and characteristics. It discusses the importance of computers in various fields, the classification of computers, and their functional units such as input, CPU, storage, and output. Additionally, it highlights the advantages and disadvantages of using computers, as well as the concepts of data and information.

Uploaded by

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

Com-311 BMS

The document provides an overview of computer systems, including their basic anatomy, evolution, generations, and characteristics. It discusses the importance of computers in various fields, the classification of computers, and their functional units such as input, CPU, storage, and output. Additionally, it highlights the advantages and disadvantages of using computers, as well as the concepts of data and information.

Uploaded by

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

Lecture 1

 Basic anatomy of the computer system: Input devices, CPU, Output Devices,
 Memory: Primary and secondary.

Introduction
Computers have now become an integral part of our daily life. People use computers for a
variety of reasons and purposes. Be it education, business, entertainment, communication,
government service or transportation, computers are inevitable today. As far as students are
concerned, computers are used for learning different subjects effectively and for carrying out
learning activities apart from their primary function of computing. Try to recollect the
situations where we used computers and identify the benefits from it. Therefore, it is essential
to know more about computers and its applications. This chapter presents the concepts
computer characteristics, classification, functional units of computer, computer components,
types of memory, Input and Output Device used in computers are also discussed in this chapter.

Computer
A computer is an electronic device that receives input, stores or processes the input
as per user instructions and provides output in desired format.

Evolution of Computers
The need for device to do calculations along with the growth in commerce and other
human activities explains the evolution of computers. Having the right tool to perform these
tasks has always been important for human beings. In their quest to develop efficient computing
devices, humankind developed many apparatuses. However, many centuries elapsed before
technology was adequately advanced to develop computers.

Calculate with pebbles


 The early man was in need of counting the cattle before and after grazing.
 He made use the pebbles to count the cattle. That is the genesis of calculation.

Abacus
 In the beginning people used either their fingers or pebbles along lines in the sand to
count or add. For the sake convenience people in Asia Minor built a counting device
called abacus through which calculations where performed using a system of sliding
beads arranged on a rack.

Napier’s Bones
In 1617 an eccentric Scotsman named John Napier invented logarithms, that allows
multiplication to be performed via addition.
Slide Rule
Napier’s invention led directly to the slide rule.

Pascaline
In 1642, a French mathematician, Blaise Pascal invented the first functional automatic
calculator. This brass rectangular box is also called as Pascalaine,used eight movable dials to
add numbers up to eight figures long.

Leibniz Machine
In 1964, a German mathematician, Gottfried Wilhem von Leibniz made a machine that
could perform multiplication, division and square root. This machine is known as the Stepped
Recknoer. It was the first mass producing calculating device which was designed to perform
multiplication by repeated additions. It worked by a system of gears and tiles. But it lacked
mechanical precision in its construction and was not reliable.

Charles Babbage - 1792-1871


In 1822, Charles Babbage (Father of Computer) Proposed a machine to perform
differential equations called Difference Engine which is powered by steam. The machine would
have a stored program and could perform calculations and print the results automatically. But
it was not completed.

Analytical Engine 1833


In 1833, charles babbage developed analytical engine with input devices in the form of
perforated cards containing operating instructions and a “store” for the memory of thousand
numbers of upto fifty decimal digits long. Babbage borrowed the idea of punch cards to encode
the machine instruction from joseph mary jacquard’s loom. The analytical engine never
constructed the outline basic elements of a modern computer.
In 1889, Hermon Hollorith worked for the U.S census bureau applied jacquard’s loom
concept to computing. Hollerith’s method used cards to store data which fed into a machine
that compiled the results mechanically. The start of world war 2 produce a substantial need for
a computer capacity, especially for military purposes.

Harvard Aiken and IBM in 1944 built mark 1 using relays and electromagnetic
components to replace mechanical components. In 1946, John Eckert and John Mauchly of the
Moore School of Engineering at the University of Pennsylvania developed the Electronic
Numerical Integrator and Calculator (ENIAC).

The computer used electronic vacuum tubes John Eckert and John Mauchly also
proposed the development of Electronic Discrete Variable Automatic Computer (EDVAC)
which was the first electronic to use the stored program concept introduced by John van
Neumann. This computer could stop any time and then resume operations.

In 1949, at Cambridge university, a team headed by Maurice Wilkes developed the


Electronic Delay Storage Automatic Calculator (EDSAC) based on John van Neumann stored
program. The machine used mercury delay lines for memory and vacuum tubes for logic. The
Eckert – Mauchly Corporation manufactured the universal automatic computer (UNIVAC) in
1959.
In 1960’s efforts to design and develop the fastest possible computer with greatest
capacity reached a turning point with the Livermore Advanced Research Computer (LARC)
add access time of less than 1µs and the total capacity 100,000,000.

Generations of Computers

Growth in the computer industry is determined by the development in technology. Based on various
stages of development, computers can be categroized into different generations.

Main Component
SNo. Generation Period Merits/Demerits
used
1 First 1942- Vacuum tubes  Big in size
Generation 1955  Consumed more power
 Malfunction due to
overheat
 Machine Language was
used

First Generation Computers - ENIAC, EDVAC, UNIVAC 1


2. Second 1955- Transistors • Smaller compared to First
Generation 1964 Generation
• Generated Less Heat
• Consumed less power
• compared to first
eneration
• Punched cards were used
• First operating system was
developed - Batch processing
and Multiprogramming,
Operating System
• Machine language as well
as Assembly language was
used.
Second Generation Computers IBM 1401, IBM 1620, UNIVAC 1108
3. Third 1964 Integrated • Computers were smaller,
Generation -1975 Circuits (IC) faster and more reliable
• Consumed less power
• High Level Languages
were used

Third Generation Computers IBM 360 series, Honeywell 6000 series


4 Fourth 1975- Microprocessor Very • Smaller and Faster
Generation 1980 Large-Scale Integrated • Microcomputer series such
Circuits (VLSI) as IBM and APPLE were
developed
• Portable Computers
were introduced.
5 Fifth 1980 - Ultra-Large-Scale • Parallel Processing
Generation till Integration (ULSI) • Super conductors
date • Computers size was
drastically reduced.
• Can recognize Images and
Graphics
• Introduction of Artificial
Intelligence and Expert
Systems
• Able to solve high
complex problems
including decision
making and logical
reasoning

6 Sixth In • Parallel and Distributed


Generation future computing
• Computers have become
smarter, faster and smaller
• Development of robotics
• Natural Language
Processing
• Development of Voice
• Recognition Software

Sixth • In the Sixth Generation, computers could be defined as the era of


Generation intelligent computers, based on Artificial Neural Networks. One of
Computing the most dramatic changes in the sixth generation will be the explosive
growth of Wide Area Networking.
• Natural Language Processing (NLP) is a component of
Artificial Intelligence (AI). It provides the ability to develop the
computer program to understand human language

Characteristic of Computers
 Speed
Speed is the most important characteristic of a computer. Computers have more
speed to perform jobs simultaneously. It can perform and complete the task in a few
seconds, whereas the amount of work that a human being can o in an entire year.
 Accuracy
The accuracy of the computer is consistently high. The computers are perfect,
accurate and precise. It never makes any mistake. Accuracy signifies the reliability of
the hardware components of a computer.
 Automatic
The computer works automatically, once programs are stored and data given to it.
 Storage
The computer processes limitless quantities of data and information. Storage of this
data poses another problem. But the storage system of a computer solves this by means
of various memories such as Hard disk, Floppy, Magnetic tapes a Drives etc.,

Advantages of Using Computer


Now that we know the characteristics of computers, we can see the advantages that
computers offer−
 Computers can do the same task repetitively with same accuracy.
 Computers do not get tired or bored.
 Computers can take up routine tasks while releasing human resource for more
intelligent functions

Disadvantages of Using Computer


Despite so many advantages, computers have some disadvantages of their own −
 Computers have no intelligence; they follow the instructions blindly without
considering the outcome.
 Regular electric supply is necessary to make computers work, which could prove
difficult everywhere especially in developing nations.
Booting
 Starting a computer or a computer-embedded device is called booting. Booting
takes place in two steps −
1. Switching on power supply
2. Loading operating system into computer’s main memory
3. Keeping all applications in a state of readiness in case needed by the user
i. The first program or set of instructions that run when the computer is switched on is
called BIOS or Basic Input Output System. BIOS is a firmware, i.e. a piece
of software permanently programmed into the hardware.
ii. If a system is already running but needs to be restarted, it is called rebooting.
Rebooting may be required if a software or hardware has been installed or system is
unusually slow.
There are two types of booting −
 Cold Booting − When the system is started by switching on the power supply it is
called cold booting. The next step in cold booting is loading of BIOS.
 Warm Booting − When the system is already running and needs to be restarted or
rebooted, it is called warm booting. Warm booting is faster than cold booting because
BIOS is not reloaded.

Classification of Computer
Computers were classified according to processor types because development in
processor and processing speeds were the developmental benchmarks. Earliest computers
used vacuum tubes for processing, were huge and broke down frequently. However, as
vacuum tubes were replaced by transistors and then chips, their size decreased and processing
speeds increased manifold.
All modern computers and computing devices use microprocessors whose speeds and
storage capacities are skyrocketing day by day. The developmental benchmark for computers
is now their size. Computers are now classified on the basis of their use or size.
 Desktop
 Laptop
 Tablet
 Server
 Mainframe
 Supercomputer

Desktop
Desktop computers are personal computers (PCs) designed for use by an individual at
a fixed location. IBM was the first computer to introduce and popularize use of desktops. A
desktop unit typically has a CPU (Central Processing Unit), monitor, keyboard and mouse.
Introduction of desktops popularized use of computers among common people as it was
compact and affordable.

Riding on the wave of desktop’s popularity many software and hardware devices were
developed specially for the home or office user. The foremost design consideration here was
user friendliness.

Laptop
Despite its huge popularity, desktops gave way to a more compact and portable
personal computer called laptop in 2000s. Laptops are also called notebook computers or
simply notebooks. Laptops run using batteries and connect to networks using Wi-Fi (Wireless
Fidelity) chips. They also have chips for energy efficiency so that they can conserve power
whenever possible and have a longer life.
Modern laptops have enough processing power and storage capacity to be used for all office

work, website designing, software development and even audio/video editing.

Tablet
After laptops computers were further miniaturized to develop machines that have
processing power of a desktop but are small enough to be held in one’s palm. Tablets have
touch sensitive screen of typically 5 to 10 inches where one finger is used to touch icons and
invoke applications.
Keyboard is also displayed virtually whenever required and used with touch strokes.
Applications that run on tablets are called apps. They use operating systems by Microsoft
(Windows 8 and later versions) or Google (Android). Apple computers have developed their
own tablet called iPad which uses a proprietary OS called iOS.
Server
Servers are computers with high processing speeds that provide one or more services
to other systems on the network. They may or may not have screens attached to them. A group
of computers or digital devices connected together to share resources is called a network.

Servers have high processing powers and can handle multiple requests
simultaneously. Most commonly found servers on networks include –
 File or storage server
 Game server
 Application server
 Database server
 Mail server
 Print server

Mainframe
Mainframes are computers used by organizations like banks, airlines and railways to
handle millions and trillions of online transactions per second. Important features of
mainframes are
 Big in size
 Hundreds of times Faster than servers, typically hundred megabytes per second
 Very expensive
 Use proprietary OS provided by the manufacturers
 In-built hardware, software and firmware security features
Supercomputer
Supercomputers are the fastest computers on Earth. They are used for carrying out
complex, fast and time intensive calculations for scientific and engineering applications.
Supercomputer speed or performance is measured in teraflops, i.e. 1012 floating point
operations per second.

Chinese supercomputer Sunway TaihuLight is the world’s fastest supercomputer with a rating
of 93 petaflops per second, i.e. 93 quadrillion floating-point operations per second.
Most common uses of supercomputers include −
 Molecular mapping and research
 Weather forecasting
 Environmental research
 Oil and gas exploration

Data and Information


 Data: Data is defined as an unprocessed collection of raw facts, suitable for
communication, interpretation or processing. For example, 134, 16 ‘Kavitha’, ‘C’
are data. This will not give any meaningful message.
 Information: Information is a collection of facts from which conclusions may be
drawn. In simple words we can say that data is the raw facts that is processed to give
meaningful, ordered or structured information. For example, Kavitha is 16 years old.
This information is about Kavitha and conveys some meaning. This conversion of
data into information is called data processing.

Basic anatomy of the computer system


Computer can be defined as a fast-electronic device that accepts data, processes it as
per stored instructions and produces information as output. We know that a computer has two
major components - hardware and software. Hardware refers to all physical components
associated with a computer system while software is a set of instructions for the hardware
to perform a specific task. When we use computers to solve any problem in real life
situations, the tasks are usually set up to process data to generate information.
Functional units of a computer
Even though computers differ in size, shape, performance and cost over the years, the
basic organization of a computer is the same. It is based on a model proposed by John Von
Neumann, a mathematician and a computer scientist. It consists of some functional units
namely Input Unit, Central Processing Unit (CPU), Storage Unit and Output Unit. Each of
these units is assigned to perform a particular task. Let us discuss the functions of these units.

1. Input unit
The collected data and the instructions for their processing are entered into the
computer through the input unit. They are stored in the memory (storage unit). The data may
be in different forms like number, text, image, audio, video, etc. A variety of devices are
available to input the data depending on its nature. Keyboard, mouse, scanner, mic, digital
camera, etc. are some commonly used input devices. In short, the functions performed by
input unit are as follows:
a. Accepts instructions and data from the outside world.
b. Converts these instructions and data to a form acceptable to the
computer.
c. Supplies the converted instructions and data to the computer for
processing.
2. Central Processing Unit (CPU)
The CPU is the brain of the computer. In a human body, all major decisions are taken by the
brain and other parts of the body function as directed by the brain. Similarly, in a computer
system, all major computations and comparisons are made inside the CPU.
It is also responsible for activating and controlling the operations of other units of the computer.
The functions of CPU are performed by three components – Arithmetic Logic Unit (ALU),
Control Unit (CU) and registers.
a. Arithmetic Logic Unit (ALU)
The actual operations specified in the instructions are carried out in the Arithmetic
Logic Unit (ALU). It performs calculations and logical operations such as comparisons and
decision making. The data and instructions stored in the storage unit are transferred to the ALU
and the processing takes place in it. Intermediate results produced by the ALU are temporarily
transferred back to the storage and are retrieved later when needed for further processing. Thus,
there is a data flow between the storage and the ALU many times before the entire processing
is completed.
b. Control Unit (CU)
Each of the functional units has its own function, but none of these will perform the
function until it is asked to. This task is assigned to the control unit. It invokes the other units
to take charge of the operation they are associated with. It is the central nervous system that
manages and co-ordinates all other units of the computer. It obtains instructions from the
program stored in the memory, interprets the operation, and issues signals to the unit concerned
in the system to execute them.
c. Registers
These are temporary storage elements that facilitate the functions of CPU. There are a
variety of registers; each is designated to store unique items like data, instruction, memory
address, results, etc.

3. Memory unit
The data and instructions entered in the computer through input unit are stored inside
the computer before actual processing starts. Similarly, the information or results produced
after processing are also stored inside the computer, before transferring to the output unit.
Moreover, the intermediate results, if any, must also be stored for further processing. The
storage unit of a computer serves all these purposes. The specific functions of storage unit are
to hold or store:
d. data and instructions required for processing.
e. intermediate results for ongoing processing.
f. final results of processing, before releasing to the output unit. The
storage unit comprises of two types as detailed below:
a. Primary Storage:
It is also known as main memory. It is again divided into two - Random Access Memory
(RAM) and Read Only Memory (ROM). RAM holds instructions, data and intermediate results
of processing. It also holds the recently produced results of the job done by the computer. ROM
contains instructions for the startup procedure of the computer. The Central Processing Unit
can directly access the main memory at a very high speed. But it is costly and has limited
storage capacity.
b. Secondary Storage:
It is also known as auxiliary storage and it takes care of the limitations of primary
storage. It has a huge storage capacity and the storage is permanent. Usually we store data,
programs and information in the secondary storage, but we have to give instruction explicitly
for this. Hard disk, CDs, DVDs, memory sticks, etc. are some examples.

4. Output unit
The information obtained after data processing is supplied to the outside world through
the output unit in a human-readable form. Monitor and printer are the commonly used output
devices. The functions performed by output unit can be concluded as follows:
a. Receives the results produced by the CPU in coded form.
b. Converts these coded results to human-readable form.
c. Supplies the results to the outside world.

Components of a computer System


Computer is a collection of several components working together. Some of these
components are essential, others add more performance. Adding extra parts expands the variety
of tasks that we can accomplish with the computer.

Computers hardware is made up of the following parts

Hardware

Peripherals
CPU

Input Devices Output Devices

CPU (Central Processing Unit)


The CPU is the circuitry that performs the arithmetic and logic operations and executes
instruction. The CPU dictates the configuration and class to which a PC belongs. It contains the
following components.

Processors
Central Processing Unit (CPU) / processor is responsible for all computing and decision-
making operations and coordinates the working of a computer. The performance of a CPU
determines the overall performance of the computer.

Since CPU is an Integrated Circuit (IC) package which contains millions of transistors and
other components fabricated into a single silicon chip, it is also referred as microprocessor. A
CPU is usually plugged into a large socket on the main circuit board (the motherboard) of the
computer. Since heat is generated when the CPU works, a proper cooling system is provided
with a heat sink and fan. Intel core i3, core i5, core i7, AMD Quadcore, etc. are some examples
of processors.
Registers
Registers are storage locations inside CPU, whose contents can be accessed more
quickly by the CPU than other memory. They are temporary storage areas for instructions or
data. They are not a part of memory; rather they are special additional storage locations that
offer computers the advantage of speed. Registers work under the direction of the control unit
to accept, hold, and transfer instructions or data and perform arithmetic or logical operations at
high speed. It speeds up the execution of programs. Important registers inside a CPU are:
a) Accumulator: The accumulator is a part of the Arithmetic Logic Unit (ALU). This
register is used to store data to perform arithmetic and logical operation. The result of
an operation is stored in the accumulator.
b) Memory Address Register (MAR): It stores the address of a memory location to
which data is either to be read or written by the processor.
c) Memory Buffer Register (MBR): It holds the data, either to be written to or read
from the memory by the processor.
d) Instruction Register (IR): The instructions to be executed by the processorare stored
in the instruction register.
e) Program Counter (PC): It holds the address of the next instruction to be
executed by the processor.

Motherboard
A motherboard is a large Printed Circuit Board (PCB) to which all the major components
including the processor are integrated.

The figure shows the motherboard and its components. It also provides expansion slots for
adding additional circuit boards like memory, graphics card, sound card, etc. The motherboard
must be compatible with the processor chosen.
Peripherals and Ports
Peripherals are devices that are attached to a computer system to enhance its capabilities.
Ports on the motherboard are used to connect external devices. Figure shows the various ports
in a computer system.
Peripherals include input devices, output devices, external storage and communication
devices. Peripheral devices communicate with the motherboard, through the ports available on
the motherboard like Video Graphics Array (VGA), IBM Personal System/2 (PS/2), Universal
Serial Bus (USB), Ethernet, High Definition Multimedia Interface (HDMI), etc.

Let us look at some kinds of ports used on personal computers.

Serial port A serial port / serial communication


port transmits data one bit at a time. In
older computers devices such as
modem, mouse or keyboard were
connected through serial ports. Serial
cables are cheaper to make and easier to
shield from interference. Since its speed
is too low, they are being
replaced by faster ports like PS/2, USB,
etc.,

Parallel Parallel ports can transmit several bits


port of data simultaneously. It is faster than
serial port and is used to connect a
printer or scanner to
the computer.
SB Port Universal Serial Bus (USB) is a
connection that provides high speed
data communication between devices.
Due to its high bandwidth data transfer
is faster. It is used for short distance
communication. USB port is used for
connecting devices like keyboard,
mouse, printer, scanner, flash drive,
external hard disk, etc. Figure shows
the various types of USB ports.
The main advantage of USB ports is:
• USB ports are capable of supplying
electric power to external devices. This
technology led to the development of
devices like external hard disk, flash
drive, dongle, etc. which draw power
from the USB port. It can also be used
for power devices like mobile phones,
tablets, laptops, etc.
• USB devices can be connected and
disconnected even when the
power is on
LAN port Alternatively referred to as an Ethernet
port, network connection, and network
port, the Local Area Network (LAN)
port is a port connection that allows a
computer to connect to a network using
a wired connection. The registered
jack RJ45 is a standard type of
connector used for connecting
cables through LAN ports
PS/2 port Personal System/2 (PS/2) ports are
special ports invented by International
Business Machines (IBM) for
connecting the keyboard and mouse
(refer Figure 2.8). These types of ports
are too slow and replaced by faster ports
like USB
nowadays.
Audio ports Audio ports are used to connect audio
devices like speakers, microphone, etc.
The three small connectors shown in
Figure are used for connecting: a. Line
in - Sound input (from any audio device
like mobile line out, ipod, etc.) b. Line
out - Sound out (to connect your PC's
sound output to external speakers) c.
Mic in -
Microphone input port

Video VGA is a popular display standard


Graphics developed by IBM. The VGA port
Array is used to connect a monitor or a
(VGA) port projector to a computer. The VGA
connector has 15 pins displayed in
three rows as indicated in Figure
2.10. Super VGA (SVGA) was
developed to support 800 600
resolution and was later replaced
by Extended Graphics Array
(XGA) that supports 1024 768
resolution. Regardless of what
resolution a monitor is able to
support, they are commonly
referred to as VGA
High HDMI is a type of digital connection
Definition capable of transmitting high-definition
Multimedia video and multi-channel audio over a
Interface single cable (refer Figure 2.11). To do
(HDMI) the same thing with analog cables, we
need to connect several video and audio
cables
Input/Output devices
The computer will be of no use unless it is able to communicate with the outside world.
Input/output devices are required for users to communicate with the computer. In simple terms,
input devices feed data and instructions into the computer and output devices present
information from a computer system. These input/output devices are connected to the CPU
through various ports or with the help of wireless technologies. Since they reside outside the
CPU, they are called peripherals.
a. Input devices
An input device is used to feed data into a computer. It is also defined as a device
that provides communication between the user and the computer. We will now discuss
some input devices in detail.
Keyboard  Keyboard is the most common input device. It allows the user to input
alphabets, numbers and other characters. Keyboard detects the key
pressed and generates the corresponding ASCII code which can be
recognized by the computer. The standard US keyboard introduced in
1986 has 101 keys. It has a keyboard layout called the QWERTY design.
QWERTY gets its name from the first six letters across in the upper left-
hand corner of the keyboard Keyboards can be classified as wired and
wireless. Wired keyboards are connected to the CPU through a serial,
PS/2 port or a USB port. Wireless keyboards are connected to the
computer through infrared (IR), radio frequency (RF) or Bluetooth
connections.
 Portable flexible keyboards are also available now. New generation
keyboards like laser keyboards that project the
keyboard layout to any surface are being developed.
Mouse  A mouse is a small hand-held device used to indicate the position of a
cursor or its movement on a computer display screen by rolling it over a
mouse pad / flat surface. A mouse has one or more buttons and possibly
a scroll wheel.

 Scroll wheel is used for scrolling the screen vertically or horizontally. The
different types of mouse are ball, optical and laser mouse. Ball mouse
works on the principle of the movement of the ball, whereas optical
mouse uses LED and laser mouses use laser beams for sensing the
movement. Laser mouse has more precise movements when compared to
other types of mouse.
 Wired mouse, uses serial, PS/2 and USB ports to communicate, where
as a wireless mouse communicates with the computer via
radio waves.
Light pen  A light pen is a pointing device shaped like a pen. The tip of the light
pen contains a light-sensitive element which when placed against the
screen, detects the light from the screen enabling the computer to
identify the location of the pen on the screen.

 Light pens have the advantage of 'drawing' directly onto the screen.
They are used by engineers, artists, fashion designers for
Computer Aided Designing (CAD) and drawing purposes.

Touch screen  It is an input device that allows the user to operate by simply
touching on the display screen. Some computers, tablets, smart
phones, etc. have touch sensitive display screens. It can also be
operated using a stylus which gives more precision.

 Information kiosks at railway stations and bank ATMs also use touch
screens as input device.
Graphic tablet  A graphics tablet consists of an electronic writing area and a special
"pen" that works with it. Graphic tablet allows artists to create
graphical images with motions and actions similar to traditional
drawing tools.

 The pen of the graphics tablet is pressure sensitive. Hard or soft


pressure on the tablet using the pen can result in brush strokesof
different width in an appropriate graphics program.

Touchpad  A touchpad is a pointing device found on the portable computers and


some external keyboards. It allows us to move the mouse pointer
without the need of an external mouse.

 Touchpad is operated by using finger and dragging it across the flat


surface; as the finger moves on the surface, the mousecursor will move
in that same direction. The touchpad also has two
buttons below the touch surface that enables to click.

Joystick  Joystick is an input device used for playing video games, controlling
training simulators and robots. Joysticks and other game controllers can
also be used as pointing device.

 The joystick has a vertical stick which can move in any direction. It can
be used to control objects in a video game or to make menu selections by
the movement of a cursor displayed on the screen. It has a button on the
top that is used to select the option pointed by the cursor.
Microphone  A microphone can be attached to a computer to input sound. It accepts
sound which is analogue in nature as input and converts it to digital
format. The digitized sound can be stored in the computer for processing
or playback.

 A computer loaded with speech recognition software like the one


preinstalled in Windows 7, can convert what a person has said into text,
which can be saved for word processing. A voice recognition program
can process the input and convert it into
machine-recognizable commands

Scanner  Scanners can capture information, like pictures or text, and convert it
into a digital format that can be edited using a computer. The quality of
the image depends on the resolution of the scanner. The resolution of
the image scanned is expressed in Dots Per Inch (DPI). The higher the
DPI, the better the resolution.
 The different variants of scanners are flat bed, sheet feed and hand held
scanner. A sheet feed scanner can scan a single sheet, whereas flatbed
can scan even from a book, but they are not portable. A hand held
scanner is portable but the scanning action is not smooth as the scanner
is moved manually.

 Optical Character Recognition (OCR) software is used to recognize the


printed text in an image scanned and convert it into proper text format,
which can be edited by a text editor. Advanced OCR system can read
printed text in a large variety of fonts but has difficulty with hand written
text. Accurate OCR SDK, Hindi OCR software, Akshara Malayalam
OCR, etc. are
examples of OCR softwares.
Optical Mark  OMR technology scans a printed form and reads predefined positions,
Reader (OMR) and records the marks on the form. This technology is useful for
applications in which large number of hand-filled
forms need to be processed quickly with great accuracy, such as
objective type tests and questionnaires. OMR sheets are normally use to
evaluate multiple choice questions in competitive exams. It consists of
bubble shaped options to mark answers. Candidates are required to
darken the correct bubble option using a pen or pencil. OMR readers
can recognize these marks and the appropriate software uses this input
for evaluation.

 For accuracy of results, good quality paper and accurate


alignment of printing is essential.

Barcode/Quick  A barcode is a set of vertical lines of different thickness and spacing that
Response (QR) represent a number. Barcode readers are devices that are used to input
code reader data from such set of barcodes (refer Figure). Hand-held scanners are
commonly seen in shops to scan codes and price information for each of
the items so that billing will be easier. Mobile phones with camera and
special software can also be used as a barcode reader, A QR code is
similar to barcodes. Barcodes are single dimensional whereas QR codes
are two dimensional as shown in Figure.

 The two-dimensional way of storing data allows QR code to store more


data than a standard barcode. This code can store website URLs, plain
text, phone numbers, email addresses and any other alphanumeric data.
The QR code can be read using a barcode reader or a mobile phone
with a camera and a special software
installed.
Biometric  A biometric sensor is a device that identifies unique human physical
sensor features with high accuracy. It is an essential component of a biometric
system which uses physical features like fingerprints, retina, iris patterns,
etc., to identify, verify and
authenticate the identity of the user.
 The three major types of biometric sensors are semiconductor
sensor, optical sensor and ultrasound sensor. Figure shows a
finger print sensor.
Smart card  A smart card is a plastic card that stores and transacts data. The data card
reader may contain a memory or a microprocessor. Memory cards simply store
data, while a microprocessor card, on the other hand, can add, delete and
manipulate information in its memory. The smart card is used in most
banking, healthcare, telephone calling, electronic cash payments and other
applications.

 Smart card readers are used to access data in a smart card. It can be contact
type or contactless.
 A contact type of reader requires physical contact with the cards, which is
made by inserting the card into the reader.
 A contactless type of reader works with a radio frequency that
communicates when the card comes close to the reader. Many
contactless readers are designed specifically for toll gate payment in
transportation applications and person identity
applications.
Digital camera  A digital camera can take pictures and videos and convert them
into digital format.
 Pictures or videos taken using a digital camera are stored inside
its memory and can be transferred to a computer by connecting
the camera to it.

 The quality of the lens, the density of Charge Couple Device


(CCD), resolution (measured in megapixel), optical zoom and
the software used in the camera determines the quality of the
picture. Each picture is made up of thousands of tiny pixels (picture
elements) and the camera stores the data about the color of each
dot. The quality of the picture is determined by the number of
pixels in each picture.
 Digital cameras have resolutions ranging from 2 mega pixel to 24
megapixels and optical zoom ranging from 3x to 60x.
 Web camera is a compact and less expensive version of a digital
camera. It is used in computers for video calling, video chatting,
etc. It does not have an internal memory. Applications like Skype,
Yahoo Messenger, etc. use webcam to capture images.
Now, laptops also come with an inbuilt web camera.

b. Output devices
Output devices are devices that print/display output from a computer. Outputs
generated by the output devices may be hardcopy output or softcopy output. Hardcopy outputs
are permanent outputs which can be used at a later date or when required. They produce a
permanent record on paper. The common output devices that produce hardcopy outputs are
printers and plotters. Softcopy outputs are electronic and are available on the screen in a digital
form. They do not produce a permanent record. A common softcopy output device is the
Visual Display Unit (VDU).

i. Visual Display Unit (VDU)


 A Visual Display Unit (VDU) is an output device that visually conveys text,
graphics and video information. Information shown on a display device is called
softcopy because the information exists electronically and is displayed for a
temporary period of time.
 Display devices include Cathode Ray Tube (CRT) monitors, Liquid Crystal Display
(LCD) monitors, Thin Film Transistor (TFT) monitors, Light Emitting Diode
(LED) monitors, gas plasma monitors.
Some of the characteristics of a VDU are size, resolution, pixel-pitch and response
time. VDUs are available in different sizes. The size of a monitor is measured
diagonally across the screen, in inches. The resolution of the monitor is the
maximum number of pixels it can display horizontally and vertically (such as 800
x600 or 1024x768 or 1600 x1200). The pixel spacing on the screen is called the dot
pitch. A screen with smaller dot pitch produces sharper images. Response time
refers to the time taken for a pixel to turn from a state of brightness to a state of
darkness and then back again. Monitors, with lesser response time provide better
movie viewing experience.
Visual Display Unit  The Cathode Ray Tube (CRT) monitor resembles
(VDU) Cathode Ray television sets of the past. Two types of CRT monitors are
Tube (CRT) available, monochrome and color. A monochrome
monitor monitor displays characters and images in a single color
on a dark background. Another variation of monochrome
monitor capable of displaying different shades of grey is
called a grey scale monitor.

 A color monitor uses three different basic colors such as


red, blue and green to display 16 to 1 million different
colors. These monitors are preferred by some graphic
artists for their accurate color rendering and by some
gamers for faster
response to rapidly changing graphics.

Flat panel monitor  Flat panel displays are thinner, lighter in weight, consume
less power and emit less heat compared to CRT monitors.
Flat panel monitors are most commonly used in
computers, especially in laptops. Different types of flat
panel monitors are LCD Monitors, LED Monitors, Plasma
Monitors and OLED Monitors.

Liquid Crystal  LCD displays consists of liquid crystals


Display (LCD) sandwiched between two plastic plates. These
Monitors: crystals rearrange to form an image when an
electric current is passed through them. A light
source at the back of this plate makes the picture
visible. This light source can be fluorescent lamp or
LED.
Light Emitting  LED monitors use LED directly behind the liquid crystal
Diode (LED) display (LCD) in order to light up the screen. This
Monitors technique is very effective and gives each area of the
screen its own light, which can be on or off. LED screens
can produce massive contrast ratios making the difference
between the lights and the blacks appear almost perfect.
This technology is expensive. The advantage of using
LED is better color quality, clarity, wider viewing angle,
faster refresh rates and power savings.

Plasma Monitors  A flat-panel display consists of sandwiching neon/xenon


gas between two sealed glass plates with parallel
electrodes deposited on their surfaces. When a voltage
pulse is passed between two electrodes, the gas lights up
as different colours, creating images on a monitor. Plasma
monitors provide high resolution but are expensive.

Organic Light  The panel of OLED is made up of millions of tiny


Emitting Diode LEDs. The O in OLED stands for organic which means
(OLED) Monitors: there is
 carbon in the light emitting layer of the panel. OLED
screens are thinner and lighter than LCDs and LEDs. They
can produce better quality images and have a better
viewing angle. OLEDs consume less power, but are very
expensive.

LCD Projector  An LCD Projector is a type of video projector for


displaying video, images or computer data on a large
screen or other flat surface. It is a modern equivalent of
the slide projector or overhead projector. A beam of high-
intensity light travels through thousands of shifting pixels
in an LCD display. This beam of light then passes through
a lens which projects and focuses the image on the
surface.

ii. Printer
Printers are used to produce hardcopy output. Based on the technology used, they can
be classified as impact or non-impact printers. Impact printers use the typewriting or printing
mechanism where a hammer strikes the paper through a ribbon in order to produce output. Dot-
matrix printers fall under this category. Non- impact printers do not touch the paper while
printing. They use different technologies to print characters on paper. Inkjet, Laser and Thermal
printers fall under this category of printers.
Two factors that determine the quality of a printer are its resolution and speed.
Resolution is measured in terms of DPI. Speed is measured in terms of number of characters
printed in a unit of time and is represented as characters per second (cps), lines per minute
(lpm), or pages per minute (ppm).
Dot Matrix  Dot matrix printers use small electromagnetically activated pins in
Printer (DMP) the print head and an inked ribbon, to produce images by impact.
The most commonly used printer heads consist of 9 pins. Certain
printers use 24 pins for better print quality.
 These printers are slow and noisy, and are not commonly used for
personal use. The Dot Matrix Printers are widely used at cash
counters in shops due to their low printing cost and for the reason
that we get carbon copies from them.

Inkjet printer  Inkjet printers form the image on the page by spraying tiny droplets
of ink from the print head. The printer needs several colours of ink
(cyan, yellow, magenta and black) to make colour images. Some
photo-quality ink jet printers have more colours of ink. Ink jet
printers are inexpensive, but the cost of ink cartridges makes it a
costly affair in the long run.

laser printer  A laser printer produces good quality output. The image to be
printed is transferred to a drum using a laser beam. The toner
powder from the toner cartridge is then sprayed on the drum. The
toner powder sticks onto the portions traced on the drum by the
laser beam. It is transferred to a paper by rolling the paper over the
drum. Through heating the owder is fused on to the paper.
Monochrome and colour laser printers are available. Colour laser
printers use multiple colour toner cartridges to produce colour
output and are expensive. Laser printers are faster and their speed
is rated in pages per minute (ppm).
Thermal  Thermal printing produces a printed image by selectively heating
printer heat-sensitive thermal paper when it passes over the thermal print
head. The coating turns black in the areas where it is heated,
producing an image. Thermal printers print quiet and faster than dot
matrix printers. They are also smaller, lighter and consume less
power, making them ideal as portable printers. Thermal printers are
popular as printers at Point-of-Sale terminals

iii. Plotter
A plotter is an output device used to produce hardcopies of graphs and designs on the
paper. A plotter is typically used to print large-format graphs or maps such as construction
maps, engineering drawings and big posters. It is used in the design of cars, ships, aircrafts,
buildings, highways etc. Plotters are of two types: Drum plotters and Flatbed plotters.

Drum plotter  A drum plotter is also known as roller plotter. It consists of a drum
or roller on which a paper is placed and the drum rotates back and
forth to produce the graph on the paper. It also consists of a
drawing arm that holds a set of coloured ink pens or pencils. The
drawing arm moves side to side as the paper is rolled back and
forth through the roller. In this way, a perfect graph or map is
created on the
paper.
Flatbed plotter A flatbed plotter is also known as table plotter. It plots on paper that is
spread and fixed over a rectangular flatbed table. The flatbed plotter uses
two drawing arms, each of which holds a set of coloured ink pens or
pencils. The drawing arms move over the stationary paper and draw the
graph on the paper. Flatbed plotter is very slow in drawing or printing
graphs. The large and complicated drawing can take several hours to print.

Table shows the Features of different printers


iv. Three-dimensional (3D) printer
A 3D printer is a new generation output device used to print 3D objects. It can produce
different kinds of objects in different materials, using the same printer. A 3D printer can print
anything from ceramic cups to plastic toys, metal machine parts, stoneware vases, fancy
chocolate cakes, etc.
The 3D printing process turns the object to be printed into thousands of horizontal tiny
little layers. It then prints these layers from the bottom to top, layer by layer. These tiny layers
stick together to form a solid object.

v. Audio output device


 The audio output is the ability of the computer to produce sound. Speakers are the
output device that produces sound. It is connected to the computer through audio ports.
The speaker produces sound by the movement of the diaphragm in the speaker, forward
and backward according to the electrical signals coming out of the audio port.

 For high quality sound reproduction computers use 2.1 (3 speakers), 5.1 (5speakers)
and 7.1 (7 speakers) speaker systems.

Memory
Memory is a place where we can store data, instructions and results temporarily or
permanently. Memory can be classified into two: primary memory and secondary memory.
Primary memory holds data, intermediate results and results of ongoing jobs temporarily.
Secondary memory on the other hand holds data and information permanently. Before
learning more about memory, let us discuss the different memory measuring units.
a. Primary storage
Primary memory is a semiconductor memory that is accessed directly by the CPU. It is
capable of sending and receiving data at high speed. This includes mainly three types of
memory such as RAM, ROM and Cache memory.
i. Random Access Memory (RAM)
RAM refers to the main memory that microprocessor can read from and write to. Data can
be stored and retrieved at random from anywhere within the RAM, no matter where the data
is. Data or instructions to be processed by the CPU must be placed in the RAM. The contents
of RAM are lost when power is switched off. Therefore, RAM is a volatile memory. Storage
capacity of RAM is 2 GB and above

The speed of a RAM refers to how fast the data in memory is accessed. It is measured in Mega
Hertz (MHz). When a computer is in use, its RAM contains the following:
1. The operating system software.
2. The application software currently being used
3. Any data that is being processes.
ii. Read Only Memory
ROM is a permanent memory that can perform only read operations and its contents
cannot be easily altered. ROM is non-volatile; the contents are retained even after the power
is switched off. ROM is used in most computers to hold a small, special piece of 'boot up'
program known as Basic Input Output System (BIOS).

This software runs when the computer is switched on or 'boots up'. It checks the computer's
hardware and then loads the operating system. It is slower than RAM. Figure shows a typical
ROM chip.
There are some modified types of ROM that include:
1. PROM - Programmable ROM which can be programmed only once. PROM's are
programmed at the time of manufacture.
2. EPROM - Erasable Programmable ROM that can be erased using ultra violet
radiation and can be programmed using special electronic circuits.
3. EEPROM - Electrically Erasable Programmable ROM which can be erased and
rewritten electrically.
Table shows the comparison between RAM and ROM.

iii. Cache memory


Cache memory is a small and fast memory between the processor and RAM (main
memory). Frequently accessed data, instructions, intermediate results etc. are stored in cache
memory for quick access. When the processor needs to read from or write to a location in RAM,
it first checks whether a copy of that data is in the cache. If so, the processor immediately reads
the cache, which is much faster than reading from RAM. Cache is more expensive than RAM,
but it is worth using it in order to maximize system performance. Commonly used cache
memories and their capacities are as follows Level 1 Cache (128 KB), Level 2 Cache (1 MB),
Level 3 Cache (8 MB)
and Level 4 Cache (128 MB).

b) Secondary or Auxiliary memory


Secondary memory is of permanent nature. Unlike the contents of RAM, the data stored
in these devices does not vanish when power is turned off. Secondary memory is much larger
in size than RAM, but is slower. It stores programs and data but the processor cannot access
them directly. Secondary memory is also used for transferring data or programs from one
computer to another. It also acts as a backup. The major categories of storage devices are
magnetic, optical and semiconductor memory.
i) Magnetic storage devices
Magnetic storage devices use plastic tape or metal/plastic disks coated with
magnetic materials. Data is recorded magnetically in these devices. Read/write heads are used
to access data from these devices. Some of the popular magnetic storage devices are magnetic
tapes, floppy disks, hard disks, etc.
Magnetic Tape
Magnetic tape is a backup device that can store huge volume of data. The cost per unit
volume of a magnetic tape is less compared to other magnetic storage. It is a recording medium
consisting of a thin tape with a coating of fine magnetic material. It can be used for recording
analog or digital data. Data is stored in frames across the width of the tape with a read/write
head. The frames are grouped into blocks or records which are separated from other blocks by
gap.

It takes a lot of time to locate data in a magnetic tape, as it is a sequential access


medium, similar to an audio cassette. The capacity of tape media is referred in
Terabytes,

Hard disk
The hard disk consists of metal disks coated with magnetic material concealed in dust
free containers. Hard disks have very high storage capacity, high data transfer rates and low
access time. It is more durable and less error prone. It is the most common secondary storage
device used in computers.
A hard disk may contain one or more platters. Each platter requires two read/write
heads, one for each surface. A tiny electromagnetic read/write head attached to an access arm
magnetizes tiny spots on the disk to store data as shown in Figure.

The same electromagnetic head can later sense the magnetic fields of the spots, allowing
the data to be read back from the disk.

Data is stored on the surface of a platter in sectors and tracks. Tracks are concentric circles
on a platter and a sector is a pie-sliced part of a disk platter as shown in Figure. Formatting is
the activity of creating sectors and tracks on the disk. Only then can read/write operation be
performed on the disk. If a disk having data is formatted, then all data will be lost.
Large disks can be partitioned logically into distinct sections or volumes.
These volumes are independent of each other and can be formatted independently.

ii. Optical storage devices


Optical disk is a data storage medium which uses low-powered laser beam to read from
and write data into it. It consists of an aluminum foil sandwiched between two circular plastic
disks. Data is written on a single continuous spiral in the form of pits and lands as shown in
Figure.

The laser beam reads this pits and lands as 0s and 1s. It is very cheap to manufacture optical
disks in large quantities and are a popular secondary storage medium. The main types of
optical disks are CD, DVD and Blu-Ray.

Compact Disk (CD)


Compact Disk is an optical storage medium capable of storing up to 700 MB of data.
A CD drive uses red laser beams for reading from and writing data into CD. There are two
types of CDs, CD-R and CD-RW. In CD-R (CD-Recordable) data can be written once and
read many times where in CD-RW (CD-Rewritable) disks can be erased and rewritten at any
time.
Digital Versatile Disk (DVD)
Digital Versatile Disc is an optical storage media similar to CD-ROM, but with
a higher storage capacity. This is achieved by using smaller spots to record data.
Recording and reading of data is done using DVD drive. Here also red laser beam is
used for doing these operations. The capacity of a DVD varies from 4.37 GB to 15.9
GB.
There are three major types of DVDs: DVD-ROM, DVD-RW and DVD-RAM.
 DVD-ROM: DVD-Read Only Memory functions in the same way as CD-ROM
 DVD-RW: DVD-Rewritable disks can be erased and rewritten at any time.
 DVD-RAM: DVD Random Access Memory discs can be recorded and erased
repeatedly.
These are compatible only with devices manufactured by companies that
support the DVD-RAM format. It is comparable to DVD-Rewritable disk, but have
higher lifetime and can be erased more often than a DVD-RW.
A normal DVD known as DVD-5 stores 4.37 GB data where as a dual layer
double side DVD known as DVD-18 can store 15.9GB.

Blu-ray DVD
Blu-ray is an optical disk format developed to enable recording, rewriting and
playback of High Definition (HD) video as well as storing huge amounts of data. CD
and DVD technologies use red laser to read and write data while Blu-ray format uses
a blue-violet laser. Hence it has the name Blu-ray. The benefit of using a blue-violet
laser is that it has a shorter wavelength than a red laser, which makes it possible to
focus the laser spot with greater precision. This allows data to be packed more tightly.
Therefore, it is possible to store more data on the disk even though it is of the same
size of a CD/DVD. The format offers more than five times the storage capacity of
traditional DVDs and can hold up to 25 GB on a single-layer disc and 50 GB on a dual-
layer disc.

USB flash drive

A flash drive is a small external storage device, which consists of flash memory
typically the size of a human thumb. USB flash drives are portable and rewritable. The
storage capacity of a USB drive currently varies from 2 GB to 32 GB.
35
Flash memory cards
Memory card is another type of flash memory. They are flat and
have a size of about 1 inch × 0.75 inch with a thickness of about 2 mm.
Memory cards currently have storage capacities in the range of 1 GB - 32
GB. Flash memory cards also have a smaller version which is used within
cell phones, tablets, etc. (refer Figure). These smaller cards are about 6
mm × 3mm in size and are less than 1 mm thick.

Table summarizes the characteristics of the various kinds of data


storage in the Storage hierarchy. Modern computers are designed with
this hierarchy due to the Characteristics listedin the table.

Learning outcomes
After the completion of this chapter the learner will be able to
 To know about Computers
 To learn about various generations of computer
 To understand the basic operations of computers
 To know the components and their functions.
 To know about booting of a computer
 To know the concept of Memory and its types
 Use of different types of input and output devices.

36
37
Lecture 2

 Software – Types: System software, Application software and Utility Software


 Software terminologies: Firmware, Liveware, Freeware, Shareware, Commercial
software, Proprietary software, Semi-free software.

Introduction
A computer system consists of hardware, the electronic devices that are capable of
computing and manipulating information, and software (set of instructions) that carries out
predefined tasks to complete a given job. As we know, a computer cannot think or perform on its
own. It performs operations like addition, subtraction, multiplication, and division only when the
user instructs it to do so. The user issues instructions and the CPU acts in accordance with the
instructions. The sets of instructions, which control the sequence of operations, are known as
programs, and collectively programs are called software. This chapter deals with software and its
types in detail.

Software
Software is a general term used to denote a set of programs that help us to use
computer system and other electronic devices efficiently and effectively. If hardware is
said to form the body of a computer system.
The software can be categorized as:
1. System software
2. Application software
3. Utility Software
1. System software
It is a set of one or more programs designed to control the operations of a computer. They
are general programs designed to assist humans in the use of computer system by performing
tasks such as controlling the operations, move data into and out of a computer system and to do
all the steps in executing application programs. In short, system software supports the running of
other software, its communication with other peripheral devices. It helps the users to use computer
in an effective manner. It implies that system software helps to manage resources of the computer.
Figure depicts how system software interfaces with user and hardware.

System software is a set of system programs which aids in the execution of a general
user's computational requirements on a computer system. The following are the components of
system software.
a. Operating system
b. Language processors
c. Utility software

a. Operating system
Operating system is a set of programs that acts as an interface between the user and
computer hardware. The primary objective of an operating system is to make the computer system
convenient to use. Operating system provides an environment for user to execute programs. It
also helps to use the computer hardware in an efficient manner.
Operating system controls and co-ordinates the operations of a computer. It acts as the
resource manager of the computer system. Operating system is the most important system
software. It is the first program to be loaded from hard disk in the computer and it resides in the
memory till the system is shut down. It tries to prevent errors and the improper use of computer.

2
Major functions of an operating system
The major functions of an Operating System are process management, memory
management, file management, security management and command interpretation

i. Process management
By the term process we mean a program in execution. The process management
module of an operating system takes care of the allocation and de allocation of processes
and scheduling of various system resources to the different requesting processes.
ii. Memory management
Memory management is the functionality of an operating systemwhich handles
or manages primary memory. It keeps track of each and every memory location to ensure
whether it is allocated to some process or free. It calculates how much memory is to be
allocated to each process and allocates it. It de- allocates memory if it is not needed
further.
iii. File management
The file management module of an operating system takes care of file related
activities such as organizing, naming, storing, retrieving, sharing, protection and
recovery
iv. Device management
Device management module of an operating system performs the management
of devices attached to the computer. It handles the devices by combining both hardware
and software techniques. The OS communicates with the hardware device via the
device driver software.

Examples of various operating systems are DOS, Windows, Unix, Linux, Mac OS X, etc.

3
b. Language processors
We know that natural languages are the medium of communication among human beings.
Similarly, in order to communicate with the computer, the user also needs to have a language
that should be understood by the computer. Computer languages may be broadly classified into
low level languages and high-level languages.
Low-level languages are described as machine-oriented languages. In these languages,
programs are written using the memory and registers available on the computer. Since the
architecture of computer differs from one machine to another, there is separate low-level
programming language for each type of computer. Machine language and assembly language are
the different low-level languages.

Machine language
We know that a computer can understand only special signals, which are represented by
1s and 0s. These two digits are called binary digits. The language, which uses binary digits, is
called machine language. Writing a program in machine language is definitely very difficult. It
is not possible to memories a long string of 0s and 1s for every instruction.

Assembly language
Assembly language is an intermediate-level programming language. Assembly languages
use mnemonics. Mnemonic is a symbolic name given to an operation.
For example, ADD for addition operation, SUB for subtraction operation, etc. It is easier
to write computer programs in assembly language as compared to machine language. It is
machine dependent and programmer requires knowledge of computer architecture.

High Level Languages (HLL)


These are like English languages and are simpler to understand than the assembly
language or machine language. High level language is not understandable to the computer. A
computer program written in a high-level language is to be converted into its equivalent machine
language program. So, these languages require a language translator (compilers or interpreters)
for conversion. Examples of high-level programming languages are BASIC, C, C++, Java, etc.

Need for language processor


The programs consisting of instructions to the computer, written in assembly language or
high-level language are not understood by the computer. We need language processors to convert
such programs into low level language, as computer can only understand machine language.
Language processors are the system programs that translate programs written in high level
language or assembly language into its equivalent machine language.

Types of language processors


Assembler:
Assembly languages require a translator known as assembler for translating the program
code written in assembly language to machine language. Because computer can interpret only
the machine code instruction, the program can be executed only after translating. Assembler is
highly machine dependent.
Interpreter: Interpreter is another kind of language processor that converts a
HLL program into machine language line by line. If there is an error in one line, it reports
and the execution of the program is terminated. It will continue the translation only after
correcting the error. BASIC is an interpreted language.

4
Compiler:
Compiler is also a language processor that translates a program written in high level
language into machine language. It scans the entire program in a single run. If there is any error
in the program, the compiler provides a list of error messages along with the line number at the
end of the compilation. If there are no syntax errors, the compiler will generate an object file.
Translation using compiler is called compilation. After translation compilers are not required in
memory to run the program. The programming languages that have a compiler are C, C++,
Pascal, etc.
Figure shows process involved in the translation of assembly language and high-level
language programs into machine language programs

2. Application software
Software developed for specific application is called application software. It includes
general purpose software packages and specific purpose software. GIMP, Payroll System, Airline
Reservation System, Tally, etc. are examples of application software.

a. General purpose software packages


General purpose software is used to perform operations in a particular application area.
Such software is developed keeping in mind the various requirements of its users. They provide
a vast number of features for its users. General purpose software is classified as word processors,
Spreadsheet software, presentation software, database software and multimedia software.

Word processing software:


Word Processing software is designed for creating and modifying documents. It helps to
create, edit, format and print textual matters easily. Formatting features include different font
settings, paragraph settings, bullets and numbering, alignments and more. In addition to this it can
check spelling and grammar in the document, insertion of pictures, charts and tables. We can
specify headers and footers for every page in the document. The most popular examples of this
type of software are MS Word, Open Office Writer, etc.

5
Spreadsheet software:
Spreadsheet software allows users to perform calculations using spreadsheets. They
simulate paper worksheets by displaying multiple cells that make up a grid. It also allows us to
insert drawing objects in the worksheet and create different types of charts for graphical
representation of numerical data. Microsoft Excel, Open Office Calc, Lotus 1-2-3 and Apple
Numbers are some examples of spreadsheet software.

Presentation software:
The software that is used to display information in the form of a slide show is known as
presentation software. Presentation software allows preparing slides containing pictures, text,
animation, video and sound effects. Microsoft PowerPoint and Open Office Impress are
examples for presentation software.

Database software:
Database is an organized collection of data arranged in tabular form. Database
Management System (DBMS) consists of a collection of interrelated data and a set of programs
to access those data. The primary goal of a DBMS is to provide an environment that is both
convenient and efficient to use in retrieving and storing database information. They provide
privacy and security to data and enforce standards for data. Examples of DBMS software are
Microsoft Access, Oracle, PostgreSQL, My SQL, etc.

Multimedia software:
Multimedia is the integration of multiple forms of media. This includes text, graphics,
audio, video, etc. Multimedia software can process information in a number of media formats. It
is capable of playing media files. Some multimedia software allows users to create and edit audio
and video files. Audio converters, audio players, and video editing software are some forms of
multimedia software. Examples are VLC Player, Adobe Flash, Real Player, Media Player, etc.

b. Specific purpose software


Specific purpose software is a highly specialized software designed to handle particular
tasks. These are tailor-made software to satisfy the needs of an organization or institution. It is
also known as customized software. Since customized software is developed for a single
customer, it can accommodate that customer's particular preferences and expectations. Some
examples of specific purpose application software are listed in Table.

6
3. Utility software
Utility software is a set of programs which help users in system maintenance tasks and in
performing tasks of routine nature. Some of the utility programs with their functions are listed
below:

Compression tools:
Large files can be compressed so that they take less storage area. These compressed files
can be decompressed into its original form when needed. Compression of files is known as
zipping and decompression is called unzipping. WinZip, WinRAR, etc. are examples of
compression tools.

Disk defragmenter:
Disk defragmenter is a program that rearranges files on a computer hard disk. The files are
arranged in such a way that they are no longer fragmented. This enables the computer to work
faster and more efficiently.

Backup software:
Backup means duplicating the disk information so that in an event of disk failure or in an
event of accidental deletion, this backup may be used. Backup utility programs facilitates the
backing up of disk.

Antivirus software:
A computer virus is a program that causes abnormality in the functioning of a computer.
Antivirus software is a utility program that scans the computer system for viruses and removes
them. As new viruses are released frequently, we have to make sure that latest antivirus versions
are installed on the computer. Most of the antivirus
programs provide an auto-update feature which enables the user to download profiles of
new viruses so as to identify and inactivate them. Norton Antivirus, Kaspersky, etc. are examples
of antivirus software.

Software terminologies:
a) Firmware,
b) Liveware,
c) Freeware and Shareware,
d) Commercial software,
e) Proprietary software,
f) Semi-free software.

7
a) Firmware
Firmware had read-only memory (ROM) and programmable read-only memory (PROM).
It was designed to be permanent. Eventually PROM chips could be updated and were called
erasable programmable read-only memory (EPROM). But EPROM was expensive, time
consuming to update and challenging to use. Firmware eventually evolved from ROM to flash
memory firmware; thus, it became easier to update and user friendly.
There are levels of firmware:

b) Low Level Firmware:


This is found in ROM, OTP/PROM and PLA structures. Low level firmware is often read-
only memory and cannot be changed or updated. It is sometimes referred to as hardware.

High Level Firmware:


This is used in flash memory for updates that is often considered as software.

Subsystems:
These have their own fixed microcode embedded in flash chips, CPUs and LCD units. A
subsystem is usually considered part of the hardware device as well as high level firmware.

BIOS, modems and video cards are usually easy to update. But firmware in storage
devices usually gets overlooked; there are no standardized systems for updating firmware.
Fortunately, storage devices do not need to be updated often.

c). Human ware or Liveware


Human ware or liveware refers to humans who use computer. It was used in computer
industry as early as 1966 to refer to computer users, often in humorous contexts by analogy with
software and hardware. It refers to programmers, systems analysts, operating staff and other
personnel working in a computer system (refer Table)

8
c) Freeware and shareware
Freeware refers to copyrighted computer software which is made available for use free of
charge for an unlimited period. The term shareware refers to commercial software that is
distributed on a trial basis. It is distributed without payment and with limited functionality.
Shareware is commonly offered in a downloadable format on the Internet. The distribution of this
kind of software aims at giving the users a chance to analyses the software before purchasing it.
Some shareware works for a limited period of time only.
Table highlights a comparison between freeware and shareware:

d) Commercial Software
Commercial software is any software or program that is designed and developed for
licensing or sale to end users or that serves a commercial purpose. Commercial software was
once considered to be proprietary software, but now a number of free and open-source software
applications are licensed or sold to end users. Off-the-shelf software programs, such as games or
those sold in computer specialty stores or even music stores and grocery stores, are some
examples of commercial software.

Example:
Microsoft products such as the Windows Operating System and MS Office are some of
the most well-known examples of commercial software.

Commercial software is normally licensed, not sold. It was once the domain of proprietary
software, developed from scratch by a specific company to solve a specific problem or fill a
specific niche and then licensed or sold to the people or organizations that needed them. This type
of software includes financial, marketing and accounting software. During the last decades,
however, some open-source applications have also become commercial software, licensed to
customers as is or as part of a service.

Contrary to popular belief, open-source software does not necessarily mean free software.
Depending on the distribution license, the former can be considered commercial software but
comes with the source code to allow customization. Some commercial software applications may
also be used freely for non-commercial use.

9
e) Proprietary software
Proprietary software is a computer program that is an exclusive property of its developer
or publisher and cannot be copied or distributed without licensing agreements. It is sold
without any access to source code and is therefore not possible to change or improve by the
user. Some examples of proprietary software are Microsoft Windows Operating System, MS
Office, Mac OS, etc.

Free and open source software Free and open source software gives the user the
freedom to use, copy, distribute, examine, change and improve the software. Nowadays free
and open source software is widely used throughout the world because of adaptable
functionality, less overall costs, vendor independency, adherence to open standards,
interoperability and security.

The Free Software Foundation (FSF) defines the four freedoms for free and open
source software:
 Freedom 0 - The freedom to run program for any purpose.
 Freedom 1 - The freedom to study how the program works and adapt it to your
 needs. Access to source code should be provided.
 Freedom 2 - The freedom to distribute copies of the software.
 Freedom 3 - The freedom to improve the program and release your
improvements to the public, so that the whole community benefits.

The following are some of the examples of free and open source software:
 GNU/Linux: GNU/Linux is a computer operating system assembled under the model
of free and open source software development and distribution. It was organized in
the
 GNU project introduced in 1983 by Richard Stallman in the FSF.
 GIMP: It stands for GNU Image Manipulation Program. It is an image editing
software. It can be used for retouching photographs, creating and editing images. It
supports graphic files of different formats and allows converting from one format to
another.
 Mozilla Firefox: It is one of the most popular web browsers created by the Mozilla
Corporation. It provides added security features for safe browsing.
 OpenOffice.org: It is a complete office suite that contains word processor (Writer) to
prepare and format documents, spreadsheets (Calc) and presentations (Impress). It
works on both Linux and Windows platforms.

f) semi-free software
It refers to any software that is not free but gives permission to individuals to use,
copy, distribute, and modify the software for non-profit purposes only. The Free
Software Foundation (FSF) also includes the ability to distribute modified versions
in its definition of semi-free software.

Learning outcomes
After the completion of this chapter, the learner will be able to
 To know software and types of software.
 To understand the function of operating system.
 To learn about software terminologies

10
11
Lecture 3

 Internet - World Wide Web – URL – Domain names - Protocols: HTTP, HTTPS
 Internet Applications: Email, File sharing web apps, Social Networks, Online
shopping, Video Conferencing
 HTML: Introduction, Editor, HTML Documents – Tags: <head>, <body>, <title>,
<heading>, <paragraph>, </br>, <table>, <li>, <ul>, <href>, <img>, <hr> and
<marquee>.

Computer Network
• A computer network, often simply referred to as a network.
• It is a collection of computers and devices interconnected by communications channels
that facilitate communications and allows sharing of resources and information among
interconnected devices.
• Networks may be classified according to a wide variety of characteristics
• Communication medium used to transport the data (Wired, wireless)
• Communications protocol (TCP, IP...)
• Scale (LAN, PAN, and MAN, WAN.)
• Topology (Bus, Ring, Star) - system arrangement

Types of Network
Local Area Network (LAN)
 A computer network that spans a relatively small area.
 Most LANs are confined to a single building or group of buildings. However, one LAN
can be connected to other LANs over any distance via telephone lines and radio waves.
 Most LANs connect workstations and personal computers. Each node (individual
computer ) in a LAN has its own CPU with which it executes programs, but it also is able
to access data and devices anywhere on the LAN. This means that many users can share
expensive devices, such as laser printers, as well as data.
 Users can also use the LAN to communicate with each other, by sending e-mail or
engaging in chat sessions.

There are many different types of LANs Ethernets being the most common for PCs.
The following characteristics differentiate one LAN from another:
 Topology : The geometric arrangement of devices on the network. For example, devices
can be arranged in a ring or in a straight line.
 Protocols: The rules and encoding specifications for sending data. The protocols also
determine whether the network uses a peer-to-peer or client/server architecture.
 Media: Devices can be connected by twisted-pair wire, coaxial cables, or fiber optic
cables. Some networks do without connecting media altogether, communicating instead
via radio waves.

Advantages
 LANs are capable of transmitting data at very fast rates, much faster than data can be
transmitted over a telephone line; but the distances are limited, and there is also a
limit on the number of computers that can be attached to a single LAN.

Metropolitan Area Network (MAN)


• A Metropolitan area network (MAN) is a large computer network that usually spans a city
or a large campus.
• A MAN usually interconnects a number of local area networks (LANs) using a high-
capacity backbone technology, such as fiber-optical links.
• They typically use wireless infrastructure or Optical fiber connections to link their sites.
• A MAN is optimized for a larger geographical area than a LAN, ranging from several
blocks of buildings to entire cities. MANs can also depend on communications channels
of moderate-to-high data rates. A MAN might be owned and operated by a single
organization, but it usually will be used by many individuals and organizations
• MANs might also be owned and operated as public utilities. They will often provide means
for internetworking of local networks. Metropolitan area networks can span up to 50km,
devices used are modem and wire/cable

Wide Area Network (WAN)


A system of LANs connected in this way is called a wide-area network (WAN).
A WAN is a data communications network that covers a relatively broad geographic area (i.e. one
country to another and one continent to another continent) and that often uses transmission facilities
provided by common carriers, such as telephone companies.

WAN technologies generally function at the lower three layers of the OSI reference model: the
physical layer, the data link layer, and the network layer.
• A WAN typically consists of two or more LANs.
• The computers are farther apart and are linked by telephone lines, dedicated telephone
lines, or radio waves.

• The Internet is the largest Wide Area Network (WAN) in existence.


Basic Hardware Components
All networks are made up of basic hardware building blocks to interconnect network nodes,
such as Network Interface Cards (NICs), Bridges, Hubs, Switches, and Routers. In addition, some
method of connecting these building blocks is required, usually in the form of galvanic cable
(most commonly Category 5 cable). Less common are microwave links (as in IEEE 802.11) or
optical cable ("optical fiber").

Network adapter

A network card, network adapter or NIC (network interface card) is a piece of


computer hardware designed to allow computers to communicate over a computer network. It
provides physical access to a networking medium and provides a low-level addressing system
through the use of MAC addresses. It allows users to connect to each other either by using cables
or wirelessly.

Hub
A hub joins multiple computers (or other network devices) together to form a single network
segment. On this network segment, all computers can communicate directly with each other.

A hub includes a series of ports that each accept a network cable. Small hubs network four
computers. They contain four or sometimes five ports, the fifth port being reserved for "uplink"
connections to another hub or similar device. Larger hubs contain eight, 12, 16, and even 24 ports.
A sending computer transmits its signal to a hub, the hub then retransmits the signal to all
other computers.
Bandwidth can be shared by all connected computer.

• When A sends to C, the Hub receives signal from A and retransmits it to both B and C.
• Only C then processes the signal.

Switch
A network switch is a small hardware device that joins multiple computers together within one
local area network (LAN).
Network switches appear nearly identical to network hubs, but a switch generally contains more
intelligence (and a slightly higher price tag) than a hub.
Unlike hubs, network switches are capable of inspecting data packets as they are received,
determining the source and destination device of each packet, and forwarding them appropriately.
By delivering messages only to the connected device intended, a network switch conserves
network bandwidth and offers generally better performance than a hub.

Router
Routers are physical devices that join multiple wired or wireless networks together.
• A router is a device that forwards data packets between telecommunications
networks.
• A router is connected to two or more data lines from different networks. When data
comes in on one of the lines, the router reads the address information in the packet to
determine its ultimate destination. Then, using information in its routing table, it
directs the packet to the next network on its journey or drops the packet.
• A data packet is typically forwarded from one router to another through networks that
constitute the internetwork until it gets to its destination node.
• The most familiar type of routers are home and small office routers that simplypass
data, such as web pages and email, between the home computers and the owner's
cable or DSL modem, which connects to the Internet (ISP).

Wi-Fi Hotspot

• Access point in wireless LAN (Wi-Fi) functions like a hub or a switch in wired
network.
• It connects computers or devices together to create a wireless network.
• Some access points come as a multi-function device that incorporates the functions of
switch, bridge, router, or broadband modem.
• An area that is within a Wi-Fi network coverage is popularly known as hotspot.
• Many public places such as airports, hotels, and cafes provide public Wi-Fi hotspots that
have broadband connection to the Internet. Such hotspots can be accessed by the public for
free or with a fee.

A hotspot is a site that offers Internet access over a wireless local area network through the use
of a router connected to a link to an Internet service provider. Hotspots typically use Wi-Fi
technology.
IP Address

An Internet Protocol address (IP address) is a numerical label assigned to each device
(e.g., computer, printer) participating in a computer network that uses the Internet Protocol for
communication.

IP address as a 32-bit number[1] and this system, known as Internet Protocol Version 4 (IPv4),
is still in use today.

However, due to the enormous growth of the Internet and the predicted depletion of available addresses,
a new addressing system (IPv6), using 128 bits for the address, was developed in 1995.

IP addresses are binary numbers, but they are usually stored in text files and displayed in human-
readable notations, such as 172.16.254.1 (for IPv4).

IP version 4 addresses

In IPv4 an address consists of 32 bits which limits the address space to 4294967296 (232) possible
unique addresses. IPv4 reserves some addresses for special purposes such as private networks.
The first three bits of the most significant octet of an IP address were defined as the class of the
address. Three classes (A, B, and C) were defined for universal unicast addressing. Depending
on the class derived, the network identification was based on octet boundary segments of the
entire address. Each class used successively additional octets in the network identifier, thus
reducing the possible number of hosts in the higher order classes (B and C). The following table
gives an overview of this now obsolete system.

Historical classful network architecture


Leading Range of Network Host
Class address Number of Number of
first ID ID
networks addresses
bits octet format format
A 0 0 - 127 a b.c.d 27 = 128 224 = 16777216
B 10 128 - 191 a.b c.d 214 = 16384 216 = 65536
C 110 192 - 223 a.b.c d 221 = 2097152 28 = 256

IPv4 Address Classes

The IPv4 address space can be subdivided into 5 classes - Class A, B, C, D and E. Each class
consists of a contiguous subset of the overall IPv4 address range.

the values of the leftmost four bits of an IPv4 address determine its class as follows:
Class Leftmost bits Start address Finish address
A 0xxx 0.0.0.0 127.255.255.255
B 10xx 128.0.0.0 191.255.255.255
C 110x 192.0.0.0 223.255.255.255
D 1110 224.0.0.0 239.255.255.255
E 1111 240.0.0.0 255.255.255.255

All Class C addresses, for example, have the leftmost three bits set to '110', but each of the
remaining 29 bits may be set to either '0' or '1' independently (as represented by an x in these bit
positions):

110xxxxx xxxxxxxx xxxxxxxx xxxxxxxx


Converting the above to dotted decimal notation, it follows that all Class C addresses fall in the
range from 192.0.0.0 through 223.255.255.255.

IP Address Class D and Multicast

The IPv4 networking standard defines Class D addresses as reserved for multicast. Multicast is
a mechanism for defining groups of nodes and sending IP messages to that group rather than to
every node on the LAN (broadcast) or just one other node (unicast).

Multicast is mainly used on research networks.

Internet
 The Internet started as a small network through a project by the United States Department
of Defense by the name ARPANET (Advanced Research Projects Agency Network).
 During 1970s this military network was connected to the computers of Universities and
companies that worked for the Department of Defense. In 1984 the military network split
from ARPANET to form MILNET to be used by the American military only.
 ARPANET which used TCP/IP protocol for communication was thereafter used for
scientific research and information sharing. Later, several other networks merged with
ARPANET to form a large network. ARPANET is considered as the first wide area network
(WAN).
 Vinton Gray Cerf who was instrumental in the development of Internet and TCP/IP
protocol, is considered as the father of Internet.

 In 1989, Tim Berners Lee, a researcher, proposed the idea of World Wide Web
(WWW).
 Tim Berners Lee and his team are credited with inventing Hyper Text Transfer Protocol
(HTTP), HTML and the technology for a web server and a web browser. Using hyperlinks
embedded in hypertext the web developers were able to connect web pages. They could
design attractive webpages containing text, sound and graphics. This change witnessed a
massive expansion of the Internet in the 1990s.
 Various types of computers loaded with diverse operating systems in different
organizations at geographically distant locations joined this network making it a global
phenomenon.
 TCP/IP protocol is used as the communication protocol for Internet. Any computer that
joins Internet should follow the TCP/IP protocol.
 In 1998, Internet Corporation for Assigned Names and Numbers (ICANN) was
established.
 ICANN does not control the Internet content; rather it develops policies on the Internet’s
Uniform Resource Locators (URL).
 Today, Internet is the largest public network that connects billions of computers all over
the world and provides several services like searching, e-mail, file transfer, social
networking, etc.

Internet, Intranet and Extranet


 The Internet is an interconnected system of computer networks that serves the
users all over the world.
 An intranet is considered as a private computer network similar to Internet that uses
TCP/IP protocol to share information, software or services within an organization.
An intranet can host websites, provide e-mail service, file transfer and other services
available on Internet.
 Extranet: When an intranet is made accessible to some computers that are not part of a
company’s private network it is called an extranet. A network that allows vendors and
business partners to access a company resource can be considered as an example of
extranet.

Connecting the computer to the Internet


 The Internet has become very popular and almost all organizations and people around
the world are joining it. Earlier, people used the Internet to search for information and
check e-mails only, but today it is used to book train tickets, recharge mobile phones,
Internet banking and a lot more. Therefore, almost all ofus require an Internet
connection in our computers or mobile devices.
 The following are the hardware and software requirements for connecting a
computer to the Internet:
 A computer with Network Interface Card (wired/wireless) facility and an
operating system that supports TCP/IP protocol
• Modem
• Telephone connection
• An Internet account given by an Internet Service Provider (ISP)
• Software like browser, client application for e-mail, chat, etc.
• Nowadays desktop computers or laptops are not the only devices that we use to connect
to the Internet. People have also started using tablets, smart phones, etc. to browse the
Internet. Some of these devices come with built-in modems, whereas others use a wireless
dongle or wireless connection from a modem to access the Internet.
Types of connectivity
• Today most websites use images and multimedia content to make webpages more
attractive. Several websites provide videos that can be downloaded or viewed on the
Internet.
• Instead of distributing software in CDs or other storage media, it is now distributed online
by various vendors. The latest trend shows that software like word processors,
spreadsheets, antivirus, etc. are used online on a rental basis instead of installing it on
each computer.
• In all these cases, a large volume of data is transferred online. Therefore, the speed or
data transfer rate of the Internet is an important aspect.

• Data transfer rate is the average number of bits transferred between devices inunit
time.
1 kbps = 1000 bits per second 1
Mbps = 1000 kbps
1 Gbps = 1000 Mbps

• The main factor that decides Internet access speed is the type of connectivity we choose
to link to the Internet. Internet connectivity is classified based on the speed of the
connection and the technology used. They can be broadly classified as dial- up
connectivity, wired broadband connectivity and wireless broadband connectivity.
• The data transfer rates of each type of connectivity may vary as technology
advances.
Services on Internet

• The internet offers a variety of services. Services like WWW, e-mail, search engines,
social media, etc. are widely used throughout the globe. In this section we shall discuss
some of the services of Internet.

World Wide Web (WWW)

• The World Wide Web (WWW) is a system of interlinked hypertext documents accessed
via the Internet. It is a service on the Internet that uses Internet infrastructure. WWW is a
huge client-server system consisting of millions of clients and servers connected together.
• Each server maintains a collection of documents and they can be accessed using a
reference called Uniform Resource Locator (URL).
• These documents may contain, text, images, videos and other multimedia content. It may
also contain hyperlinks to documents on different servers.
• Selecting a hyperlink results in a request to fetch that document/web page from the server
and display it.
• The WWW works by establishing hypertext links between documents anywhere on the
network. Clients can access the documents on the servers using software called browser.
A browser is responsible for properly displaying the documents.

a. Browser
• A web browser is a software that we use to retrieve or present information and to navigate
through web pages in the World Wide Web. The document to be displayed is identified
using a URL.
• A URL consists of its DNS name and the file name to be retrieved. It also specifies the
protocol for transferring the document across the network. A browser is capable of
displaying text, images, hypertext links, videos, sounds, scripts (program code inside a
web page), etc. in a web document/page. Most of WWW documents are created using Hyper Text
Markup Language (HTML) tags and are called web pages.
• The web browser interprets these tags and displays a formatted page. It allows us to
navigate through web pages using the hyperlinks available in web pages.
• Some common browsers are Google Chrome, Internet Explorer, Mozilla Firefox, Opera,
and Safari. Icons of some popular browsers are shown in Figure. Some of these browsers
have a mobile version that can be used in mobile operating systems.

Fig. Icons of popular browsers


b. Web Browsing
• All of us have visited web sites by entering the website address (URL) into web browsers
and then using the hyperlinks in it to move through the web pages. Traversing through
the web pages of World Wide Web is called web browsing. Major operations performed
while web browsing are shown in Figure.
Suppose you wish to visit the website ‘www.tnau.ac.in’. What will you do? You will
enter this URL in the address box of the web browser and press Enter key.
The steps a browser will follow to display a webpage may be summarized as follows.
1. The browser determines the URL (http://www.kerala.gov.in) entered.
a. The browser then sends a request to the DNS server of the user’s ISP to get the IP
address of the URL.
2. The ISP’s DNS server replies with the IP address.
b. The browser then makes a TCP connection to the web server at the IP address
(www.tnau.ac.in).
3. Then it sends a GET request for the required file (web page) to the web server.
4. The web server returns the web page.
5. The TCP connection is released.
6. The browser processes the contents of the webpage and displays it.
Search engines
• There are millions of pages available on the Internet that contain information on a variety
of topics. But it is very difficult to search for a topic in this large collection of web pages.
Internet search engine websites are special programs that are designed to help people to
find information available in World Wide Web. Search engine programs search
documents available on World Wide Web for specified keywords and return a list of the
documents/web pages matching the keywords.
• Let us discuss the technology behind these websites. Search engine web sites use
programs called web crawlers or spiders or robots to search the web.
• Web crawlers search the web pages stored in the different web servers and find
possible keywords. The search engine website stores these keywords along with their
URLs to form an index in the search engine’s web servers.
• When we use the search engine website to search a particular topic (keyword), it does
not search the World Wide Web. It only searches the index, which the web crawler
programs have created in the search engine’s web server for the topic/keyword. Search
engines select a list of URLs where the particular topic is found from the index and
displays it as the result. Figure shows the working of a search engine.

Figure: Search results of different search engines

Some of the most popular web search engine sites are Google, Bing, Yahoo Search, Ask, etc.
Figure shows the search results of different search engines.

URL
(Uniform Resource Locator)

 URL stands for Uniform Resource Locator. URL is a formatted text string used by web
browsers, email clients and other software to identify a network resource on the Internet.
 Every resource on the Internet has a unique URL. Network resources are files that can
be plain web pages, other text documents, graphics, programs, etc.
 URL consists of letters, numbers and punctuations. URL string can be divided into
 three parts.
a) Network protocol - used to access the file resource
b) Domain name (Host name or address) - identifies a specific computer on the
Internet
c) File name- hierarchical description that specifies the location of a file in that
computer
For example, the URL http://www.tnau.ac.in/index.html has three parts as shown in Figure The
detailed description of these three parts are given below:

http:// www.tnau.ac.in/ Index.html


a. Protocol

The protocol enables the browser to know what protocol is used to accessthe
information specified in the domain.
b. Domain name

 Domain name is the name assigned to a server through the Domain Name System
 (DNS). Domain names are used in URLs to identify the particular web server.
Domain names provide Internet users with a short name that is easy to remember.
Whenever we have to communicate with a computer on Internet, we can do so by
using its IP address. But it is practically impossible for a person to remember the IP
addresses of all the computers, one may have to communicate with. Therefore, a
system has been developed which assigns names to computers (web servers) and
maintains a database of these names and their corresponding IP addresses. These
names are called domain names. Examples of some domain names are
dhsekerala.gov.in, keralaresults.nic.in, google.com, gmail.com, etc.
 A domain name usually has more than one part: top level domain name or primary
domain name and sub-domain name(s). For example, in the domain name above, ‘in’
is the primary domain name; ‘gov’ is the sub-domain of in and ‘dhsekerala’ is the
subdomain of ‘gov’. There are only a limited number of top-level domains and these
are divided into two categories: Generic Domain Names and Country-Specific
Domain
 Names. Examples of generic and country specific domain names are given in Table

c. File name
 It is the file to be opened. In the example given in Figure 'index.html' is the file that
is to be accessed from the web server specified by the domain name.
Domain Name System (DNS)
 DNS stands for Domain Name System.
 DNS returns the IP address of the domain name, that we type in our web browser’s
address bar. (like mobile phone automatically dialing the phone number when we select
a name from contact list).
 The DNS system has its own network. DNS implements a database to store domain
 names and IP address information of all web sites on the Internet. DNS assumes that
IP addresses do not change (statically assigned). If one DNS server does not know
how to translate a particular domain name, it asks another one, and so on, until the
correct IP address is returned.

Network protocols
 A network protocol is the special set of rules to be followed in a network when devices
in the network exchange data with each other. Each protocol specifies its own rules for
formatting data, compressing data, error checking, identifying and making connections
and making sure that data packets reach its destination.
 Several computer networks protocols have been developed for specific purposes and
environments. Some commonly used protocols are TCP/IP, SPx/IPx etc.

TCP/IP
 TCP/IP, Transmission Control Protocol/Internet Protocol, is a suite of communications
protocols used to interconnect network devices on the local networks and the Internet.
 TCP/IP defines rules for how electronic devices (like computers) should be connected to
the Internet and how data should be transmitted between them.
 When data is to be sent from one computer to another over Internet, it is first broken into
smaller packets by TCP and then sent. When these packets are received by the receiving
computer, TCP checks packets for errors. If errors are found, TCP submits requests for
retransmission; else packets are assembled into the original message according to the
rules specified in TCP protocol. Figure shows the steps involved

in the working of TCP/IP protocol. Delivery of each of these packets to the right destinations is
done by Internet protocol (IP). Even though different packets of the same message may be routed
differently, they will reach the same destination and get reassembled there. HTTP, FTP and DNS
are three sub protocols of TCP/IP protocol suite.
HTTP

 HTTP stands for Hypertext Transfer Protocol. It is a standard protocol for transferring
requests from client-side and to receive responses from the server-side. The HTTP client
(browser) sends a HTTP request to the HTTP server (web server) and server responds with
a HTTP response. This pair of request and response is called an HTTP session (refer Figure
8.35). The response from the server can be static such as a file already stored on the server,
or dynamic, such as, the result of executing a piece of code by the server as per the request
from the client.
The two important characteristics of HTTP are
 HTTP is transmission medium independent.
 HTTP is stateless (The server and client are aware of each other only during a request or
response. Afterwards, each forgets the other).

HTTPS
 Hypertext transfer protocol secure (HTTPS) is the secure version of HTTP, which is the
primary protocol used to send data between a web browser and a website. HTTPS is
encrypted in order to increase security of data transfer. This is particularly important
when users transmit sensitive data, such as by logging into a bank account, email service,
or health insurance provider.
Any website, especially those that require login credentials, should use HTTPS

Before encryption:
This is a string of text that is completely readable

After encryption:
ITM0IRyiEhVpa6VnKyExMiEgNveroyWBPlgGyfkflYjDaaFf/Kn3bo3OfghBPDWo6
AfSHlNtL8N7ITEwIXc1gU5X73xMsJormzzXlwOyrCs+9XCPk63Y+z0=

 In websites without HTTPS, it is possible for Internet service providers (ISPs) or other
intermediaries to inject content into webpages without the approval of the website owner.
 HTTPS eliminates the ability of unmoderated third parties to inject advertising into web
content.

FTP
 FTP stands for File Transfer Protocol.
 It is a standard for exchanging of data and program files across a network. FTP is the
easiest way to transfer files between computers via the Internet. It uses TCP and IP to
perform uploading and downloading.
 An FTP client program installed in the computer can help in the uploading (sending files
to another computer) and downloading (receiving files from another computer) of files.
 FTP uses client-server architecture in servers with security features, username and
password protection for file transfer. An FTP client program (Filezilla, Cute FTP, etc)
installed in the computer can help in the easy uploading and downloading of files.

Internet Applications: Email, File sharing web apps, Social Networks, Online
shopping, Video Conferencing

a. E-mail
• E-mail enables us to contact any person in the world in a matter ofseconds. Billions
of e-mail messages are sent over the Internet every day.
• Electronic mail or e-mail is a method of exchanging digital messages between
computers over Internet.
• E-mail has become an extremely popular communication tool.
• The e-mail will be delivered almost instantly in the recipient’s mail box (Inbox). Apart
from text matter, we can send files, documents, pictures, etc. as attachment along with e-
mail.
• The same email can be sent to any number of people simultaneously. Figure shows
a sample e-mail message.

Figure: A sample e-mail message


Structure of an e-mail address

user name@domain name

• An example of an e-mail address is [email protected]


• An e-mail address consists of two parts separated by @ symbol.
• The first part tnauagristudent is the username that identifies the addressee and the
second part gmail.com is the domain name of the e-mail server, i.e., the name of the e-
mail service provider.
• E-mails can be accessed using websites like gmail.com, hotmail.com, etc. that provide
web applications consisting of functions to send, receive, forward, reply and organize
emails. Such a facility is popular and is commonly referred to as web mail.
• E-mails can also be accessed using e-mail client software that is installed in our
computers. Such software uses our e-mail address and password to retrieve e-mails from
the email service provider’s server and store it in our computer. An e-mail client allows to
send, receive and organize e-mail.
• The messages sent when the computer is offline are stored in the program and send later
when computer is online.
• For receiving messages, e-mail client applications usually use either the Post Office
Protocol (POP) or the Internet Message Access Protocol (IMAP). The popular e-mail
client applications are Microsoft Outlook and Mozilla Thunderbird.

Sections of an e-mail
• A client software gives provisions to enter the following sections.
To (Recepient Address) A box to provide the e-mail addresses of the primary
recipients to whom the e-mail has to be sent.

Cc (Carbon copy) Write the e-mail addresses of the secondary


recipients to whom the message has to be sent.
Bcc (Blind carbon copy) Write the e-mail addresses of the tertiary recipients
who receive the message. When the message is
received the primary and secondary recipients cannot
see the email addresses of the tertiary recipients in
the message. Depending on e-mail service used, the
tertiary recipients may only see their own e-mail
address in Bcc, or they
may see the e-mail addresses of all recipients.
Subject Provide a meaningful subject for your conversation
here. This helps you to identify a conversation with a
particular person when you
search your e-mails later
Content Type your message here. Today most of the e-mail
service providers offer features to create an attractive
message by giving colours, changing font styles, size,
etc.
Attachment Attachment facility allows us to send files like
documents, pictures, etc. along with an e-mail.
Send The ‘Send’ button is used to send the message to the
recipients. ‘Reply’ button allows you to send a reply
back to the sender of the message received.

Forward Forward’ button helps you to send a message


received by you to other people.
Reply REPLY:
 To reply to a message along with the
original message received.
REPLY ALL:
 To send the reply to all the addresses
available in CC in addition to TO
Address.

Figure shows the option in sections of an e-mail.

Figure: Option in e-mail

Working of e-mail
• When an e-mail is sent from your computer using web mail or e-mail client
software, it reaches the e-mail server of our e-mail service provider.
• From there the message is routed from sender’s e-mail server all the way to the
recipient’s email server.
• The recipient’s e-mail server then delivers the e-mail to the recipient’s mail box
(inbox), which stores the e-mail and waits for the user to read it. Simple Mail
Transfer Protocol (SMTP) is used for e-mail transmission across Internet.
• Figure shows the working of e-mail.
Fig.: Working of e-mail

Advantages of using e-mail

The benefits of using e-mail facility are listed below.

• Speed: An e-mail is delivered instantly to any location across the globe. We can
send the same e-mail to multiple users simultaneously.
• Easy to use: We can send and receive e-mails, organize our daily conversations and
save them easily on our computer.
• Provision of attachments: The attachment feature allows to send pictures, files,
documents, etc. along with e-mail.
• Environment friendly: E-mails do not use paper and save a lot of trees from being
cut down.
• Reply to an e-mail: When we need to reply to an e-mail, we can use the provision of
attaching previous e-mails as reference. It helps to refresh the recipient about the
subject.
• Cost-effective: When compared to fax or conventional mail, e-mail is less
expensive.
• Available anywhere anytime: Messages can be read at user’s convenience. Access
to mail box is available anytime. The e-mail service, though beneficial in our daily
life, can be misused in different ways as listed below.
• E-mails may carry viruses: Viruses send along with e-mail can harm our computer
system. Viruses can also illegally access our e-mail address book and spread virus
infected messages to all email addresses in it.
• Junk mails: Checking and deleting unwanted mails consume a lot of time.

File sharing web apps


 File sharing is the practice of sharing or offering access to digital information or
resources, including documents, multimedia (audio/video), graphics, computer
programs, images and e-books. It is the private or public distribution of data or resources
in a network with different levels of sharing privileges.
 File sharing can be done using several methods. The most common techniques for file
storage, distribution and transmission include the following:
 Removable storage devices
 Centralized file hosting server installations on networks
 World Wide Web-oriented hyperlinked documents
 Distributed peer-to-peer

networks Figure shows the File

Sharing Web App

Google Drive
 Google Drive is a file storage and synchronization service developed by Google.
 Launched on April 24, 2012, Google Drive allows users to store files on their servers,
synchronize files across devices, and share files.
 In addition to a website, Google Drive offers apps with offline capabilities for
Windows and macOS computers, and Android and iOS smartphones and tablets.
 Google Drive encompasses Google Docs, Google Sheets, and Google Slides, which are
a part of an office suite that permits collaborative editing of documents, spreadsheets,
presentations, drawings, forms, and more.
 Files created and edited through the office suite are saved in Google Drive. Google
Drive offers users 15 gigabytes of free storage through Google One. Google One also
offers 100 gigabytes, 200 gigabytes, 2 terabytes, 10 terabytes, 20 terabytes, and 30
terabytes offered through optional paid plans.
 Files uploaded can be up to 5 terabytes in size. Users can change privacy settings for
individual files and folders, including enabling sharing with other users or making
content public. On the website

iCloud
 The best place for all your photos, files, and more.
 iCloud was launched in 2011 as the successor to MobileMe and is Apple’s current
cloud service that allows iOS and Mac users to save and synchronize information.
 Apple includes 5GB of iCloud storage for free.

FileDrop
 It's a small and simple file sharing tools available from Sandstorm's app
marketplace.
 FileDrop is easy to use. Install it, then create a new instance of the application (called
a drop). After that, upload some files to the drop. With a click or two, send an email
to the person you want to share the drop with. They get a link and access to whatever
you put in the drop.
 FileDrop is quick, it's basic, and it's simple. But it does the job.

Dropbox
 Dropbox is a file hosting service operated by the American company Dropbox, Inc.,
headquartered in San Francisco, California, that offers cloud storage, file
synchronization, personal cloud, and client software.
 Dropbox was founded in 2007 by MIT students Drew Houston and Arash Ferdowsi as
a startup company, with initial funding from seed accelerator Y Combinator.
 Dropbox has been praised, receiving the Crunchie Award in 2010 for Best Internet
Application, and Macworld's 2009 Editor's Choice Award for Software.
 Dropbox brings files together in one central place by creating a special folder on the
user's computer. The contents of these folders are synchronized to Dropbox's servers
and to other computers and devices where the user has installed Dropbox, keeping the
same files up-to-date on all devices.
 Dropbox uses a freemium business model, where users are offered a free account
with a set storage size, with paid subscriptions available that offer more capacity and
additional features.
 Dropbox Basic users are given two gigabytes of free storage space.
 Dropbox Plus users are given two terabytes of storage space, as well as additional
features, including advanced sharing controls, remote wipe, and an optional Extended
Version History add-on.
 Dropbox offers computer apps for Microsoft Windows, Apple macOS, and Linux
computers, and mobile apps for iOS, Android, and Windows Phone smartphones and
tablets.

Social Network/Social media


 Social media refers to the use of mobile and web-based technologies through which
individuals and communities can create, share, discuss and modify content.
 Wikipedia, the free encyclopedia in Internet.
 People responding to social issues through Facebook, twitter, etc.
 YouTube to share videos and for promotion of products or business.
 All of these are part of social media which is changing the way we communicate,
entertain and live. In social media, interactions among people happen in virtual
communities and networks over Internet.
 These digital technologies influence the formation and activities of civil communities
to a great extent.
a. Classification of social media

The various types of social media that exist on the Internet are: Internet forums, social
blogs, microblogs, wikis, social networks, content communities and a lot more. Figure
displays logos of popular social media websites. Here we discuss the most popular
classifications of social media.

Fig. : Logo of popular social media websites

1. Internet forums
• An Internet forum is an online discussion website where people can engage in
conversations in the form of posted messages. Each Internet forum will have sub forums
which may have several topics. Each discussion on a topic is called a thread. People can
login and start a thread or respond to discussion in a thread. Some forums allow
anonymous login also. Discussions can be about programming, social/political issues,
fashion, etc. These discussions help us to learn and find solutions to problems.
Ubuntu Forum – a community that provides help on Ubuntu is a popular forum.
2. Social blogs
• A blog (web log) is a discussion or informational website consisting of entries or posts
displayed in the reverse chronological order i.e., the most recent post appears first. Some
blogs provide comments on a particular subject; others function as personal online
diaries and some others as online brand advertising for a particular individual or
company. Initially blogs were created by a single user only. But now there are
multiauthor blogs that are professionally edited. Blogger.com and Wordpress.com are
popular sites that offer blogging facility.
3. Microblogs
• Microblogs allow users to exchange short sentences, individual images or video links.
People use microblogs to share what they observe in their surroundings – information
about events and opinions about topics from a wide range of fields. Microblogging
offers a communication mode that is spontaneous and caninfluence public opinion.
Twitter.com is a popular microblogging site.
4. Wikis
• Wikis allow people to add content or edit existing information in a web page, to
form a community document. Wiki is a type of content management system.
Editing done by users is very closely monitored by other editors and therefore
incorrect information, advertising, etc. are removed immediately. wikipedia.org –
the free online encyclopedia is the most popular wiki on web.
5. Social networks
• Social networking sites allow people to build personal web pages and then connect
with friends to communicate and share content. We can share text, pictures, videos,
etc. and comment to the posts. A social networking site can be for general topics or for
a specific area like professional networking. Public opinion is greatly influenced by
the discussions and posts in these websites. Popular social networking sites are
facebook.com and linkedin.com.

6. Content communities
• Content communities are websites that organize and share contents like photos,
videos, etc. Youtube.com is a popular video sharing site and flickr.com shares
pictures.
• Most of today’s social media websites offer more than one type of service, i.e.,
social networking and microblogging; blogging and internet forum; etc. Studies
have revealed that social media is now recognized as a social influencer.

b. Advantages of social media


• Bring people together: Social networking allows people to find long-lost childhood
friends and make new ones.
• Plan and organize events: These sites help users to organize and participate in
events.
• Business promotion: Social media offers opportunities for businesses to connect
with customers, implement marketing campaigns, manage reputation, etc.
• Social skills: These sites allow people to express their views over a particular
issue and become an agent for social change.

c. Limitations in use of social media


• Intrusion to privacy: The personal information of users can be used for illegal
activities. Information like the e-mail address, name, location and age can be used to
commit online crimes.
• Addiction: Addiction to these sites wastes our valuable time. It will negatively affect our
mental states and may lead to depression and tension. It can reduce the productivity of
workers in an organization. Students may lose concentration and this in turn may affect
their studies.
• Spread rumors: Social media will spread the news very quickly. It can facilitate or
worsen a crisis by spreading negative information or misinformation at an incredible
speed.
d. Social media interaction – Best practices
• Avoid unnecessary uploading of personal data like e-mail address, telephone
number, address, pictures and videos.
• Setting time schedule for using these sites can save wastage of time.
• In social media websites like wikis and blogs, photo and video sharing arepublic.
• What you contribute is available for all to see. Be aware of what you post online.
• Avoid posting content you may regret later.
• Set your privacy levels in such a way that you know exactly who can see your posts and
who can share them. The three basic privacy levels in social media are private, friends
and public.

Online shopping
 Online shopping is a form of electronic commerce, which allows consumers to
directly buy goods or services from a seller over the Internet using a web browser.
 Consumers find a product of interest by visiting the website of the retailer directly or
by searching among alternative vendors using a shopping search engine, which
displays the same product's availability and pricing at different e-retailers.
 As of 2020, customers can shop online using a range of different computers and
devices, including desktop computers, laptops, tablet computers, smartphones, and
smart speakers.
 An online shop evokes the physical analogy of buying products or services at a
regular "bricks-and-mortar" retailer or shopping center; the process is called
business-to-consumer (B2C) online shopping. When an online store is set up to
enable businesses to buy from another businesses, the process is called business-to-
business (B2B) online shopping. A typical online store enables the customer to
browse the firm's range of products and services, view photos or images of the
products, along with information about the product specifications, features and
prices.
 Online stores usually enable shoppers to use "search" features to find specific models,
brands or items. Online customers must have access to the Internet and a valid
method of payment in order to complete a transaction, such as a credit card, an
Interac-enabled debit card, or a service such as PayPal. For physical products (e.g.,
paperback books or clothes), the e-tailer ships the products to the customer; for
digital products, such as digital audio files of songs or software, the e-tailer usually
sends the file to the customer over the Internet. The largest of these online retailing
corporations are Alibaba, Amazon.com, and eBay.

Video conferencing
• Video conferencing is a type of teleconferencing wherein we can include the video of
the parties involved in the conference. Videoconference allows people at remote
locations join in a conference and share information. A video camera and a
speakerphone are connected to a computer and the computers are connected to the
network or Internet.
• Video conferencing is a facility which enables participants in distant locations to
take part in a conference by means of audio and video communication.
Types of Video Conferencing
 In point-to-point (two-person) video conferencing system works much like a video
telephone. Each participant has a video camera, microphone, and speakers mounted
on his or her computer. As the two participants speak to one another, their voices are
carried over the network and delivered to the other's speakers, and whatever images
appear in front of the video camera appear in a window on the other participant's
monitor.
 Multipoint videoconferencing allows three or more participants to sit in
 a virtual conference room and communicate as if they were sitting right next to each
other. Until the mid-90s, the hardware costs made videoconferencing prohibitively
expensive for most organizations, but that situation is changing rapidly. Many
analysts believe that videoconferencing will be one of the fastest-growing segments
of the computer industry in the latter half of the decade.

Video Conferencing Software


 Video conferencing and Web conferencing software applications enable both point-
to-point (two-person) and multipoint (three or more participants) video conferences.
 Video conferencing software is used by companies of all sizes to stay connected with
global partners and employees, to increase productivity and to cut costs. Most video
conferencing software let users communicate and share and collaborate on files.

Zoom
Zoom unifies cloud video conferencing, simple online meetings, and group messaging into
one easy-to-use platform. Our solution offers the best video, audio, and screen-sharing experience
across Windows, Mac, iOS, Android, Blackberry, Zoom Rooms, and H.323/SIP room systems.
Zoom was founded in 2011 by experienced leaders and engineers from Cisco and WebEx

GotoMeeting

An industry leader in online video conferencing for companies around the world,
GoToMeeting is trusted by millions of people every day for real time virtual communication and
collaboration. GoToMeeting provides a fast, easy and reliable professional online meeting solution
that enables customers to meet face to face, share presentations and chat with colleagues, all with
the click of a button. Nothing can match the momentum of your team or business when it’s fueled
by an award- winning collaboration solution, GoToMeeting pairs productivity with flexibility to
let employees work effectively anytime, anywhere on any device.

 Cisco Webex Meetings


 BlueJeans
 join.me.
 UberConference.
 TeamViewer.
 Adobe Connect
 Skype
 Microsoft Team
 ClearSlide
Components of a Complete Video Conferencing System

Today’s economy forces many companies to trim their travel budgets. For these organizations,
video conferencing is the most sensible collaboration substitute to face-to- face meetings. If your
company is thinking of implementing enterprise-level video conferencing, read this quick guide
to the basic components necessary for the setup.

1. Camera

 Companies need more than just the usual USB camera commonly used in web conferencing
systems; they need high-definition primary conferencing cameras with advanced features
such as (a) remote control pan and (b) zoom and tilt features. Secondary, specialized, and
document cameras may also be used in conjunction with video conferencing to convey
information whose clarity needs to be preserved, such as in the case of education sectors and
in medical applications. High-definition (HD) cameras are usually preferred, as they offer
the highest resolutions and the largest images.

2. Video Display

 The most common displays are

(a) LCD or HD Plasma Display, and


(b) LCD/DLP Projector / XGA PC Type Display.

Video conferencing systems may use more than one display option. Fact, many enterprise-
level collaboration systems and large-venue video conferencing systems have several display tools
that present different endpoints and data all together. The most preferred video displays are high-
definition displays between 720p and 1080i / 1080p, as they provide the best resolution and allow
about 20 percent more viewing area than standard / traditional definition display devices.

3. Video Conferencing Codec Unit

 Often called the “heart and the brain” of the video conferencing system, the CODEC (also
called the coder-decoder) takes the audio and video from the microphone and the camera
and then compresses it, transmits it via an IP network, and decompresses (expands) the
incoming audio and video signal or viewing on the video display device.
4. Microphone / Audio Sub-System

 Basic enterprise-level video conferencing and collaboration systems use analog microphone
pods, which are optimal for the use of a small group.
 In intermediate video collaboration systems, there is usually a conference phone – gated
“array” of digital microphones – which are designed to run on integrated software.
 This software enhances the system’s audio capabilities. If the video conferencing is applied
to larger rooms / venues, there needs to be an independent cancellation system for audio
echo, and many microphones are usually connected to the integrated collaboration system to
help facilitate large group interaction.

5. Other Equipment

 Video conferencing equipment should be neatly organized is a cart designed


especially for housing the collaboration systems and the ancillary devices.
 The flat panel display, camera, and codec are usually placed on top, and other
equipment (PC, surges suppressor, DVR, switcher, etc.) are properly stored in the
cabinet below.
 It is also a good idea to invest in diffuse directional lighting, as the usual fluorescent
lighting found in most offices tends to be inefficient in video conferencing
environments.
 Fluorescent and other overhead lighting are usually poorly located and do not have
the adequate intensity nor the correct color temperature.
 Poorly located lighting can cast unwanted shadows on participants face and they will
then appear dark and blurry at the far–end. It will create a lousy video conferencing
experience for both local and far-ends parties.
 Correct lighting used for video conferencing will also help the video display systems
perform better, and likewise allow high-definition cameras – which require more light
– to reach optimum potential.

Minimum system requirements for video conferencing


To send or receive video with a resolution of 720p, ensure that your system meets the following
minimum requirements:
Action What you need

Send  A webcam capable of producing HD video. WebEx supports most


webcams of this type.
 A computer with at least 2 GB of RAM and a quad-core processor.
 A fast network connection.

Receive  A computer with at least 2 GB of RAM and a dual-core processor.


 A fast network connection.

How Does Video Conferencing Work?


The core of a video conferencing system consists of elements that enable the capture and transfer of
video images and audio sounds. These elements are:

 Video input – 2 or more video cameras or web cams; possibly digital projectors /
whiteboards.
 Audio input – microphones either centrally located or on individuals.
 Video output – monitor, computer screen, television and/or projector.
 Audio output – professional speakers, headphones or laptop computer speakers.
 Codec – hardware or software-based coder-decoder technology that compresses
analog video and audio data into digital packets and decompresses the data on the
receiving end.
 Echo cancellation software – diminishes audio delays to enable real-time
conversation.
 Network for data transfer – today most video conferencing is transmitted over a high-
speed broadband Internet connection, using similar technology as VoIP (Voice over
Internet Protocol) but LAN and occasionally ISDN connections are used.

How Does Data Compression Work?


 The camera and microphone capture analog video and audio signals from a video
conference. These data are a continuous wave of amplitudes and frequencies
representing sounds, color shades, depth and brightness.
 Enormous bandwidth would be required to transmit this data without compression, so
codecs (hardware/software technology) compress and decompress the data into
digital packets.

How Does the Data Transfer Work?


 Once digitally compressed, the video and audio data can be transmitted over a digital
network.
 In most cases, a broadband Internet connection is the preferred network.
 Data is sent to the other participant’s video conferencing system and then
decompressed and translated back into analog video images and audio sounds.
What About Getting Through Firewalls?
 Firewalls designed to protect businesses from viruses and to provide security, can
block the transmission of video conferencing data. To support video conferencing,
the firewall needs to:
 recognize video conferencing signals
 bypass the firewall (or router) without disabling firewall protection for other traffic
 handle substantial traffic to ensure high-quality video conferencing
 Session Border Controllers (SBCs), generally a combination of hardware and
software, are the standard equipment for getting video conference calls through a
firewall.

What Role Do Standards Play?


Media Standards
 Video conferencing is only possible when the audio and video information is
translated and transmitted using the same technology language or standards. For
video, the codec system (coder-decoder technology to compress and decompress
data) uses the H.264 standard at conferencing locations.
 The standard for video compression, H.264, is widely used in various
applications/devices such as video conferencing, Blu-ray DVD players, iPods, and
YouTube.

Signaling

 Over a decade ago, The International Telecommunications Union (ITU) developed


the H.323 video conferencing standards and protocols to ensure compliance and to
facilitate support across networks.
 The majority of the installed base for video conferencing equipment in 2009 is H.323
but Session Initiation Protocol (SIP) is rapidly being adopted as the standard for video
because it can work between many different forms of communication such as voice,
data, instant messaging, and Web 2.0-based applications.

Protocols

RTMP- Real-Time Messaging Protocol (Streaming audio and video)


o Available as an open specification to create products and technology that
enable delivery of video, audio, and data in the open AMF, SWF, FLV, and
F4V formats compatible with Adobe Flash Player
RTMPT - Tunneling with RTMP encapsulated in HTTP
o Basically, is a HTTP wrapper around the RTMP protocol
RTMPE (E stands for encrypted)
o same as RTMP except that it adds a layer of security by encrypting stream
packets before transmission.
RTMPTE
o Is the "tunneled" version of RTMPE designed to get around strict corporate
firewalls.

RTMPS
o RTMPS is a secure form of RTMP — with the 'S' standing for 'secure'.
 By streaming encrypted data via a secure
connection, RTMPS prevents third parties from intercepting your live
streams while end route to Facebook's servers.
HTML:

Introduction, Editor, HTML Documents – Tags: <head>, <body>, <title>, <heading>,


<paragraph>, <br>, <table>, <li>, <ul>, <href>, <img>, <hr> and <marquee>.

1. Introduction
 HTML is the most widely used language to write web pages. Every web page is
actually an HTML file.
 Each HTML file is a plain text that defines a set of commands for creating hypertext
documents.
 These commands are known as HTML tags. While using these tags, some
keywords may be attached to them, which make the instruction more specific. These
words are known as attributes.
 An HTML document is made up of tags and attributes which work together to decide
how the contents of the web page have to be displayed on thebrowser.
 Study of HTML means the study of tags and their attributes.

2. Editor
 An HTML editor is a program for editing HTML, the markup of a web page.
Although the HTML markup in a web page can be controlled with any text editor,
specialized HTML editors can offer convenience and added functionality. For
example, many HTML editors handle not only HTML, but also related technologies
such as CSS, XML and JavaScript.

Types of editors

There are two main varieties of HTML editors: text and WYSIWYG (what you see is what you
get) editors.

Text editors
 Text editors intended for use with HTML usually provide at least syntax highlighting.
Some editors additionally feature templates, toolbars and keyboard shortcuts to
quickly insert common HTML elements and structures. Wizards, tooltip
prompts and autocompletion may help with common tasks.
 Text editors commonly used for HTML typically include either built-in functions or
integration with external tools for such tasks as version control, link-checking and
validation, code cleanup and formatting, spell-checking,
WYSIWYG HTML editors
 WYSIWYG HTML editors provide an editing interface which resembles how the
page will be displayed in a web browser. Because using a WYSIWYG editor may not
require any HTML knowledge, they are often easier for an inexperienced computer user to
get started with.
 The WYSIWYG view is achieved by embedding a layout engine. This may be
custom-written or based upon one used in a web browser. The goal is that, at all times
during editing, the rendered result should represent what will be seen later in a typical
web browser.
 WYSIWYM (what you see is what you mean) is an alternative paradigm to
WYSIWYG editors. Instead of focusing on the format or presentation of the
document, it preserves the intended meaning of each element. For example, page
headers, sections, paragraphs, etc. are labeled as such in the editing program, and
displayed appropriately in the browser.

3. HTML document
Basic structure of an HTML document

The basic structure of an HTML document is shown in Example

 Some of the words in the upper case within a pair of angle brackets < and >. These
are HTML tags.
 It is not necessary that tags be written in the upper case.
 HTML is not case sensitive. We can use either the upper or lower case or even a mix
of the two.
 In this chapter we follow the style of using the upper case for HTML tags and sentence
case (i.e., the first letter is capital) for attributes to distinguish them from other words
or text.

As shown in Example 1, all HTML pages begin with the tag <HTML> and end with tag </HTML>.
There are mainly two sections in an HTML document namely head section and body section.
 <HEAD> tag - to define the head section. The head section contains the information
about the document, including the title of the web page.
 <TITLE> tag - to define the title of the page, which will be displayed on the title bar
of the browser window.
 <BODY> tag - to define the body section. The body section contains the contents to
be displayed in the web page.

If we open this document in a web browser, it will appear as shown in Figure

Tag Description

<html> Defines the root of an HTML document

<body> Defines the document's body

<head> A container for all the head elements (title, scripts,


styles, meta information, and more)

<h1> to <h6> Defines HTML headings

<hr> Defines a thematic change in the content


Tags in HTML document
 Tags are the commands used in the HTML document that tell web browsers how to
format and organise our web pages to show the contents.
 Every tag consists of a tag name enclosed between the angle brackets'<' and '>'.
 HTML tags are not case sensitive.
 Therefore, the tags <HTML>, <html>, <Html>, <HtmL>, etc. have the same
meaning.
<HTML> - Starting an HTML page

The entire HTML document is bounded by a pair of <HTML> and </HTML> tags. The
<HTML> tag identifies the document as an HTML document. In general, <HTML> is always the
first tag in an HTML page and the </HTML> is the last tag. Everything else in the web page is
in between these two tags. That is, the Head section and the Body section lie inside the
<HTML> and </HTML> tags.

3.1 <HEAD> - Creating head


 It contains the head of an HTML document, which holds information about the
document such as its title, scripts used, style definitions, etc.
 The tag pair <HEAD> and </HEAD> declares the head section. It is also a container
tag pair.
 The HTML <head> element is a container for metadata. HTML metadata is data
about the HTML document. Metadata is not displayed.
 The <head> element is placed between the <html> tag and the <body> tag:

3.2 <TITLE> - Creating a title


 It is a container tag pair that contains the title of the HTML document, which will
appear in the web browser's title bar.
 The search engine uses the Title to identify the page.
 The tag pair <TITLE> and </TITLE> is used inside the tag pair <HEAD> and
 </HEAD> to mention the document title.
3.3 Body
 When writing in HTML, the <body> tag is used to contain a web page's content,
including hyperlinks, images, tables, text, etc. It is required in every HTML
document, and there may only be one <body> tag per page.
Example of the body tag in HTML

Below is an example of HTML with the body tag and its


contents highlighted in bold text.
<html>
<head>
<title>Example page</title>
</head>
<body>
<h1>This is a heading</h1>
<p>This is an example of a basic HTML page. </p>
</body>
</html>

Deprecated attributes

 Within an HTML tag, an attribute dictates certain aspects of an HTML element.

 Attributes are made up of a name and value pair; all tags support standard attributes.

 Every attribute unique to the <body> tag is deprecated, meaning that it may function currently.

Attribute Description

alink Designates the color a link turns when it is selected.


background Designates the background image on a page.
bgcolor Designates the background color on a page.
link Designates the color of a link that has not yet been clicked.
text Designates the color of text on a page.
vlink Designates the color of visited links.

Background

 This attribute sets an image as background for the documents body. This attribute of
<BODY> tag makes the page more attractive. The general format is:
<BODY Background = "URL of the picture">

 The HTML code given in Example shows the sky as the background image of a web page.
Example: To set an image as background for a web page

<HTML>
<HEAD>
<TITLE> Background Image </TITLE>

34
</HEAD >
<BODY Background = "Sky.jpg">
Hello, Welcome to the world of Web Pages!...
</BODY>
</HTML>
Here, the HTML code in Example 1 is modified by providing an attribute Background
with the value "Sky.jpg" in the <BODY> tag as <BODY Background = "Sky.jpg">. Before
opening the page, we have to place the image file in the current working directory. The web
page is displayed as shown in Figure

<BODY Bgcolor = "pink" text=”blue”>

3.4 HTML Headings


Headings are defined with the <h1> to <h6> tags.

 <h1> defines the most important heading. <h6> defines the least important
heading.

<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>

 Search engines use the headings to index the structure and content of your web
pages.

 Users often skim a page by its headings. It is important to use headings to show
the document structure.
35
 <h1> headings should be used for main headings, followed by <h2> headings,
then the less important <h3>, and so on.

Bigger Headings

 Each HTML heading has a default size. However, you can specify the size for
any heading with the style attribute, using the CSS font-size property:

Example

<h1 style="font-size:60px;">Heading 1</h1>

3.5 Paragraphs
The HTML <p> element defines a paragraph:

Output

3.6 HTML Table


 An HTML table is defined with the <table> tag.
 Each table row is defined with the <tr> tag.
 A table header is defined with the <th> tag. By default, table headings are bold
and centered.
 A table data/cell is defined with the <td> tag.

36
<html>
<body>

<h2>Basic HTML Table</h2>

<table style="width:100%">
<tr>
<th>Crop</th>
<th>Soil</th>
<th>Yield</th>
</tr>

<tr>
<td>Paddy</td>
<td>Loamy</td>
<td>2tn</td>
</tr>

<tr>
<td>Maize</td>
<td>Sandy Clay</td>
<td>2tn</td>
</tr>

<tr>
<td>Blackgram</td>
<td>Sandy silty loam</td>
<td>200kg</td>
</tr>
</table>

</body>
</html>

The attribute of tag tr – table row


<tr align="center">

37
Output

Define Table: <TABLE></TABLE>


Table Border: <TABLE BORDER=?></TABLE>
Cell Spacing: <TABLE CELLSPACING=?>
Cell Padding: <TABLE CELLPADDING=?>
Desired Width: <TABLE WIDTH=?> – (in pixels)
Width Percent: <TABLE WIDTH="%"> – (percentage of page)
Table Caption: <CAPTION></CAPTION>
Table Header: <TH></TH> – (same as data, except bold centered)
Table Cell: <TD></TD> – (must appear within table rows)
Cell Color <TH BGCOLOR="#$$$$$$">
Columns to Span: <TH COLSPAN=?>
Rows to Span: <TH ROWSPAN=?>
Desired Width: <TH WIDTH=?> – (in pixels)
Width Percent: <TH WIDTH="%"> – (percentage of table)
Alignment: ALIGN=TOP|BOTTOM> – (above/below table)
Alignment: <TD ALIGN=LEFT|RIGHT|
CENTER|MIDDLE|BOTTOM
VALIGN=TOP|BOTTOM|MIDDLE>
No linebreaks: <TD NOWRAP>
Columns to Span: <TD COLSPAN=?>
Rows to Span: <TD ROWSPAN=?>

Desired Width: <TD WIDTH=?>

Width Percent: <TD WIDTH="%"> – (percentage of table)


No Linebreaks: <TH NOWRAP>
Cell Color: <TD BGCOLOR="#$$$$$$">
Alignment: <TH ALIGN=LEFT|RIGHT|
CENTER|MIDDLE|BOTTOM
Table Row: <TR></TR>
Alignment: <TR ALIGN=LEFT|RIGHT|
CENTER|MIDDLE|BOTTOM
VALIGN=TOP|BOTTOM|MIDDLE>
VALIGN=TOP|BOTTOM|MIDDLE>

38
3.7 Unordered HTML List
An unordered list starts with the <ul> tag. Each list item starts with the <li> tag. The list

items will be marked with bullets (small black circles) by default:

<!DOCTYPE html>
<html>
<body>
<h2>An unordered HTML list</h2>
<ul>
<li>Paddy</li>
<li>Maize</li>
<li>Cotton</li>
</ul>
</body>
</html>

Unordered HTML List - Choose List Item Marker

The type property is used to define the style of the list item marker:

Value Description

disc Sets the list item marker to a bullet (default)

circle Sets the list item marker to a circle

square Sets the list item marker to a square

none The list items will not be marked

39
3.8 Ordered HTML List
An ordered list starts with the <ol> tag. Each list item starts with the <li> tag.

The list items will be marked with numbers by default:

<ol>
<li>Paddy</li>
<li>Maize</li>
<li>Cotton</li>
</ol>

40
3.9 HTML Images
Images can improve the design and the appearance of a web page.
Example
<img src="pic_trulli.jpg" alt="Italian Trulli">

HTML Images Syntax

In HTML, images are defined with the <img> tag.

The <img> tag is empty, it contains attributes only, and does not have a closing tag. The src

attribute specifies the URL (web address) of the image:

<img src="url">
The alt Attribute

The alt attribute provides an alternate text for an image, if the user for some reason cannot view it
(because of slow connection, an error in the src attribute, or if the user uses a screen reader).

The value of the alt attribute should describe the image:

Example
<img src="img_paddy.jpg" alt="Paddy Varity">

Image Size - Width and Height

You can use the style attribute to specify the width and height of an image.

41
Example
<img src="img_wheat.png" alt="Wheat Image" style="width:500px; height:600px;">

Alternatively, you can use the width and height attributes:

Example
<img src="img_Cotton.jpg" alt="Cotton Field" width="500" height="600">

The width and height attributes always define the width and height of the image in pixels.
Images in Another Folder

If not specified, the browser expects to find the image in the same folder as the web page.

However, it is common to store images in a sub-folder. You must then include the folder name in
the src attribute:

Example
<img src="/images/html5.gif" alt="TNAUIcon" style=" width:128px; height:128px;">

Animated Images

HTML allows animated GIFs:

Example
<img src="programming.gif" alt="Computer" style="width:48px; height:48px;">

Image as a Link

To use an image as a link, put the <img> tag inside the <a> tag:

Example
<a href="htmlimageex.html">
<img src="rice.png" alt="RiceVariety" style="width:42px; height:42px; border:0;">
</a>

Summary

Use the HTML <img> element to define an image


Use the HTML src attribute to define the URL of the image
Use the HTML alt attribute to define an alternate text for an image, if it cannot be
displayed
Use the HTML width and height attributes to define the size of the image

42
3.10 HTML Links <a> tag
HTML Links - Hyperlinks

HTML links are hyperlinks.

You can click on a link and jump to another document.

When you move the mouse over a link, the mouse arrow will turn into a little hand.

Note: A link does not have to be text. It can be an image or any other HTMLelement.

HTML Links - Syntax

Hyperlinks are defined with the HTML <a> tag:

<a href="url">link text</a>

Example
<a href="http://www.tnau.ac.in ">Tamil Nadu Agricultural University </a>

43
3.11 <marquee> tag

The HTML <marquee> tag is used for scrolling piece of text or image displayed either
horizontally across or vertically down your web site page depending on the settings.

Example

<marquee>This is basic example of marquee</marquee>

Global Attributes
This tag supports all the global attributes described in − HTML Attribute Reference
Specific Attributes

44
The HTML <marquee> tag also supports the following additional attributes −
Attribute Value Description
behavior scroll Defines the type of scrolling.
slide
alternate
bgcolor rgb(x,x,x) Deprecated − Defines the direction of scrolling the content.
#xxxxxx
colorname
direction up Defines the direction of scrolling the content.
down
left
right
height pixels or % Defines the height of marquee.
hspace pixels Specifies horizontal space around the marquee.
loop number Specifies how many times to loop. The default value is
INFINITE, which means that the marquee loops endlessly.
scrolldelay seconds Defines how long to delay between each jump.
scrollamount number Defines how how far to jump.
width pixels or % Defines the width of marquee.
vspace pixels Specifies vertical space around the marquee.

45
3.12 <HR> Horizontal Rules tag Usage

 The <hr> tag defines a thematic break in an HTML page, and is most often displayed as a
horizontal rule.

 The <hr> element is used to separate content (or define a change) in an HTML page:

Example
<h1>This is heading 1</h1>
<p>This is some text.</p>
<hr>
<h2>This is heading 2</h2>
<p>This is some other text.</p>
<hr>

46
3.13 <br> Tag

The <br> tag inserts a single line break.

The <br> tag is an empty tag which means that it has no end tag.

Example

The <br> tag inserts a single line break:

<p>To force<br> line breaks<br> in a text,<br> use the br<br> element.</p>

1. Write a program to print the output

Answer

<TABLE border="1">
<CAPTION><EM>A test table with merged cells</EM></CAPTION>
<TR><TH rowspan="2"><TH colspan="2">Average
<TH rowspan="2">Red<BR>eyes
<TR><TH>height<TH>weight
<TR><TH>Males<TD>1.9<TD>0.003<TD>40%
<TR><TH>Females<TD>1.7<TD>0.002<TD>43%
</TABLE>

47
2. Practice to design a crop details website using coding or google sites.

48
Lecture 4

 Electronic spreadsheet – Microsoft Excel


 Worksheet manipulation: insert, delete, move, copy and hide worksheet
 Cell manipulation: copy, edit and format cell data –
 Charts - Create Bar and Pie charts
 PIVOT table.

1. Getting Started with Excel

Microsoft Excel combines the column-row layout of traditional paper spreadsheets with powerful
tools for data calculation, analysis, and formatting.

Opening Excel

1. To open Excel 2010, from the Start menu, select All Programs » Microsoft Office »
Microsoft Office Excel 2010

Terms used in Excel Workbook


 A collection of worksheets contained within a single file.

Worksheet
 Single sheet within the workbook.
 A worksheet can contain data, charts, or both.
 Instead of compiling all of your information into one worksheet,
youcan create several worksheets within the one workbook file.
Column
 A vertical group of cells within a worksheet.
Row
 A horizontal group of cells within a worksheet.
Cell
 The intersection of a column and row. Information is stored in cells.

Cell Address
 Consisting of the column and row IDs, of a specific cell.
 The current cell location is displayed in the upper left corner of the worksheet.

Cell Ranges:
 A range in Excel is a collection of two or more cells.
2. Creating a Workbook

 An Excel file is called a workbook. The extension of the file is .xlsx


 By default, workbooks open with three blank worksheets, although you can add or delete
worksheets at any time.
 The advantage of having multiple worksheets, is that a variety of data can be
compiled, analyzed, and integrated in a single file.
 Worksheets can contain data, charts, or both.

Create a new workbook

1. In the top left corner of the Excel window, click FILE menu.
From the File menu, select New… Blank workbook
The New Workbook dialog box appears.

Choose Blank workbook

1. A new workbook appears.

A workbook is another word for your Excel file.

Excel automatically creates a blank workbook when you open it.

2
 First, we will learn how to open a workbook,
 how to create a workbook from a template and
 how to view multiple workbooks at the same time

Open a Workbook

To open an Excel workbook, you have created in the past, execute the following steps.

1. Click on the green File tab. The File tab in Excel 2010 replaces the Office Button (or File
Menu) in previous versions of Excel.

What you see next is called the backstage view and it contains all the workbook related
commands. Recent shows you a list of your recently used workbooks.

2. You can quickly open a workbook from here or you can click Open to open another
workbook that is not on the list.

3
Create a Workbook from a template

Instead of creating a workbook from scratch, you can create a workbook from a
template. There are many free templates available, waiting to be used!

1. Click on the green File tab and click on New.

2. To choose a template from one of the sample templates, click on Sample templates.

2. Next, choose Personal Monthly Budget and click on Create.

Result:

126
View Multiple Workbooks

If you want to view multiple workbooks at the same time, execute the following steps.

1. First, open two or more workbooks.

2. Next, click on View and then click on Arrange All.

3. Select the desired arrange setting. For example, choose Horizontal.

Result.

Note: to switch back to normal view, click on Arrange All again and check 'Windows of active
workbook'.

127
Save and Protect a Workbook and worksheet

Save a Workbook

Choose file save option

- specify the path of the file and type the name of the workbook
- select the save as type as 97-2003 format or excel workbook option
- click save

Password Protect a Workbook

You can password protect a workbook when you want to be sure that only people who know the
password can open your Excel file.

1. Open the workbook you want to protect.

2. Click on the green File tab and click on Save As.

3. Click on the Tools button and select General Options.

4. Enter a password and click on OK.

128
5. Reenter the password and click on OK.

6. Click on Save.

Your workbook is protected now.

Password Protect a Worksheet

When you share a file with other users, you may want to protect a worksheet to help prevent
it from being changed.

1. Right click on the worksheet tab of the worksheet you want to protect.

129
2. Click on Protect Sheet...

3. Enter a password.

4. Check the actions you allow the users of your worksheet to perform.

5. Click on OK.

6. Confirm the password and click on OK.

Your worksheet is protected now.

Note: to unprotect a worksheet, right click on the worksheet tab again and click on
Unprotect Sheet.

130
3. Worksheet Manipulation

3.1 Select a Worksheet

When you open Excel, Excel automatically selects Sheet1 for you. The name of the
worksheet appears on its sheet tab at the bottom of the document window.

1. To select one of the other two worksheets, simply click on the sheet tab of Sheet2 or
Sheet3.

3.2 Rename a Worksheet

By default, the worksheets are named Sheet1, Sheet2 and Sheet3. To give a worksheet a more
specific name, execute the following steps.

1. Right click on the sheet tab of Sheet1.

2. Choose Rename.

131
For example, type Sales 2010.

Result:

3.3 Insert a Worksheet

You can insert as many worksheets as you want. To quickly insert a new worksheet, click the
Insert Worksheet tab at the bottom of the document window.

Result:

3.4 Move a Worksheet

To move a worksheet, click on the sheet tab of the worksheet you want to move and drag it into the
new position.

1. For example, click on the sheet tab of Sheet4 and drag it before Sheet2.

Result:

132
3.5 Delete a Worksheet

To delete a worksheet, right click on a sheet tab and choose Delete.

1. For example, delete Sheet4, Sheet2 and Sheet3.

Result:

3.6 Copy a Worksheet

Imagine, you have got the sales for 2010 ready and want to create the exact same sheet for 2011, but
with different data. You can recreate the worksheet, but this is time-consuming. It is a lot easier to
copy the entire worksheet and only change the numbers.

1. Right click on the sheet tab of Sales 2010.

2. Choose Move or Copy.

The 'Move or Copy' dialog box appears.

133
Select (move to end) and check Create a copy.

3. Click on OK.

Result:

3.7 Hide and Unhide worksheet

1. Right click on the selected sheet to hide


2. Choose hide option

134
Unhide

1. Select any sheet


2. Right click and choose unhide
3. Select the sheet to unhide

4. Cell Manipulation

4.1 Data types

 Data type refers to the characteristics of the information stored in a worksheet cell.

For the purposes of this introductory, the main types of data in Excel:

 Text
 Numbers

135
Text data

 It is most often words that are used for worksheet headings, names, and for
identifying columns of data.
 Text data can contain letters numbers, and specialty characters such as ! or &. By
default, text data is left aligned in a cell.

Numbers

 It can be used in calculations. By default, numbers are right aligned in a cell.


 In addition to actual numbers - such as 10, 20, 30, 40 - Excel also stores dates and times
as numbers.

Problems can arise if numbers get stored as text data. This can prevent them from being used in
calculations.

Formulas:

 A formula is a mathematical equation such as adding or subtracting two numbers.


 Formulas, which includes Excel's functions are usually considered to be Numbers
but they are sometimes identified as a separate type of data.

4.2 Copy/Paste a Cell data

To copy a range, execute the following steps.

1. Select the range, right click and then click on Copy.

136
2. Select the cell where you want the first cell of the range to appear, right click, and click on Paste
under the 'Paste Options:' group.

Note: the other Paste Options are not important at this stage, but you can have a go with it if you
want.

4.3 Insert Row, Column

To insert a row between the values 20 and 40 below, execute the following steps.

1. Right click on the row 3 header.

2. Click on Insert.

137
Result:

The rows below the new row are shifted down. In a similar way, you can insert a column.

4.4 Edit cell data

Change Complete Cell Contents

Click on the cell, type over the existing entry, and press the ENTER key on the keyboard.

Change Part of the Cell Contents

Method 1

 Click on the cell to make it the active cell.


 Click on the data in the formula bar.
 Delete the part to be changed and type in the new data.
 Press the ENTER key.

Method 2

 Double click on the cell.


 Edit the part of the cell you want to change.
 Press the ENTER key.

Moving around the spreadsheet

 Home key: moves the active cell highlight to column A without changing rows.

 Ctrl + Home keys: moves the active cell highlight to cell A1.

 Ctrl + End keys: moves the active cell highlight to the last cell of the spreadsheet
containing data.

 Ctrl + Down Arrow keys: moves the active cell highlight to the last row of the
spreadsheet without changing columns.

138
 Ctrl + Up Arrow keys: moves the active cell highlight to the first row of the
spreadsheet without changing columns.

 Ctrl + Page Down keys: moves the active cell highlight to the next sheet of the
spreadsheet.

 Ctrl + Page Up keys: moves the active cell highlight to the previous sheet of the
spreadsheet.

4.5 Format cell data

1. Modify Fonts
Modifying fonts in Excel will allow you to emphasize titles and headings. To modify a font:

 Select the cell or cells that you would like the font applied
 On the Font group on the Home tab, choose the font type, size, bold, italics,
underline, or color

139
Comma Formatting in Excel

2. Format Cells Dialog Box


In Excel, you can also apply specific formatting to a cell. To apply formatting to a cell or group
of cells:

 Select the cell or cells that will have the formatting


 Click the Dialog Box arrow on the Alignment group of the Home tab

140
There are several tabs on this dialog box that allow you to modify properties of the cell or cells.

Number : Allows for the display of different number types and decimal places
Alignment : Allows for the horizontal and vertical alignment of text, wrap text,
shrink text, merge cells and the direction of the text
Font : Allows for control of font, font style, size, color, and additional
features
Border : Border styles and colors
Fill : Cell fill colors and styles

Add Borders and Colors to Cells

 Borders and colors can be added to cells manually or through the use of styles.
To add borders manually:
 Click the Borders drop down menu on the Font group of the Home tab
 Choose the appropriate border

To apply colors manually:

 Click the Fill drop down menu on the Font group of the Home tab
 Choose the appropriate color

141
To apply borders and colors using styles:

 Click Cell Styles on the Home tab


 Choose a style or click New Cell Style

4. Change Column Width and Row Height


To change the width of a column or the height of a row:

 Click the Format button on the Cells group of the Home tab
 Manually adjust the height and width by clicking Row Height or Column Width
 To use AutoFit, click AutoFit Row Height or AutoFit Column Width

142
5. Hide or Unhide Rows or Columns

To hide or unhide rows or columns:

 Select the row or column you wish to hide or unhide


 Click the Format button on the Cells group of the Home tab
 Click Hide & Unhide

143
6. Merge Cells

 To merge cells, select the cells you want to merge and click the Merge & Center
button on the Alignment group of the Home tab. The four choices for merging cells
are:

Merge & Center:

 Combines the cells and centers the contents in the new, larger cell
Merge Across: Combines the cells across columns without centering data
Merge Cells: Combines the cells in a range without centering
Unmerge Cells: Splits the cell that has been merged

7. Align Cell Contents

 To align cell contents, click the cell or cells you want to align and click on the
options within the Alignment group on the Home tab. There are several options for
alignment of cell contents:

Top Align : Aligns text to the top of the cell


Middle Align : Aligns text between the top and bottom of the cell
Bottom Align : Aligns text to the bottom of the cell
Align Text Left: Aligns text to the left of the cell
Center : Centers the text from left to right in the cell
Align Text Right: Aligns text to the right of the cell
Decrease Indent: Decreases the indent between the left border and the text
Increase Indent: Increase the indent between the left border and the text
Orientation : Rotate the text diagonally or vertically

144
Date Formatting in Excel

8. Formatting for date

1. Select cells B12.


2. Choose Format > Cells from the menu to open the Format Cells dialog box.

With the Format Cells dialog box open:

1. Click on the Number Tab (circled in red in the image above).


2. Select Date in the Category Window.
3. Select *3/14/2001 in the Type Window.

When finished, Click OK at the bottom of the Format Cells dialog box.

9. Percentage Format

To apply a percentage format to a number, execute the following steps.

1. Enter the value 0.8 into cell B2.

2. On the Home tab, in the Number group, click the Percentage symbol.

145
Result:

Select the cell and click format option.

8. Change the value

10. Data validation

You can use data validation to make sure that users enter certain values into a cell. Input messages
can be used to tell the user what to enter. If users ignore this message and enter a value that is not
valid, you can show them an error alert.

Data Validation Example


In this example, we restrict users to enter a whole number between 0 and 10.

146
1. Open the Excel file.

Create Data Validation Rule


To create the data validation rule, execute the following steps.
1. Select cell C2.
2. On the Data tab, click Data Validation.

The Data Validation dialog box appears. On the Settings tab:


3. In the Allow list, click Whole number.
4. In the Data list, click between.
5. Enter the Minimum and Maximum values.

Input Message
 Input messages appear when the user selects the cell (in this example, selects cell C2)
and tell the user what to enter.
On the Input Message tab:
1. Check 'Show input message when cell is selected'.

147
2. Type a title.
3. Type an Input message.

Result when you select cell C2:

Error Alert
 If users ignore the input message and enter a number that is not valid, you can show
them an error alert.
 On the Error Alert tab:
1. Check 'Show input message when cell is selected'.
2. Type a Title
3. Enter an error message.

148
Result when you enter a number that is not valid.

You can create all sorts of other data validation rules for cells.

 For example, you can restrict data entry


o To a date within a date range (select Date in the Allow list),
o To a decimal number within a certain range (select Decimal in the Allow list),
o To text of specific length (select Text length in the Allow list), etc.

5. Printing in Excel

 To print the entire worksheet or just a selection and how to change some important print
settings, such as fitting a sheet on one page, printing gridlines and headings, adjusting page
margins, and centering a range of cells on a page automatically.

Print a Worksheet
 To print a worksheet in Excel 2010 (or Excel 2007), execute the following steps.
1. On the File tab, click Print.
2. To preview the other pages that will be printed, click 'Next Page' or 'Previous Page'
at the bottom of the window.

149
3. To print the worksheet, click the big Print button.

Print Selection
Instead of printing the entire worksheet, you can also only print the current selection.
1. First, select the range of cells you want to print.
2. Next, under Settings, select Print Selection.

150
3. To print the selection, click the big Print button.

Fit Sheet on One Page


 If you want to fit more data on one page, you can fit the sheet on one page. To
achieve this, execute the following steps.
1. Under Settings, select 'Fit Sheet on One Page' from the Scaling drop-down list.

151
Print Gridlines & Headings

 Printing gridlines (the horizontal and vertical lines you see on your worksheet) and
row/column headers (1, 2, 3 etc and A, B, C etc) makes your copy easier to read. To
print gridlines and headings, execute the following steps,

1. On the Page Layout tab, check Print under Gridlines and check Print under Headings.

Page Margins
To adjust the page margins, execute the following steps.
1. First, click on the 'Show Margins' icon at the bottom right window. 2.
Next, you can drag the lines to change the page margins.

152
Center on Page
To center a range of cells on a page automatically, execute the following steps.
1. Under Settings, select 'Custom Margins' from the Margins drop-down list.

153
2. Next, check horizontally and vertically.

6. Save Excel File as PDF

One new feature that comes with Excel 2010, is the ability to save files in PDF format. The PDF
(Portable Document Format) allows others to view your Excel spreadsheets without having Excel
installed on their computer.

You can download the accompanied Excel file if you like. Let's get started!

To save files in PDF format in Excel 2007, you can download the 2007 Microsoft Office Add- in.
To save an Excel file in PDF Format in Excel 2010, execute the following steps.

1. Open the Excel file.


2. On the File tab, click on Save As.

3. Set the Save as type to PDF.

154
4. Select 'Minimum size' if you want to keep the file size as small as possible.

5. Click on Options.

5. Here you can select which sheets you want to publish. By default, all pages of the Active
sheet will be published.

6. Click OK and then Click on Save.

Excel automatically opens the PDF file for you (unless you deselected the 'Open file after
publishing' checkbox earlier on).

155
7. Charting

Charts are graphic depictions of data in your worksheet. Excel can build a chart
automatically based on existing data, after which the chart can be moved, resized, and deleted
without affecting your worksheet data. Charts do not appear within a specific cell, but rather
appear over other cells. When creating a chart, there are some basic rules to keep in mind to
make the process easier. This document gives an overview of the necessary elements of a chart.

Excel 2007 offers several types of charts, each with its own unique functions. Be sure to choose
the type of chart that best serves your purposes. The following table provides a quick summary
of all the chart types available to you, as well as their functions:

Chart Example Description


Type Image

Column Shows data changes among many data series over a


period of time

Line Indicates the relationship of one variable to another over


time in equal intervals

Pie Proportionally compares the items in one data series NOTE:


For more information, refer to Using Pie Charts.

Bar Shows data changes between many data series

Area Displays the highest value or total value of items in a data


series over time

XY Displays the relationship of several data series on a


(Scatter) coordinate plane, marked by points

Stock Illustrates fluctuation or stability in certain data series, not


necessarily only for stock prices

Surface Displays combinations of two sets of data, each with a


common data series, in a three-dimensional coordinate
plane

156
Doughnut Proportionally compares the items in two or more data series

Bubble Displays the relationship of two data series on a


coordinate plane, marked by points, and a third data series
that influences the size of the point

Radar Compares multiple values of multiple data series

In Excel, charts are visual representations of data on a spreadsheet. There are many types of
charts available, so you should find one that is right for your project.

1. Create the data to be charted


For information about entering data in Excel.
2. Select the data to be charted
NOTE: To select data from different areas of your worksheet or to select non-
contiguous cells, hold down [Ctrl] and select the cells.
3. From the Insert command tab, in the Charts group, click the type of chart you prefer A
pull-down list appears.

4. Click the specific chart you want


The chart appears on the spreadsheet.
The Design, Layout, and Format command tabs appear on the Ribbon.
5. OPTIONAL: If the information is represented on the incorrect axes, in the Design

command tab, from the Data group, click Switch Row/Column

About Charting Elements

A chart contains several elements, which are illustrated in this graphic.

157
The following list describes the various elements in this chart.

Title

Identifies the chart, and frequently includes a date or time period.


EXAMPLE: Average Monthly Temperatures

Category (X) Axis

 Identifies the data being charted on the horizontal x-axis; values in this section will be
used as labels along the x-axis.
 EXAMPLE: Cities (Minneapolis, Albuquerque, Tampa)

Category Axis Title

 Identifies the title of the category (x) axis.

Value (Y) Axis

 Identifies the data being charted on the vertical y-axis; values in this section will
determine where points fall in relation to the y-axis.
 NOTE: The x-axis can also be used as a value axis.
EXAMPLE: Average temperatures (0–90)

Value Axis Title

 Identifies the title of the value (y) axis.

158
Legend

 Identifies the information being charted. This is especially important when you have
more than one type of information charted.
 Using the example of the above chart, the legend identifies which information relates
to each month.

Ticks

 Ticks, indicating measurement increments, appear on both the y-axis and x-axis and can
help improve the readability of a chart. Both y-axis and x-axis ticks are optional.

Origin

 The origin is the point where the x-axis and y-axis meet. The origin is generally at zero
(0) but can be modified.

8. Function
Math and trigonometry functions

1. ABS
Returns the absolute value of a number. The absolute value of a number is the number
without its sign.
Syntax
ABS(number)

Formula Description (Result)


=ABS(2) Absolute value of 2 (2)
=ABS(-2) Absolute value of -2 (2)
=ABS(A2) Absolute value of -4 (4)
2. COS
Returns the cosine of the given angle.
Syntax
COS(number)
Formula Description (Result)
=COS(1.047) Cosine of 1.047 radians (0.500171)

3. EXP
 Returns e raised to the power of number. The constant e equals 2.71828182845904, the
base of the natural logarithm.
Syntax
EXP(number)

159
Formula Description (Result)
=EXP(1) Approximate value of e (2.718282)
=EXP(2) Base of the natural logarithm e raised to the power of 2 (7.389056)

4. FACT
 Returns the factorial of a number. The factorial of a number is equal to 1*2*3*...*
number.
Syntax
FACT(number)
Formula Description (Result)
=FACT(5) Factorial of 5, or 1*2*3*4*5 (120)
=FACT(1.9) Factorial of the integer of 1.9 (1)

5. LOG
 Returns the logarithm of a number to the base you specify.
Syntax
LOG(number, [base])

Formula Description (Result)


=LOG(10) Logarithm of 10 (1)
=LOG(8, 2) Logarithm of 8 with base 2 (3)

6. Mod
 Returns the remainder after number is divided by divisor. The result has thesame sign as
divisor.
Syntax
MOD(number, divisor)

Formula Description (Result)


=MOD(3, 2) Remainder of 3/2 (1)

7. PI
 Returns the number 3.14159265358979, the mathematical constant pi, accurate to 15 digits.
Syntax
PI()
Formula Description (Result)
=PI() Pi (3.14159265358979)

160
=PI()/2 Pi/2 (1.570796327)

8. Power
 Returns the result of a number raised to a power.
Syntax
POWER(number, power)
Formula Description (Result)
=POWER(5,2) 5 squared (25)

9. Product
 The PRODUCT function multiplies all the numbers given as arguments and returns the
product.
Syntax
PRODUCT(number1, [number2], ...)

Data
5
15
30
Formula Description Result
=PRODUCT(A2:A4) Multiplies the numbers in cells A2 2250
through A4.

10. RAND
 Returns an evenly distributed random real number greater than or equal to 0 and less than
1. A new random real number is returned every time the worksheet is calculated.
Syntax
RAND()

Formula Description (Result)


=RAND() A random number between 0 and 1 (varies)
=RAND()*100 A random number greater than or equal to 0 but less than 100 (varies)
11. SIGN
 Determines the sign of a number. Returns 1 if the number is positive, zero (0) if the
number is 0, and -1 if the number is negative.

Syntax
SIGN(number)
Formula Description (Result)

161
=SIGN(10) Sign of a positive number (1)
=SIGN(4-4) Sign of zero (0)
=SIGN(-0.00001) Sign of a negative number (-1)

12. SQRT
 Returns a positive square root.
Syntax
SQRT(numb er)
A B
Data
-16
Formula Description (Result)
=SQRT(16) Square root of 16 (4)
=SQRT(A2) Square root of the number above. Because the number is
negative, an error is returned (#NUM!)

13. SUM
 The SUM function adds all the numbers that you specify as arguments. Each argument
can be a range, a cell reference, an array, a constant, a formula, or the result from
another function.
Syntax
SUM(number1,[number2],...])

A B C
Data
-5
15
30
'5
TRUE
Formula Description Result
=SUM(3, 2) Adds 3 and 2. 5

162
MATRIX Operation

14. MMULT
 Returns the matrix product of two arrays. The result is an array with the same number
of rows as array1 and the same number of columns as array2.
Syntax
MMULT(array1, array2)
A B
1 Array 1 Array 1
2 1 3
3 7 2
4 Array 2 Array 2
5 2 0
6 0 2
7 Formula Formula
8 =MMULT(A2:B3,A5:B6)

15. MINVERSE
 Returns the inverse matrix for the matrix stored in an array.
Syntax
MINVERSE(arra y)
A B
Data Data
4 -1
2 0
Formula Formula
=MINVERSE(A2:B3)

2. Statistical function

1. Average
 Returns the average (arithmetic mean) of the arguments
Syntax

AVERAGE(number1, [number2], ...)


Formula Description Result
=AVERAGE(A2:A6) Average of the numbers in cells A2 through A6. 11

163
2. Count
 The COUNT function counts the number of cells that contain numbers, and counts
numbers within the list of arguments...
Syntax
COUNT(value1, [v alue2], ...)
A B C
Data
Sales
12/8/2008

19
22.24
TRUE
#DIV/0!
Formula Description Result
=COUNT(A2:A8) Counts the number of cells that 3
contain numbers in cells A2
through A8.
3. Countif
 The COUNTIF function counts the number of cells within a range that meet a single
criterion that you specify.
Syntax
COUNTIF(range, criteria)

 range Required. One or more cells to count, including numbers or names, arrays, or
references that contain numbers. Blank and text values are ignored.
 criteria Required. A number, expression, cell reference, or text string that defines
which cells will be counted. For example, criteria can be expressed as 32, ">32", B4,
"apples", or "32".
A B C
Data Data
apples 32
oranges 54
peaches 75
apples 86
Formula Description Result

164
=COUNTIF(A2:A5,"apples") Number of cells with 2
apples in cells A2
through A5.

4. Large
 Returns the k-th largest value in a data set.
Syntax
LARGE(array, k)
The LARGE function syntax has the following arguments:
 Array Required. The array or range of data for which you want to determine the k-th
largest value.
 K Required. The position (from the largest) in the array or cell range of data to return.
A B
Data Data
3 4
5 2
3 4
5 6
4 7
Formula Description (Result)
=LARGE(A2:B6,3) 3rd largest number in the
numbers above (5)

5. MAX
 Returns the largest value in a set of values.
Syntax

MAX(number1, [number2], ...)

Formula Description (Result)


=MAX(A2:A6) Largest of the numbers

6. Min
 Returns the smallest number in a set of values.
Syntax

MIN(number1, [number2], ...)

Formula Description (Result)


=MIN(A2:A6) Smallest of the numbers

165
7. Median
 Returns the median of the given numbers. The median is the number in the middle of
a set of numbers. All the numbers should be arranged in ascending order.

Syntax

MEDIAN(number1, [number2], ...)


The MEDIAN function syntax has the following arguments:
 Number1, number2, ... Number1 is required, subsequent numbers are optional. 1 to
255 numbers for which you want the median.
Formula Description (Result)
=MEDIAN(A2:A6) Median of the first 5 numbers in the list above (3)

8. Small
 Returns the k-th smallest value in a data set. Use this function to return values with a
particular relative standing in a data set.
Syntax
SMALL(array, k)
The SMALL function syntax has the following arguments:
 Array Required. An array or range of numerical data for which you want to
determine the k-th smallest value.
 K Required. The position (from the smallest) in the array or range of data to return.
Formula Description (Result)
=SMALL(A2:A10,4) 4th smallest number

3. Date and Time Function

1. Date
 The DATE function returns the sequential serial number that represents a
particular date. For example, the formula
=DATE(year,month,day)
Formula Description Result
=DATE(2008,1,1) Serial date for the date derived by using cells A2, B2, and 1/1/2008
C2 as the arguments for the DATE function, and using the
1900 date system.

2. Now
 Returns the serial number of the current date and time
Syntax

166
NOW()

3. Day,Month,Year
 Returns the day, month and year corresponding to a date.
Syntax
DAY(serial_number)
MONTH(serial_number)
YEAR(serial_number)
A B
Date
15-Apr-2008
Formula Description (Result)
=DAY(A2) 15
=month(A2) 4
=year(A2) 2008
4. Today
 Returns the serial number of the current date.
example, if you know that someone was born in 1963, you might use the following formula to find
that person's age as of this year's birthday:
=YEAR(TODAY())-1963
Syntax
TODAY()

A B
Formula Description
=TODAY() Returns the current date.
=TODAY()+5 Returns the current date plus 5
days. For example, if the current
date is 1/1/2008, this formula
returns 1/6/2008.
=DATEVALUE("1/1/2030")- Returns the number of days
TODAY() between the current date and
1/1/2030.

5. Time
 Returns the decimal number for a particular time.
Syntax: TIME(hour, minute, second)

Example
=time(12,5,3) returns 12:05 P

167
9. PIVOT Table
 A PivotTable is a powerful tool to calculate, summarize, and analyze data that lets you see
comparisons, patterns, and trends in your data.
 The user has a lot of data, it can sometimes be difficult to analyze all of the
information in the worksheet.
 PivotTables can help make the worksheets more manageable by summarizing data and
allowing you to manipulate it in different ways.
Input Data

Question
What is the amount sold by each salesperson?
 Answering this question could be time consuming and difficult—each salesperson appears
on multiple rows, and we would need to total all of their different orders individually.
 A PivotTable can instantly calculate and summarize the data in a way that's both easy to
read and manipulate. When we're done, the PivotTable will look something like this:

168
 Once you've created a PivotTable, you can use it to answer different questions by
rearranging—or pivoting—the data. ‘
 For example, if we wanted to answer the question:
What is the total amount sold in each month? we could modify our PivotTable to look like
this:

To create a PivotTable:
 Select the table or cells (including column headers) containing the data you want to use.

 From the Insert tab, click the PivotTable command.

169
1. The Create PivotTable dialog box will appear. Choose your settings, then click
OK. In our example, we'll use Table1 as our source data and place the PivotTable
on a new worksheet.

2. A blank PivotTable and Field List will appear on a new worksheet.

3. Once you create a PivotTable, you'll need to decide which fields to add.

170
Each field is simply a column header from the source data. In
the PivotTable Field List, check the box for each field you want to add.
In our example, we want to know the total amount sold by each salesperson, so we
will check the Salesperson and Order Amount fields.

4. The selected fields will be added to one of the four areas below the Field List. In our
example, the Salesperson field has been added to the Rows area, while the Order
Amount has been added to the Values area. Alternatively, you can click, hold, and drag
a field to the desired area.

171
5. The PivotTable will calculate and summarize the selected fields. In our
example, the PivotTable shows the amount sold by each salesperson.

 Just like with normal spreadsheet data, you can sort the data in a PivotTable using the
Sort & Filter command in the Home tab.
 You can also apply any type of number formatting you want. For example, you may
want to change the Number Format to Currency. However, be aware that some types
of formatting may disappear when you modify the PivotTable.

 If you change any of the data in your source worksheet, the PivotTable will not update
automatically.
 To manually update it, select the PivotTable and then go to Analyze > Refresh.

172
Pivoting data

 One of the best things about PivotTables is that they can quickly pivot—or
reorganize—data, allowing you to look at your worksheet data in different ways.

 Pivoting data can help you answer different questions and even experiment with the
data to discover new trends and patterns.

In our example, we used the PivotTable to answer the question:

What is the total amount sold by each salesperson? But now we'd like to answer a
new question:

What is the total amount sold in each month? We can do this by simply changing
the field in the Rows area.

To change the row:


1. Click, hold, and drag any existing fields out of the Rows area. The field will
disappear.

2. Drag a new field from the Field List into the Rows area. In our example, we will use
the Month field.

173
3. The PivotTable will adjust—or pivot—to show the new data. In our example, it now
shows the total order amount for each month.

174
To add columns:

So far, our PivotTable has only shown one column of data at a time. In order to show
multiple columns, you will need to add a field to the Columns area.

1. Drag a field from the Field List into the Columns area. In our example, we will use
the Region field.

2. The PivotTable will include multiple columns. In our example, there is nowa column
for each region.

175
Filters
 Sometimes you may want focus on just a certain section of your data.

 Filters can be used to narrow down the data in your PivotTable, allowing you to view
only the information you need.

To add a filter:

In our example, we will filter out certain salespeople to determine how they affect the total sales.

1. Drag a field from the Field List to the Filters area. In this example, we will use the
Salesperson field.

2. The filter will appear above the PivotTable. Click the drop-down arrow, and then
check the box next to Select Multiple Items.

176
3. Uncheck the box for any items you do not want to include in the
PivotTable. In our example, we will uncheck the boxes for a few different
salespeople, and then click OK.

4. The PivotTable will adjust to reflect the changes.

177
Slicers

 Slicers make filtering data in PivotTables even easier.

 Slicers are just filters, but they are easier and faster to use, allowing you to instantly
pivot your data.

 If you frequently filter your PivotTables, you may want to consider using slicers
instead of filters.

To add a slicer:
1. Select any cell in the PivotTable.
2. From the Analyze tab, click the Insert Slicer command.

3. A dialog box will appear. Select the desired field. In our example, we'll select
Salesperson, then click OK.

178
4. The slicer will appear next to the PivotTable. Each selected item will be highlighted in
blue. In the example below, the slicer contains a list of all salespeople, and six of them
are currently selected.

5. Just like filters, only selected items are used in the PivotTable. When
you select or deselect items, the PivotTable will instantly reflect the changes.

179
Try selecting different items to see how they affect the PivotTable. Press and hold
the Ctrl key on your keyboard to select multiple items from a slicer.

You can also click the Filter icon in the top-right corner to select all items from the slicer at
once.

PivotCharts

 PivotCharts are like regular charts, except they display data from a PivotTable.

 Just like regular charts, you will be able to select a chart type, layout, and style that
will best represent the data.

To create a PivotChart:

In this example, our PivotTable is showing each person's total sales per month. We will use a
PivotChart so we can see the information more clearly.

1. Select any cell in your PivotTable.

180
2. From the Insert tab, click the PivotChart command.

3. The Insert Chart dialog box will appear. Select the desired chart
type and layout, and then click OK.

4. The PivotChart will appear.

181
Try using slicers or filters to change the data that is displayed. The PivotChart will
automatically adjust to show the new data.

182
Exercise!
1. Open an existing Excel workbook. If you want, you can use our practice workbook.
2. Create a PivotTable using the data in the workbook.
3. Experiment by placing different fields in the rows and columns areas.
4. Filter the report with a slicer.
5. Create a PivotChart.
6. If you are using the example, use the PivotTable to answer the question, which
salesperson sold the lowest amount in January? Hint: First, decide which fields
you need in order to answer the question.

183
Questions

1. You can use the formula pallette to

A) format cells containing numbers


B) create and edit formula containing functions
C) enter assumptions data
D) copy a range of cells

2. Which tool you will use to join some cells and place the content at the
middle of joined cell?

A) From Format Cells dialog box click on Merge Cells check box
B) From Format Cells dialog box select the Centered alignment
C) From Format Cells dialog box choose Merge and Center check box
D) Click on Merge and Center tool on formatting toolbar

3. The Name box on to the left of formula bar

A) shows the name of workbook currently working on


B) shows the name of worksheet currently working on
C) shows the name of cell or range currently working on
D) None of above

4. Each excel file is a workbook that contains different sheets. Which of the
following cannot be a sheet in workbook?

A) work sheet
B) chart sheet
C) module sheet
D) data sheet
5. Which of the following is not the correct method of editing the cell content?
A) Press the Alt key
B) Press the F2 key
C) Click the formula bar
D) Double click the cell

6. What happens when you press Ctrl + X after selecting some cells in Excel?

A) The cell content of selected cells disappears from cell and stored in clipboard
B) The cells selected are marked for cutting
C) The selected cells are deleted and the cells are shifted left
D) The selected cells are deleted and cells are shifted up

184
7. You can auto fit the width of column by

A) double clicking on the column name on column header


B) Double click on the cell pointer in worksheet
C) Double clicking on column right border on column header
D) Double clicking on the column left border of column header

8. Long text can be broken down into many lines within a cell. You can do this through

A) Wrap Text in Format >> Cells


B) Justify in Edit >> Cells
C) Text Wrapping in Format >> Cells, Layout tab
D) All of above

9. Which of the following you can paste selectively using Paste Special command?

A) Validation
B) Formats
C) Formulas
D) All of above

10. Which of the following is invalid regarding the Protection in Excel?

A) Protect Sheet
B) Protect Workbook
C) Protect Workspace
D) All of above are valid
11. Number of rows and column in excel is and
12. Default number of worksheets in workbook is
13. The extension of excel file is
14. Graphical representation of object in excel is

Write Answer

1. Terms used in Excel


2. Explain statistical function
3. Explain mathematical function
4. Explain date and time function
5. Write cell manipulation operation in excel
6. Explain worksheet manipulation operation in excel
7. Write the procedure for preparation of chart in excel

185
186
Lecture 5

 MS-ACCESS: Creating agriculture database – Entering, editing, deleting data –


Creating Forms – Query wizard: select, update, delete – Reports.

Introduction
Microsoft Access is the relational database management system found in the Microsoft
Office suite. It allows users to create interactive database, where they can manage data such as
inventory, budgets, incoming and outgoing assets, payrolls etc. Once you have prepared the
database, you can add, modify or delete the data into the database, table or even in records. MS-
Access offers wizards to help users to create Tables, Queries, Forms and Reports, along with a
set of predefined table definitions for tracking Assets, Customers, Sales Orders, Invoices and
much more. It gives you more efficient way of handling data than a spreadsheet.

What is Microsoft Access?


Microsoft Access is a Database Management System offered by Microsoft. It uses the
Microsoft Jet Database Engine and comes as a part of the Microsoft Office suite of application.
Microsoft Access offers the functionality of a database and the programming capabilities to
create easy to navigate screens (forms). It is a file which stores the entire database. The database
file is saved to your hard drive or other storage devices.

Database

 A database is an organized collection of data, generally stored and accessed


electronically from a computer system.

 A collection of information ‘s is organized using a computer program. Databases are


organized by fields, records, and files.
o Field /column/Attribute is a single piece of information;
o Record /Row/ tuple is one complete set of fields;
o File is a collection of records.
To access information from a database, we need a database management system

Database management system (DBMS)


 This is a collection of programs that enables you to enter, organize, and select data in a
database.
 A database management system (DBMS) is software that allows access to data
contained in a database
 It is the software that interacts with end users, applications, and the database itself to
capture and analyse the data.
 The DBMS software additionally encompasses the core facilities provided to administer
the database.
Objective of the DBMS

 It is to provide a convenient and effective method of defining, storing and retrieving


the information contained in the database.
 The data contained in the database can be used by multiple application and users
using the DBMS interface with application programs.
Four basic functions performed by all DBMS are:

 Create, modify, and delete data structures, e.g. tables


 Add, modify, and delete data
 Retrieve data selectively
 Generate reports based on data.

Datatypes:

 Data types are the properties of each field. Every field has one data
type like text, number, date, etc.

MS Access Datatypes

MS Access common data types are listed below:

Type of Description Size


Data

Short Text Text, including numbers which does not Up to 255 characters.
need calculation. (e.g., Mobile
numbers).

Long Text This data type is used for lengthy text or Maximum 63, 999
alphanumeric data. characters.
Number Numeric data type used for storing 1, 2, 4, 8, and 16 bytes.
mathematical calculations.

Date/Time Store Date/time for the years 100 8 bytes.


through 9999.

Currency It allows you to store currency values 8 bytes.


and numeric data with one to four
decimal places.

Auto Assign a unique number or assigned by Four bytes (16 bytes if it is


Number Microsoft Access when any new record set as a Replication ID).
is created. Usually used as the primary
key

Yes/No It only stores logical values Yes and 1 bit


No.

Attachment It stores files, such as digital photos. Up to 2 GB Data can be


Multiple files can be attached per stored.
record.

OLE objects OLE objects can store audio, video, Up to 2 GB data can be
other Binary Large Objects. stored.

Hyperlink Text or combinations of text and Each part of a Hyperlink


numbers stored. That text is used as data type allows you to
hyperlink address. store a maximum 2048
characters.

Calculated Helps you to create an expression that You can create an expression
uses data from one or more fields. which uses data from one or
more fields.

3
How to Start Microsoft Access and open Blank database

There are two ways to Start MS Access.

1. From Windows, 'Start' button.

There are two ways to create Database in ACCESS:

1. Create Database from Template


2. Create a Blank Database

 From Windows, Start button


1. Click on the ‘Windows’ icon. You will find the list of installed programs.

2. Choose all apps and click on Access Icon.


3. MS Access Application window will appear, Choose Blank Database
4. Enter the database name and location to save a file.

4
5. Choose create

Result: This will open the MS ACCESS windows application

2. Create Database from Template

There are many situations where we need to start with some readymade
database template for given requirements.
MS Access provides many ready to use templates for such types of databases
requirements where the data structure is already defined.
You can keep customizing the template structure further as perour
requirement.
MS ACCESS Database template example includes Contacts, Student, Time
tracking, etc.

Steps to create Database from Template

 With MS ACCESS application open, Click on File.

5
 We can select any template by clicking on it. Click on Faculty Template for further reference.

 File name box will appear with the default file name.

 Enter the new Name.


 Click on 'Create.'

6
MS Access – Objects
 MS Access uses “objects" to help the user list and organize information, as well as
prepare specially designed reports.
 Databases in Access are composed of many objects but the following are the major
objects −
Tables Tables in the Database

Queries Queries such as SELECT, APPEND, UPDATE, and DELETE

Forms User Interface for the Database

Reports Reports for the Database

Together, these objects allow you to enter, store, analyze, and compile your data.

MS-Access Ribbon
The Access Ribbon is a Microsoft innovation which has replaced traditional menu bar’s
used in other software applications. It works in a similar way to a menu bar but is designed to
be more intuitive and user friendly by virtue of its visual nature.

7
The Create Ribbon

The Access Ribbon consists of a row of tabs with headings such


as HOME, CREATE, EXTERNAL DATA, and DATABASE TOOLS etc. Clicking on
each tab will present you with its own individual ribbon with its own specific icons. Each icon
on a ribbon is contained within a group of other icons that perform similar tasks. So, for
example, the CREATE ribbon has groups for TEMPLATES, TABLES,
QUERIES, FORMS, REPORTS and MACROS & CODE.

The following table shows a representative sampling of the tabs and the commands
available on each tab:

Command Tab Common Things You Can Do


Home  Select a different view from the Views group. Copy, cut and
paste from the Clipboard group.
 Set the current font characteristics and alignment from the Font
group.
 From Rich Text group apply formatting to a memo field.
 Work with Records (New, Save, Delete, Totals, Spelling, More).
 Sort & Filter the records.
 Find the records.

Create  Create a new blank table.


 Create a new table using a Table Templates. Create a list on a
SharePoint Lists.
 Create a new form based on the active table or query.
 Create a new PivotChart.
 Create a new report based on the active table or query.
 Create a new query, macro, module or class module.
External Data  Import and Export data.
 Collect data via E-mail.
 Work with online SharePoint Lists. Saved imports and exports.
Database Tools  Launch the Visual Basic editor and run a macro. Create and
view table relationships.
 Show/Hide object dependencies or the property sheet.
 Run the Database Documenter or analyses performance
and table.
 Move data to Microsoft SQL Server or an Access (Tables
only) database.
 Run the Linked Table Manager.
 Encrypt database with Password.
 Manage Access Add-ins.

8
Datasheet  Provides a datasheet, pivot table, pivot chart and design view.
 Manages fields and columns of the table.
 Set the data type and formatting.
 Create table relationships and object dependencies.

ELEMENTS OF DATABASE (MS-ACCESS)

A database stores information in an organized way that makes it easy to get information in an
effective way. In MS-Access, you can create various elements for database operations. The
Create command tab on the top of the window screen provides access to these elements in the
database. These elements are as follows:

 Tables
 Queries
 Forms
 Reports
 Macros
 Modules

You can hide or view the objects in the navigation pane, if required.

The tool (𝖴) double down arrow is used to view the objects, whereas the tool (⇑) double
up arrow is used to hide the objects.

Table
 In MS-Access, tables are used to store the data. It represents data in tabular format, i.e. in
rows (records) and columns (fields). The table structure depends on the type of
information that you want the table should contain. The structure of a table includes table
components which are as follows:
 Field Name
 Field Type or Data Type
 Field Length or Field Size
 Field Properties
 Primary key

9
Field Name

It is a label provided for a field that specifies the type of information contained in a
particular field. Two fields should not have the same field name (i.e. field name
should be unique).
e.g. a field name CONTACT_NO, would contain the mobile number or landline
number of the student.
Field Type (Data Type)
It specifies the type of data that is stored in the field. A field can store various types of
data such as textual data and numerical data or combination of both. In MS-Access,
data types can be categorized into the following types:

Data Types Description


Allows to store text or combination of text and numbers,
Text as well as numbers that don’t require calculations such as
phone numbers. Also, it is a default data type.
Memo Allows to store long blocks of text that use text
formatting.
Holds numeric values which are used for
Number calculations. It includes various types such as
Byte, Integer, Long Integer, (Single, Double)
Replication ID and Decimal.
Date Time Allows to store date and time value for the year 100 to
9999.
Allows to store monetary values that can be used in
Currency calculations. Accurate up to 15 digits on L.H.S. and 4
digits on R.H.S. of decimal point.
Allows to store numbers that are automatically generated
AutoNumber for each record. It increases the number automatically
when
you add records.
Allows Boolean value.
Yes/No
(i.e. one of two possible values)
OLE is an acronym for Object Linking Embedding. It can
OLE Object store objects such as a video clip, a picture, Word
document
or any other binary data.
Hyperlink Allows to store hyperlinks such as E-mail addresses.
Allows to store files such as digital photos. Multiple
Attachment
files can be attached per record.
Lookup Let’s you type a list of options, which can be chosen
Wizard… from a drop-down list.

10
Field Length (Field Size)

 It refers to the maximum number of characters that a field can contain. Each character
requires one byte for its storage.
 Field length is of two types which are as follows:
 Fixed length field It is a type of field length in which the number of characters you
enter in a field is fixed. These are present in Format option in Data Type Formatting
group (in Datasheet tab) such as Currency, Euro, Percent etc.
 Variable length field in this type of field length, the number of characters is not fixed.
Actually, the number of characters of the data entered in the field decide the field
length.

The field length or field size of each data type are as follows:

Field length
Data Type Field length or Field size Data Type
or Field size
0-65,536
Text 0-255 characters Memo
characters
Number 1,2, 4, 8 or 16 bytes DateTime 8 bytes
Currency 8 bytes AutoNumber 4 or 16 bytes
Yes/No 1 bit (Oor 1) OLE Object Upto 2 GB
Each part contains upto 2048 Lookup
Hyperlink 4 bytes
characters Wizard…
Field Properties
After you create a field and set its data types, you can also set additional field
properties. Setting field properties can give the database extra flexibility and
functionality. Some important properties of field are as follows:

Primary Key

It is used to uniquely identify the records in a table, e.g. the primary key of a table
Cropdatabase, which stores the data about employees of an organisation, can be
CropID because two crops cannot have the same CropID.
Rule
A condition that must be meet before the data is accepted into the database. Text,
Memo, Number, DateTime, Currency, Yes/No, Hyperlink.

Field Property Description Supported by

It limits the number of characters


Field Size AutoNumber, Text, Number.
that can be typed into a field.

11
It customises the way that text or Text, Memo, Number,
Format
numbers are displayed and printed. DateTime, Curre Auto Number,
Yes/No, Hyperlink.
It sets up the field to receive data in a
Input Mask Text, Number, DateTime,
particular format.
Currency.

It adds a label to the field to assist


Caption All data types.
the user.

Sets a value to appear in the field


Default Value before you enter any data. It is used to Text, Memo, Number, Date/
Time, Cur Yes/No, Hyperlink.
avoid the type.

This appears if a validation rule is


Validation Text Same as validation rule.
not satisfied.

Makes data entry compulsory, so Text, Memo, Number,


Required that field cannot be left blank. DateTime, Curre OLE Object,
Hyperlink, Attachment.

To speed up queries, sorting and


grouping operations or to prevent Text, Memo, Numbers,
Indexed
users from entering duplicate values. DateTime, Curr Auto Number,
Yes/No, Hyperlink.

Text, Memo, Number,


Smart Tags Attaches smart tag to the field.
DateTime, Curre AutoNumber,
Hyperlink.

Specifies the alignment (i.e. general, Text, Memo, Number,


Text Align left, center etc.) of text within a control. DateTime, Curre AutoNumber,
Yes/No, OLE Object,
Hyperlink.

Set Field as a Primary Key


Steps to assign feld as a primary key are as follows:

1. Step 1 – Select the field that you want to set a primary key.
2. Step 2 – Click the Primary Key button from Tools group (under the Design tab),
or Right click and select Primary Key.

3. Step 3 – A Key icon ) indicates which field contains the primary key.

12
Remove a Primary Key
Steps to remove- a primary key are as follows:
Step 1 – Click the field that has been assigned as a primary key.
Step 2 – Click the Primary Key button from Tools group (under Designtab), or
Right click and select Primary Key.

Create Tables

Table is an object that is used to define and store data. When you create a new table,
Access asks you to define fields which is also known as column headings.
Each field must have a unique name, and data type.
Tables organize data into columns (called fields) and rows (called records)
Tables contain fields or columns that store different kinds of data, such as a name or
an address, and records or rows that collect all the information about a particular
instance of the subject, such as all the information about a crop or employee etc.
You can define a primary key, one or more fields that have a unique value for each
record, and one or more indexes on each table to help retrieve your data more quickly.

To Create a Table using Design View


Steps to create a table using the Design View are as follows:

Step 1 – Open the database.


Step 2 – Go to Create tab in the Ribbon and select the Table Design command.

Step 3 – After clicking at the Table Design command, a Design tab and a field entry
area at middle with field property area will appear at bottom as shown in the figure:

13
Step 4: Choose design view of Table1

Step 5: Enter the tablename as tblcropinfo

14
Step 6: Create the table that will store the basic crop information concerning the crop shown
in the following table:

Step 7: Save the table design.


Now the table has created.

15
To Create a Table using Datasheet View
Steps to create a table using the Datasheet View are as follows:
Step 1 – Open the database.
Step 2 – Go to Create tab in the Ribbon and select the Table command.
Step 3 – After clicking at the Table command, a Datasheet tab will appear as shown
below:

Step 4 – In the above figure, the field ID is automatically generated that is of datatype
AutoNumber. Due to which, its values are automatically generated for each record and
field ID uniquely identifies the record in a table.

Steps to add a new field are as follows:


 Step 1 – Double click the Add New Field column label.
Or
Right click the Add New Field column label.
A menu will appear, click on Rename Column option.
 Step 2 – Type the Field name.
 Step 3 – Press Enter.
 Step 4 – Type the next field name. Continue, until you have created all of the
fields in your table.

16
Steps to explicitly assign a data type to a field area are as follows:
 Step 1 – Click the Field label for the field which you want to assign a data
type.
 Step 2 – Activate the Datasheet tab.
 Step 3 – Click drop down arrow next to the Data Type field from Data Type
& Formatting group and then, choose a data type.
Note:
By default, data type consists as a Text.

Make Changes in a Datasheet View


Some of the changes made in a table from a Datasheet View window are as follows:

Insert a Field
Steps to add a field into a table are as follows:
Step 1 – Right click on the table and click Datasheet View.
Step 2 – To insert a new column, click the Insert in Datasheet tab or Right click
the header (Field Name) of the field that follows the new field.
Step 3 – Click at Insert Column from the menu.

17
Delete a Field
Steps to delete a field from a table are as follows:

Step 1 – To delete the column, click Delete in Datasheet tab.


Or
Right click the field name of the field, you want to delete.
Step 2 – Click at Delete Column from the menu.
Step 3 – Now, MS-Access will display a prompt message to confirm that you want
to delete the field(s) or not?
Step 4 – Click on Yes button to permanently delete the field(s).

Rename a Field
Steps to rename a field into a table are as follows:

Step 1 – Just double click the Field Name to highlight it.


Or
Right click the Field Name that you want to change and click at Rename
Column from menu.
Or
Select on Datasheet tab and click on Rename option from Fields & Column group.
Step 2 – Click the Field Name if you want to edit or just start typing to replace the
name completely.

18
Editing Data into a Table
Steps to edit data into a table are as follows:
Step 1 – Open table in a Datasheet View.
Step 2 – Select the cell containing the data that you want to edit.
Step 3 – Type the new value for the selected cell and save the table.

Hide a Column
You can temporarily hide a column in a Datasheet View such that you can view
other columns in a large datasheet.
Steps to hide a column into a table are as follows:
Step 1 – Right click at the Field Name of the field that you want to hide.
Step 2 – Click Hide Columns from the menu.

Freeze Columns

Freezing a field means that no matter how far you scroll in a datasheet, you will
always see the frozen field on the left side pane.
Steps for freezing column(s) in a table are as follows:
Step 1 – Right click at the Field Name of the field that you want to freeze.
Step 2 – Click Freeze Columns from the menu.

Unfreeze All Columns


Steps to unfreeze all columns in a table are as follows:
Step 1 – Right click at the Field Name of any field.
Step 2 – Click Unfreeze All Columns from the menu.

Opening an Existing Table

Existing table can be opened by two ways which are as follows:

1. In Datasheet View To open a table in a Datasheet View, follow these steps:

Step 1 – Find a table in the All Access Objects list (the left-hand window).
Step 2 – Right click on a table and select Datasheet View.
Datasheet View represents the data in a table.
Or
Select Home tab and click the View dropdown arrow and select the
Datasheet View.

19
2. In Design View To open a table in a Design View, follow these steps:

Step 1 – Find a table in the All Access Objects list (the left-hand window).
Step 2 – Right click on the table and select Design View. Design View
represents the structure of the table.
Or
Select the Home tab and click the View dropdown arrow and select the
Design View.

Renaming and Deleting a Table

Steps to rename a table are as follows:

Step 1 – Find a table in the All Access Objects list (the left-hand window).
Step 2 – Right click on a table and select Rename.
Note:
If you are working on this table, then it will display a prompt message that you can’t
rename the database object, ‘Tablet while its open. So firstly, close this table.
Step 3 – Now, type a new name for the table.
Step 4 – Press Enter from the keyboard.

Steps to delete a table are as follows:

Step 1 – Find a table in the All Access Objects list.


Step 2 – Right click on a table and select Delete.
Step 3 – Now, MS-Access will display the prompt message to confirm that you
want to delete the table or not.
Step 4 – Click on Yes button to delete a table with its contents.

20
Navigation in a Table

It is required to move or to navigate any record for the purpose of checking it from
time to time.
You can navigate to any record in the table using the Record Navigation
buttons provided in MS-Access.
The Record Navigation buttons are located at the bottom of the table whenit is
opened in a Datasheet View, as shown in the following figure:

The following table shows the task of each navigation button:

21
Form

Form is an object in a desktop database designed primarily for data input or display or
for control of application execution. You use forms to customize the presentation of
data that your application extracts from queries or tables.
Forms are used for entering, modifying, and viewing records.
The reason forms are used so often is that they are an easy way to guide people toward
entering data correctly.
When you enter information into a form in Access, the data goes exactly where the
database designer wants it to go in one or more related tables.

Inserting Record
Double click the table and enter value for all the fields

Insert Records using Forms


Step 1: Select the table
Step 2: Choose Create Form Tab

22
Step 3: Choose Next Record in the Navigation pane, New empty will be displayed to enter
the data.

23
Query

An object that provides a custom view of data from one or more tables. Queries are a way of
searching for and compiling data from one or more tables.
Running a query is like asking a detailed question of your database.
When you build a query in Access, you are defining specific search conditions to find
exactly the data you want.
In Access, you can use the graphical query by example facility or you can write
Structured Query Language (SQL) statements to create your queries.
You can define queries to Select, Update, Insert, or Delete data.
You can also define queries that create new tables from data in one or more existing
tables.
To Create Query using a Design View
MS-Office Access provides you functionality to create a query by using a Design View. Steps to
create a query through a Design View are as follows:
Step 1 – Open the Create tab from the Ribbon and select the Query Design command from
Another group.

24
Step 2 – Select the Query Type

Step 3 : Select the Table Name and field name

25
Step 4 : Choose Details Option
Step 5 : Specify the Query Name and modify the Query Design (Insert Heading an

26
 Step 6: Click Button to view the output.
Result:

Query Type:

27
Update

Insert

Delete

Select Query (With Condition)


1. Select Query Wizard from the Create Ribbon
2. Select Table and Field

3. Choose next and Detail Report

28
4. Specify the query name and Open the query to view and click Finish

5. Query: Retrieve the crop whose Season is “Irrigated” Input


Data

Choose the Design View of the Query

29
Choose Select Query and specify the condition

Click Run button to view the output.

Update Query
 Select Query Wizard from the Create Ribbon
 Select Table and Field, Click Next and Finish
 Choose Update from the Design Tab.

30
 Specify value in the Update to Column Yield of specified or required field.
(Update yield to 7000).

 Step 5: Click Run Button and Choose Yes

Step 6 : The Yield has Updated from 2800 to 7000.

Delete Query
Delete a Record (single or multiple records)

31
 Select Query Wizard from the Create Ribbon
 Select Table and Field, Click Next and Finish
Input Data

 In Criteria option in yield field, specify the condition as Yield>=6000

 Choose RUN option in the Design Ribbon,


 Display the Message box for confirmation to delete, choose delete

Output

32
Report

Report is an object in desktop databases designed for formatting, calculating, printing, and
summarizing selected data.
 You can view a report on your screen before you print it.
 If forms are for input purposes, then reports are for output.
 Anything you plan to print deserves a report, whether it is a list of names and
addresses, a financial summary for a period, or a set of mailing labels.
 Reports are useful because they allow you to present components of your database in
an easy-to-read format.
 You can even customize a report's appearance to make it visually appealing.
 Access offers you the ability to create a report from any table or query.

Steps to create Report


1. Select the Report Wizard from the Create Ribbon

2. Select Table/Query and Field

33
3. Choose the sorting order and click Next
4. Choose the Layout as Tabular
5. Specify the filename and choose the option as preview to modify the report.

6. Choose Finish

34
7. Change the Report Header ,Page Header and Alignmnet

8. Output

35
36
Lecture 6

 Introduction to Computer Programming – Programming languages - Translators:


Compilers and Interpreters - Algorithm – Flowchart.

Computer programming:
Programming is a way to “instruct the computer to perform various tasks”. It can perform
a variety of tasks like receiving data, processing it, and producing useful results. A computer
needs to be instructed to perform even a simple task like adding two numbers. Computers work
on a set of instructions called computer program, which clearly specify the ways to carry out a
task. Computer programs are developed using computer or programming languages.
Programming involves many stages such as task analysis, flowcharting, coding, program
testing, implementation, documentation and maintenance.

Developing a program:
A program consists of a series of instructions that a computer processes to perform the
required operation. In order to design a program, a programmer must determine three basic
rudiments:
1. The instructions to be performed.
2. The order in which those instructions are to be performed.
3. The data required to perform those instructions.

Program Development Cycle


Development cycle of a program includes the following phases:
1. Analyse/Define the Problem: The problem is analysed precisely and completely.
Based on understanding, the developer knows about the scope within which the problem
needs to be developed.
2. Task analysis: The developer needs to develop various solutions to solve
the given problem. The optimum solution is chosen, which can solve the problem
comfortably and economically.

3. Developing Algorithm: After selecting the appropriate solution, algorithm is


developed to depict the basic logic of the selected solution. An algorithm depicts the
solution in logical steps. Algorithm is developed by flowcharts and pseudocodes.
4. Testing the Algorithm for Accuracy: Before converting the algorithms
into actual code, it should be checked for accuracy. The main purpose of checking
algorithm is to identify major logical errors at an early stage.
5. Coding: The actual coding of the programs takes place in the chosen
programming language. A program can be written by using computer languages of
different levels such as machine, assembly or high-level languages.
6. Test and Debug the program: A program compiler and programmer- designed test
data machine tests the code for syntax errors. Depending upon the complexity of the
program, several rounds of testing may be required.
7. Documentation: Once the program is free from all the errors, it is the duty
of the program developers to ensure that the program is supported by suitable
documentation. Documenting a program enables the user to operate the program
correctly. It also enables other persons to understand the program clearly.
8. Implementation: After performing all the above-mentioned steps, the program is
installed on the end user’s machine.
9. Maintenance and Enhancement: After the program is implemented, it
should be properly maintained taking care of the changing requirements of its users and
system. The program should be regularly enhanced by adding additional capabilities.

Program Development Cycle

PROGRAMMING LANGUAGES:
Computers are machines. Unfortunately, they cannot understand natural languages,
such as Hindi, English, Tamil, etc. that human beings speak and understand. Therefore, to give
instructions to computers, different languages have been developed. These languages are
called computer languages. To get a particular work done by computers, programmers write
instructions using these computer languages. Over the last few decades, several computer
languages have developed. Different computer languages are suitable for different applications.
For example, COBOL (Common business-oriented Language) may be more suitable for
business applications, FORTRAN may be more suitable for scientific or engineering
applications. We can classify all computer languages into three categories.
A programming language is a notation for writing programs, which are specifications
of a computation or algorithm. Some, but not all, authors restrict the term "programming
language" to those languages that can express all possible algorithms. Traits often considered
important for what constitutes a programming language include:
A computer programming language is a language used to write computer
programs, which involve a computer performing some kind of computation or algorithm and
possibly control external devices such as printers, disk drives, robots, and so on. For example,
PostScript programs are frequently created by another program to control a computer printer
or display. More generally, a programming language may describe computation on some,
possibly abstract, machine.
It is generally accepted that a complete specification for a programming language
includes a description, possibly idealized, of a machine or processor for that language. In most
practical contexts, a programming language involves a computer; consequently, programming
languages are usually defined and studied this way. Programming languages differ from natural
languages in that natural languages are only used for interaction between people, while
programming languages also allow humans to communicate instructions to machines.
The term computer language is sometimes used interchangeably with programming
language. However, the usage of both terms varies among authors, including the exact scope
of each. We assume you are well aware of English Language, which is a well-known Human
Interface Language. English has a predefined grammar, which needs to be followed to write
English statements in a correct way. Likewise, most of the Human Interface Languages (Hindi,
English, Spanish, French, etc.) are made of several elements like verbs, nouns, adjectives,
adverbs, propositions, and conjunctions, etc.
Similar to Human Interface Languages, Computer Programming Languages are also
made of several elements. These basic elements include
 Programming Environment
 Basic Syntax
 Data Types
 Variables
 Keywords
 Basic Operators
 Decision Making
 Loops
 Numbers
 Characters
 Arrays
 Strings
 Functions
 File I/O

GENERATION OF PROGRAMMING LANGUAGES


First Programmer Lady Lovelace Ada Augusta (officially the first programmer)
suggested binary numbers for computer storage instead of decimals.
1. First Generation: Machine Language
The form in which information is denoted or represented by a combination of “1” and
“0”s is called machine language. Programs and data are ultimately represented in machine
language in memory and other hardware of the computer.
2. Second Generation: Assembly Language
As computer field advanced, computer scientists felt the necessity of making computer
programming easier. They invented computer languages that are easy to remember and use.
These languages called assembly language uses mnemonic codes.
Example: ADD X Y ADD

3. Third Generation: High Level Languages (3GL)


Due to computer’s widespread usage, early 1960s saw the emergence of the third
generations programming languages (3GL). Languages such as COBOL, FORTRAN, BASIC,
and C are examples of 3GLs and are considered high-level languages.
In high-level language, programs are written in a sequence of statements to solve a problem.

4. Fourth Generation: (4GL)


It is simple, English –like syntax rules, commonly used to access databases.
4GLs, on the other hand, are non-procedural languages. The non-procedural methods is
simple to state the needed output instead of specifying each step one after another to
perform a task. It is easier to write, but has less control over how each task is actually
performed. 4GLs sacrifice computer efficiency in order to make programs easier to write.
The 4GLs are divided into three categories.

1. Query Languages:
2. Report Generators:
3. Application Generators:

5. Fifth Generation: Very High-level Languages:


These languages will be able to process natural languages. The computers would be
able to accept, interpret and execute instructions in the native or natural language of the end
users. The users will be free from learning any programming language to communicate with
the computers. The programmers may simply type the instruction or simply tell the computer
by way of microphones.

TRANSLATORS:
A program written in high-level language is called as source code. To convert the source
code into machine code, translators are needed. A translator takes a program written in source
language as input and converts it into a program in target language as output. It also detects
and reports the error during translation.

Roles of translator are:


 Translating the high-level language program input into an equivalent machine
language program.

 Providing diagnostic messages wherever the programmer violates specification


of the high-level language program.

Different type of translators

The different types of translator are as follows:

i. Compiler
ii. Interpreter

Compiler:

We write our computer program using our favorite programming language and save it
in a text file called the program file.
Actually, the computer cannot understand your program directly given in the text
format, so we need to convert this program in a binary format, which can be understood by
the computer.
The conversion from text program to binary file is done by another software called
Compiler and this process of conversion from text formatted program to binary format file is
called program compilation. Finally, you can execute binary file to perform the programmed
task.
The following flow diagram gives an illustration of the process −

Interpreter
Interpreter is a translator which is used to convert programs in high-level language to
low-level language. Interpreter translates line by line and reports the error once it encountered
during the translation process. It directly executes the operations specified in the source
program when the input is given by the user.
It gives better error diagnostics than a compiler.

SI. No Compiler Interpreter


1 Performs the translation of a Performs statement by statement
program as a whole. translation.
2 Execution is faster. Execution is slower.
3 Requires more memory as linking is Memory usage is efficient as no
needed for the generated intermediate intermediate object code is generated.
object
code.
4 Debugging is hard as the error It stops translation when the first error
messages are generated after scanning is met. Hence, debugging is easy.
the entire program
only.
5 Programming languages like C, C++ Programming languages like
uses compilers. Python, BASIC, and Ruby uses
interpreters.
ALGORITHM
Algorithm is a precise rule which specifies how to solve some problem. An algorithm
must be unambiguous and it should reach a result after a finite number of steps. Algorithm can
be represented into programs, flowcharts, and pseudocodes.
To determine the largest number out of three numbers A, B, C, the following algorithm
may be used.
Step 1: Start
Step 2: Read three numbers say A, B, C
Step 3: Find the larger number between A and B and store it in MAX_AB Step 4:
Find the larger number between MAX_AB and C and store it in MAX Step 5: Display
MAX

Step 6: Stop

FLOWCHART
Flowchart is a means of visually presenting the flow of data through an information
processing system, the operations performed within the system and the sequence.
SYMBOL SYMBOL NAME DESCRIPTION
To connect symbols.
Flow Lines These lines indicate the
sequence of steps and
direction of flow.
To represent the beginning
Terminal the termination or halt in
the program logic.
Represents information
Input / Output entering or leaving the
system, such as customer
order and servicing.
Process symbol is used for
Processing representing arithmetic
and data movement
instructions.
Decision symbol denotes a
Decision decision to be made.
This symbol has one entry
and two exit paths.
Connector To join different flow
lines.
To indicate that the
Off-page Connector flowchart continues on
the next page.
To represent a paper
Document document produced
during the flowchart
process.
To provide additional
Annotation information about another
----------------- flowchart symbol.
Represents input to be
Manual Input given by a
developer/programmer.
Shows that the process
Manual Operation has to be done by a
developer/programmer.
Represents the online data
Online Storage storage such as hard disks,
magnetic drums, or
other storage devices.
Represents the offline data
Offline Storage storage such as sales on OCR
and data on
punched cards.
To represent data
Communication Link received or to be
transmitted from an
external system.
To represent is used to
Magnetic Disk represent data input or
output from and to a
magnetic disk.

Guidelines for Preparing Flowcharts:


The following guidelines should be used for creating a flowchart:
1. The flowchart should be clear, neat, and easy to follow.
2. The flowchart must have a logical start and finish.
3. In drawing a proper flowchart, all necessary requirements should be listed in logical
order.

4. The direction of the flow of a procedure should always be from left to right or top to
bottom.
5. Only one flow line should come out from a process symbol.

or
6. Only one flow line should enter a decision symbol. However, two or three flow lines may
leave the decision symbol.
<0 >0

=0
7. Only one flow line is used with a terminal symbol.

8. Within standard symbols, write briefly.


9. In case of complex flowcharts, connector symbols are used to reduce the number of flows
lines.
10. Intersection of flow lines should be avoided to make it a more effective and better way
of representing communication.
11. It is useful to test the validity of the flowchart by passing through it with normal/unusual
test data.

Benefits of Flowcharts:
 Makes Logic Clear: To plan a task, it provides a pictorial representation of the task,
which makes the logic easier to follow.
 Communication: Being a graphical representation of a problem solving
logic, flowcharts are better way of communicating the logic of a system to all
concerned.
 Effective analysis: With the help of a flowchart, the problem can be
analysed in an effective way.
 Useful in coding: Once the flowcharts are ready, the programmers can plan the coding
process effectively.
 Proper Testing and Debugging: A flowchart helps in detecting the errors in a
program, as the developers know exactly what the logic should do.
 Appropriate Documentation: Flowcharts serve as a good program
documentation tool.

Limitations of Flowcharts:
Flowchart can be used for designing the basic concept of the program in pictorial form but
cannot be used for programming purposes. Some of the flowchart limitations are given below:
 Complex: The major disadvantage in using flowcharts is that when a program is very
large, the flowcharts may continue for many pages, making them hard to follow.
 Costly: If flowcharts are to be drawn for a huge application, the time and
cost factor of program development may get out of proportion, making it a costly
affair.
 Difficulty to Modify: Any changes or modification to a flowchart usually
requires redrawing the entire the entire logic again, and redrawing a complex flowchart
is not a simple task.
 No update: Usually programs are updated regularly. However, the
corresponding update of flowcharts may not take place, especially in the case of large
programs.
Lecture 7

 Introduction to C – Structure of C program - Data types, Variables, Constants,


Operators: Arithmetic,
 Relational, Logical, Assignment - Input/Output: scanf(), printf().

Introduction to C
C is a procedural programming language. It was initially developed by Dennis Ritchie
at Bell laboratories in the year 1972. It was mainly developed as a system programming language
to write an operating system. The main features of C language include low-level access to
memory, a simple set of keywords, and clean style, these features make C language suitable for
system programming like an operating system or compiler development.
Many later languages have borrowed syntax/features directly or indirectly from C
language. Like syntax of Java, PHP, JavaScript, and many other languages are mainly based
on C language. C++ is nearly a superset of C language

Structure of a C program
By structure, it is meant that any program can be written in this structure only. Writing
a C program in any other structure will hence lead to a Compilation Error.
The structure of a C program is as follows:
 Documentations (Documentation Section)
 Preprocessor Statements (Link Section)
 Global Declarations (Definition Section)
 The main() function
 Local Declarations
 Program Statements & Expressions
 User Defined Functions
The components of the above structure are:
Header Files Inclusion:
The first and foremost component is the inclusion of the Header files in a C program.
A header file is a file with extension .h which contains C function declarations and macro
definitions to be shared between several source files.
Some of C Header files:
stddef.h – Defines several useful types and macros. stdint.h –
Defines exact width integer types.
stdio.h – Defines core input and output functions
stdlib.h – Defines numeric conversion functions, pseudo-random network generator,
memory allocation
string.h – Defines string handling functions math.h – Defines
common mathematical functions Syntax to include a header file
in C:

#include
Main Method Declaration: The next part of a C program is to declare the main()
function. The syntax to declare the main function is:
Syntax to Declare main method: int main()
{
}
Variable Declaration:
The next part of any C program is the variable declaration. It refers to the variables that
are to be used in the function. Please note that in the C program, no variable can be used without
being declared. Also, in a C program, the variables are to be declared before any operation in
the function.
Example: int
main()
{
int a;
.
.
Body:
Body of a function in C program, refers to the operations that are performed in the
functions. It can be anything like manipulations, searching, sorting, printing, etc.
Example: int
main()
{
int a;

printf("%d", a);

Return Statement:
The last part in any C program is the return statement. The return statement refers to
the returning of the values from a function. This return statement and return value depend upon
the return type of the function. For example, if the return type is void, then there will be no
return statement. In any other case, there will be a return statement and the return value will be
of the type of the specified return type.
Example: int
main()
{
int a;
printf("%d", a);
return 0;
}
Writing first program:
Following is first program in C
#include <stdio.h> int
main(void)
{
printf("Computer Programming");
return 0;
}
Let us analyze the program line by line.
Line 1: [ #include <stdio.h> ]
In a C program, all lines that start with # are processed by preprocessor which is a
program invoked by the compiler. In a very basic term, preprocessor takes a C program and
produces another C program. The produced program has no lines starting with #, all such lines
are processed by the preprocessor. In the above example, preprocessor copies the preprocessed
code of stdio.h to our file. The .h files are called header files in C. These header files generally
contain declaration of functions. We need stdio.h for the function printf() used in the program.

Line 2 [ int main(void) ]


There must to be starting point from where execution of compiled C program begins. In
C, the execution typically begins with first line of main(). The void written in brackets indicates
that the main doesn’t take any parameter (See this for more details). main() can be written to
take parameters also. We will be covering that in future posts.
The int written before main indicates return type of main(). The value returned by main indicates
status of program termination. See this post for more details on return type.

Line 3 and 6: [ { and } ]


In C language, a pair of curly brackets define a scope and mainly used in functions and control
statements like if, else, loops. All functions must start and end with curly brackets.

Line 4 [ printf(“Computer Programming”); ] printf() is a standard library function to


print something on standard output. The semicolon at the end of printf indicates line termination.
In C, semicolon is always used to indicate end of statement.
Line 5 [ return 0; ] The return statement returns the value from main(). The returned value may
be used by operating system to know termination status of your program. The value 0 typically
means successful termination.

How to execute the above program?


In order to execute the above program, we need to have a compiler to compile and run
our programs.

DATA TYPES:
A data-type in C programming is a set of values and is determined to act on those values.
C provides various types of data-types which allow the programmer to select the appropriate
type for the variable to set its value.
The data-type in a programming language is the collection of data with values having
fixed meaning as well as characteristics. Some of them are an integer, floating point, character,
etc. Usually, programming languages specify the range values for given data-type.

C Data Types are used to:


 Identify the type of a variable when it declared.
 Identify the type of the return value of a function.
 Identify the type of a parameter expected by a function.
The built in or basic data types supported by C are integer, floating point and character.
Type Description
char A Single Character
int Small integer number
long int Large integer number
float Small real number
double Double precision real number
long double Long double precision real number

The exact sizes and ranges of values for the fundamental types are
implementation dependent.

The char Data Type


char data type represents a single character. For example, A is a character, and 7 is a
number. But a computer can only store numeric code. Therefore, characters such as A, a, B, b,
and so all have a unique numeric code that is used by computers to represent the characters.
We can set the data type of a variable to char by using the following declaration format:
char variablename;
A character enclosed in single quotes (`) is called a character constant. For instance, `A', `a',
`B', and `b' are all character constants.

The int Data Type


The int keyword is used to specify the type of a variable as an integer.
Integer numbers have no fractional part or decimal point.

The float Data Type


The floating-point number is another data type in the C language. Unlike an integer
number, a floating-point number contains a decimal point. For instance, 6.31 is a floating-point
number; so are 7.1 and -9.14. A floating-point number is also called a real number. A floating-
point number is specified by the
float keyword in the C language. We can use the floating-point format specifier (%f) to format
our output.

VARIABLES:
A variable is nothing but a name given to a storage area that our programs can
manipulate. Each variable in C has a specific type, which determines the size and layout of the
variable's memory; the range of values that can be stored within that memory; and the set of
operations that can be applied to the variable.
The name of a variable can be composed of letters, digits, and the underscore character.
It must begin with either a letter or an underscore. Upper and lowercase letters are distinct
because C is case-sensitive.
A variable definition tells the compiler where and how much storage to create for the
variable. A variable definition specifies a data type and contains a list of one or more variables
of that type as follows −
type variable_list;
Here, type must be a valid C data type including char, int, float, double, bool; and
variable list may consist of one or more identifier names separated by commas. Some valid
declarations are shown here −
int i, j, k;
char c, ch; float f,
salary; double d;
The line int i, j, k; declares and defines the variables i, j, and k; which instruct the
compiler to create variables named i, j and k of type int.
Variables can be initialized (assigned an initial value) in their declaration. The
initializer consists of an equal sign followed by a constant expression as follows −
type variable_name = value;
CONSTANTS:
Constants are like a variable, except that their value never changes during execution
once defined. C Constants is the most fundamental and essential part of the C programming
language. Constants in C are the fixed values that are used in a program, and its value remains
the same during the entire execution of the program.
Constants are also called literals. Constants can be any of the data types. It is
considered best practice to define constants using only upper-case names.
const type constant_name;
const keyword defines a constant in C.
Constants are categorized into two basic types, and each of these types has its
subtypes/categories. These are:
1. Numeric Constants
a. Integer Constants (eg: 15, -265, 0, 99818, +25, 045, 0X6)
b. Real Constants (eg: fractional parts like 99.25)
2. Character Constants
a. Single Character Constants (eg: 'X', '5', ';')
b. String Constants (eg: "Hello!", "2015", "2+1")
c. Backslash Character Constants (eg: \t is used to give a tab,
\n is used to give a new line)

OPERATORS:
C operators are symbols that are used to perform mathematical or logical manipulations.
The C programming language is rich with built-in operators. Operators take part in a program
for manipulating data and variables and form a part of the mathematical or logical expressions.
Generally, there are six type of operators:
i. Arithmetical operators,
ii. Relational operators,
iii. Logical operators,
iv. Assignment operators,
v. Conditional operators,
vi. sizeof operator.

Arithmetical operators
Arithmetic Operators are used to performing mathematical calculations like addition
(+), subtraction (-), multiplication (*), division (/) and modulus (%).
Operator Description
+ Addition
- Subtraction
* Multiplication
/ Division
% Modulus

Relational operators
Relational operators are used to comparing two quantities or values.

Operator Description
== Is equal to
!= Is not equal to
> Greater than
< Less than
>= Greater than or equal to
<= Less than or equal to

Logical operators
C provides three logical operators when we test more than one condition to make
decisions. These are: && (meaning logical AND), || (meaning logical OR) and ! (meaning
logical NOT).
Operator Description
&& And operator. It performs logical conjunction of two expressions.
(if both expressions evaluate to True, result is True. If either
expression evaluates to False, the result is False)
|| Or operator. It performs a logical disjunction on two expressions. (if
either or both expressions evaluate to True, the result is True)
! Not operator. It performs logical negation on an expression.

Assignment operators
Assignment operators applied to assign the result of an expression to a variable.
C has a collection of shorthand assignment operators.

Operator Description
= Assign
+= Increments then assign
-= Decrements then assign
*= Multiplies then assign
/= Divides then assign
%= Modulus then assign
Example:
Equivalent of A + = 2 is A = A + 2

Input/Output statements:
When we say Input, it means to feed some data into a program. An input can be given
in the form of a file or from the command line. C programming provides a set of built-in
functions to read the given input and feed it to the program as per requirement.
When we say Output, it means to display some data on screen, printer, or in any file. C
programming provides a set of built-in functions to output the data on the computer screen as
well as to save it in text or binary files. The two
input/output statements in C are:
i. printf() - We can use printf() function to output strings and numbers on screen as we
seen in previous examples.
ii. scanf() - The scanf() function is used to read data from keyboard and store it in
variable.

printf()
printf is a predefined function in "stdio.h" header file, by using this function, we can
print the data or user defined message on console or monitor. While working with printf(), it
can take any number of arguments but first argument must be within the double cotes (" ") and
every argument should separate with comma ( , ) Within the double cotes, whatever we pass,
it prints same, if any format specifies are there, then that copy the type of value. The scientific
name of the monitor is called console.

Syntax
printf("user defined message");
Example of printf function
int a=10; double d=13.4;
printf("%f%d",d,a);

scanf()
scanf() is a predefined function in "stdio.h" header file. It can be used to read the input value
from the keyword.

Syntax
scanf("format specifiers",&value1,&value2, .... );
Example of scanf function
int a; float b;
scanf("%d%f”, &a,&b);

In the above syntax format specifier is a special character in the C language used to specify
the data type of value.

Format specifier Type of value


%d Integer
%f Float
%lf Double
%c Single character
%s String
Lecture 8

 Control statements: if, if else – Loop: while, do while, for.

Control / Branching statements:


C provides two styles of flow control:
i. Branching
ii. Looping
Branching is deciding what actions to take and looping is deciding how many times to take a
certain action.

Branching:
Branching is so called because the program chooses to follow one branch or another.

if statement:
It is a powerful decision-making statement and is used to control the flow of execution
of statements. It is basically a two-way decision statement and is used in conjunction with an
expression. It takes the following form:

Syntax:
if (Text expression)
{
block of statements;
};

It allows the computer to evaluate the expression first and then, depending on whether
the value of the expression is ‘true’ (or non-zero) or ‘false’ (zero) , it transfer the control to a
particular statement. The if statement may be implemented in different forms depending on the
complexity of conditions to be tested. The different forms are:
a. Simple if statement
b. if …..else statement
a. if statement:

Example
#include<stdio.h>
#include<conio.h>

void main()
{
int a=10; if(a<=10)
{
printf("a is less than 10");
}
getch();
}
Output
a is less than 10
b. else if statement:
else is a keyword, by using this keyword we can create a alternative block for "if" part.
Using else is always optional i.e, it is recommended to use when we are having alternate block
of condition.
In any program among if and else only one block will be executed. When if condition
is false then else part will be executed, if part is executed then automatically else part will be
ignored.

Syntax
if (expression)
{
Block of statements;
}
else
{
Block of statements;
}
Example
#include<stdio.h>
#include<conio.h> void
main()
{
int time=10; clrscr();
if(time>12)
{
printf("Good morning");
}
else
{
printf("Good after noon");
}
getch();
}
Output
Good morning

Looping Statements
Looping statements are the statements which executes one or more statement
repeatedly several number of times. In C programming language there are three types of
loops; while, for and do-while.

Why use loop?


When you need to execute a block of code several number of times then you need to
use looping concept in C language.

Advantages with looping statement


 Reduce length of Code
 Take less memory space.
 Burden on the developer is reducing.
 Time-consuming process to execute the program is reduced.

Types of Loops:
There are three types of Loops available in 'C' programming language.
 while loop
 do..while
 for loop
Difference between conditional and looping statement
Conditional statement executes only once in the program where as looping statements
executes repeatedly several number of times.

While loop
In While Loop in C, first check the condition if condition is true then control goes
inside the loop body otherwise goes outside the body. While loop will be repeats in
clockwise direction.
Syntax
while(condition)
{
Statements;
......
Increment/decrements (++ or --);
}
Note: If while loop condition never false then loop becomes infinite loop.

Example:
#include<stdio.h>
#include<conio.h>

void main()
{
int i; clrscr(); i=1;
while(i<5)
{
printf("\n%d",i); i++;
}
getch();
}
Output
1
2
3
4
do-while
A do-while Loop in C is similar to a while loop, except that a do-while loop is execute
at least one time.
A do while loop is a control flow statement that executes a block of code at least once,
and then repeatedly executes the block, or not, depending on a given condition at the end of
the block (in while).

Syntax
do
{
Statements;
........
Increment/decrement (++ or --)
} while ( );
Example:
#include<stdio.h>
#include<conio.h>

void main()
{
int i; clrscr(); i=1;
do
{
printf("\n%d",i); i++;
}
while(i<5); getch();
}

Output
1
2
3
4
for loop
for is a statement which allows code to be repeatedly executed. For loop contains 3
parts Initialization, Condition and Increment or Decrements.

When you need to execute a block of code several number of times then you need to use
looping concept in C language. In C Programming Language for loop is a statement which
allows code to be repeatedly executed. It contains 3 parts. for loop in C language is used to
iterate the statements or a part of the program several times.

i. Initialization
ii. Condition
iii. Increment or Decrements

Syntax
for (initialization; condition; increment)
{
statement(s);
}
Initialization: This step is executed first and only once when we are entering into the loop first
time. This step is allowed to declare and initialize any loop control variables.

Condition: This is next step after initialization step, if it is true, the body of the loop is
executed, if it is false then the body of the loop does not execute and flow of control goes
outside of the for loop.

Increment or Decrements: After completion of Initialization and Condition steps loop body
code is executed and then Increment or Decrements steps is execute. This statement allows to
update any loop control variables.

Example:
#include<stdio.h>
#include<conio.h> void
main()
{
int i; clrscr();
for(i=1;i<5;i++)
{
printf("\n%d",i);
}
getch();
}
Output
1
2
3
4

You might also like