You are on page 1of 72

CHAPTER 1 ::: OVERVIEW OF COMPUTER SYSTEM

What is computer?
Computer is an electronic device that processes data accurately at a very high
speed. It takes input, processes it and produces desired output.

What is computing device?


Any machine, component or device that contains embedded specialized
computer is called computing device.
Examples: ATM machines, Cell phones, Digital watches etc…

Describe Basic operations of Computer.

A computer normally performs four basic operations:


1) Input Operation:
In this operation, the computer takes data from an input device.
2) Processing Operation:
In it, computer performs arithmetic and logical operations on the
input data.
Arithmetic operations include addition, subtraction, multiplication
and division. Logical Operations include comparison and decision
making.
3) Output Operation:
The result of processing operation is sent to some output device.
4) Storage Operation:
In this operation the data is stored in some storage device like hard
disk or flash drive etc…

Give important characteristics of computer:


1) Speed: Computer is one of the fastest machines. It performs trillion of
instructions in a second. It can solve complex problem/questions in seconds
while humans may take hours to solve them.
2) Accuracy: Computer is an accurate device. Computers always produce same
accurate results.
3) Productivity: Computer is used in education, business and entertainment. So it
enables us to do our work more efficiently.

1
Write advantages and disadvantages of computers in our life.
Advantages:
 Computers make us more productive in many of our jobs.
 Computers broaden ( ) our thinking.
 Computers help us in better understanding and fast learning.
 Computers help us in having better diagnosis ( ), proper treatment and better
health care.
 With computers, we can do things efficiently and accurately.
Disadvantages:
 Use of computers is resulting in unemployment ( ) due to automation.
 Much of youth waste their time and energy in useless activities.
 Data security and personal privacy leakage is also increasing.
 Computer crime like hacking etc is also an issue.
 Excessive ( ) use of computers results in health loss.

Describe uses of computer in daily life.


1) Education: Animated videos are made to explain different concepts of biology,
physics, chemistry and computer itself. Teachers can record a complete well
planned lecture and make it online. Students can see this lecture while sitting at
home.
2) Business: Banks and online shopping is possible with computer. Super markets
use computerized system to keep their sale record.
3) Offices: Offices use computers to make documents, type letters, notes and
question papers, and to keep sale records etc..
4) Entertainment: Computers are used to play computer games, listen to music and
watching movies etc…

What are the different classifications of computer? Explain.


Based on speed, size and cost; there are four classifications of computer.
1. Supercomputers:
 Supercomputers are the largest, fastest and the most expensive computers.
 Super computers are used to solve complex ( ) calculations.
 Supercomputers are used in space exploration , weather forecasting
aircraft design and nuclear researches.
 Supercomputers are used by large organizations and research laboratories. In
Pakistan, organization like Atomic Energy Research Centre use super
computers.
 Cray Inc. is most famous for making best super computers namely CRAY-1,
CRAY-2… IBM is also popular for manufacturing supercomputers.
2. Mainframe computers:
 Mainframes are larger, more expensive and powerful than mini or
microcomputers.
 Mainframes support multi-users. Thousands of users can work with
mainframes.

2
 Mainframes can execute trillion instructions per second, i.e. TIPS
 Mainframes are used by banks, airlines, mobile companies and universities.
 Examples: IBM’s zEnterprize EC12, EC196 and HP16500 Series.
3. Minicomputers
 Minicomputers are larger, more expensive and powerful than microcomputers.
 Minicomputers support multi-users. Hundred of users can work with
minicomputers.
 Minicomputers can execute billion instructions per second, i.e. BIPS
 Minicomputers are used in small business applications, scientific researches
and industrial process control.
 Examples: IBM system/360 and HP 3000.
 Due to technology advancement, the performance of minicomputers and
microcomputers is becoming same so microcomputers are replacing
minicomputers.
4. Microcomputers
 Microcomputers are the smallest and least expensive computers.
 Microcomputers are single-user so they are also called personal computers
(PCs).
 Microprocessors (VLSI) are used in Microcomputers.
 Microcomputer can execute million instructions per second, i.e. MIPS
 A microcomputer normally consists of a keyboard, mouse, monitor and system
unit.
 Microcomputers are used in homes, educational institutions ( ) and small
business.
 Examples: IBM PC, IBM Thinkpad, Dell XPS, HP Envy Series and Apple
Series, Toshiba Satellite Series.

Define following terms.


1) Mobile computing: Small portable devices allowing people to access ( ) data and
information from anywhere wirelessly is called mobile computing. Mobile computing
devices use batteries. Examples are tablets, PDAs (Personal digital assistants) and
smart-phones.
2) Internet of Things (IoT): IoT is the interconnection between computer network and
physical devices to collect and exchange data. Smart phone is an application of IoT. In
future, Iot will allow us to switch on AC before reaching home or switch off lights after
leaving home. IoT devices normally work wirelessly. IoT devices are called smart
devices.
3) Data centers: Data center is a central location that collects, stores, processes and
distributes vast amount of data. It consists of servers, switches and backup equipments.
It also requires air conditioning, fire suppression, smoke detection and security entry.
Banks, business and government organization, educational institutions use data centers.

What is cloud computing?


In cloud computing, we do not buy expensive computers and software, we only
use them as service provided by another company over internet. We can store,
manage and process our data using cloud computing. The services are
somewhere in the cloud (internet) and we simply use these services.

3
Advantages:
 We don’t have to buy and maintain a complex system.
 It is low cost.
 We don’t have to worry about the equipments ( ) going out-of-date

 We don’t have to worry about system reliability ( ) and security.


Disadvantage:
 It requires high speed and reliable internet connection.
 Since the data is stored somewhere else, there is risk in breach ( ) of
security and privacy ( ).

What is internet application security?


It means preventive measures against threats that can harm internet applications.
Hackers can steal ( ), modify and delete sensitive ( ) data. To ensure
security, server is monitored ( ) to block hackers. Internet application security
consists of firewalls, antivirus programs, spyware detection, encryption decryption
programs and removal programs.

What is computer hardware and software?


A computer system consists of Hardware and software:

1) Hardware:
All physical components of computer system are called hardware. It
includes Monitor, keyboard, Hard disks and circuits like power supply,
cables and mother board.
2) Software:
Software is a set of programs/instructions that performs some task
on computer. It tells the computer what to do and how to do.
Programming languages are used to prepare software. Games, operating
systems etc are example of computer software.

4
Differentiate between hardware and software.
 Software is set of instruction that tells computer what to do. Hardware is any
physical part of computer.
 Software is debugged in case of problem. Hardware is repaired in case of
problem
 Software is reinstalled if the problem is not solved. Hardware is replaced if
the problem is not solved.
 Software is expensive. Hardware is cheap.
 Software cannot be seen or touched. Output of software execution can be seen.
Hardware can be seen or touched.

Describe different types of computer software.


Computer software can be classified into following types.
1) System Software
2) Application Software
3) Internet Applications
4) Licensed software, Open source software, Shareware software and
Freeware
1) System Software:
System software manages system resources, i.e. it controls and
coordinates ( ) activities of computer. System software provides
platform/interface for application software to run. In other words,
system software acts as bridge between hardware and application
software. The computer hardware does not work properly without
system software

System software is further divided into following categories:


i) Operating System ii) Device Drivers
ii) Utility Software iv) Programming language
Translators
i. Operating System:
Operating System manages hardware and software resources of
computer system such as CPU, storage devices and all input/output
devices.
Examples of operating systems are Windows, Linux, Mac OS and
Android.
Operating System normally performs following task:
 Allocates system resources
 Providing User interface
 Controls operations of input and output devices
 Loads and executes application software
 Manage files by maintaining file and folder system
 Maintains security
5
 Control network operations
ii. Device Drivers:
Device drivers are used to run input and output devices (peripheral
devices). Every device has its own device driver that contains
instructions how that device will be used.
We have to install device drivers of devices like printer, scanner, digital
camera, network card etc… These devices do not work without
installation of device drivers.
Device drivers of common input devices like mouse and keyboard are
already installed in Operating System, so we do not manually
install device drivers of these devices. Such devices are called Plug and
Play device.
iii. Utility Software:
Utility programs provide facilities that are beyond the scope of operating
system. Examples of utility software are disk cleaner, antivirus utility,
network utilities, disk defragmenter, file compression utilities, file
manager, and utilities to configure hardware devices.
iv. Programming Language Translators:
Language Translators converts high level or assembly programs (source
program) into machine language 0 and 1 (object program).
Computer only understand machine language so programs written in
assembly language or high level language must be converted to machine
language. Different translators are available:
1) Assembler: It translates assembly language program into machine
language. Each computer has its own assembly language and this
language consist of short mnemonic codes.
2) Compiler: It translate entire high level program into
machine language before execution.
3) Interpreter: It converts high level program into machine language.
It translates one instruction at a time, executes ( ) that instruction
and then converts next instruction.

2) Application Software:
Application software helps users to carry out their routine tasks. These
software are used to fulfill ( ) requirements of users and helps us to
do our task in efficient ( ) way. Application software run on system
software.
Examples: Media players, photo editing software, games etc…
Application software is further divided into following categories:
i) Productivity Software ii) Business Software
ii) Entertainment software iv) Educational Software
6
i. Productivity Software:
Productivity software is used to improve the way people work. It speeds
up our daily routine ( ) tasks and increases our productivity .
Before productivity software, people used to do work manually on
papers and registers etc… Productivity software have shifted us from
manual paper work to computerized and automated computer tasks.
Examples: Word processing, spread sheet, database management, graphics
software
ii. Business Software:
Business software are used to run business activities. It helps in
efficiently running business functions of company.
Examples: Accounting, payrolls, inventory, retail and ATM software.
iii. Entertainment Software:
These software are used to entertain people. These software include
games, media players and graphics software etc. media players are used
to watch movies and listen to the songs.
iv. Educational Software:
Educational software are used for learning purposes. Animated videos
are made to explain different concepts of biology, physics, chemistry
and computer itself. Such animated videos are called video tutorials.
Similarly, software like typing tutor enables us to learn typing by using
that software. Drill software takes test from student on computer etc…
Differentiate between System software and Application software.
System Software Application Software
 System software are used to  Application software are used to
manage system resources. fulfill user requirements.
 System software provide platform  Application software provide
for application software to run. interface for user to perform desired
task.
 System software are general  Application software are specific
purpose software. purpose software.
 It executes all the time in computer.  It executes as and when required.
 The number of system software is  The number of application
less than application software. software is much more than system
software.
 System software are essential for a  Application software are not
computer to work. essential for a computer to work.

7
3) Internet Applications:
i. Web Application:
Web applications run on remote server. Users can use these applications
through a web browser.
Example: Email programs like Gmail and hotmail, online banking
service, instant messaging service.

ii. Cloud computing applications:


These application supports cloud computing. These applications are
stored on remote server. Web browser is used to access these
applications via web browser.
iii. Social Media and Networking Applications:
Social media is an Internet-based communication system. It allows
exchange ( ) of information, ideas, common interests ( ) and
expression. ( ).
Social media websites connect us with our friends, family and
colleagues ( ). Examples: Facebook, Twitter
and WhatsApp.
a. Facebook:
 Facebook is one of the fastest growing free social networking
services. It is used by millions of people.
 First we make an account on facebook by registering. It allows us
to create our profile, upload images and videos, post our thoughts,
exchange links and messages with friends on facebook.
 We can also create groups and pages where we can share our
thoughts on particular ( ) topics.
b. Twitter:
 Twitter is a free service that allows users to broadcast short
messages to other subscribers of the service. The short messages
known as "tweets" are restricted ( ) to 140 characters.
 It is like an online news service where people share their thoughts
and opinions ( ) on different topics and current affairs.
c. WhatsApp:
 WhatsApp is a free instant ( ) messaging service for smart-
phone users. We can exchange text ( ), photos, videos
and audio messages through Internet. It has become the largest
messaging service around the world.
 WhatsApp is very popular among teenagers because of features
like group chatting, voice messages and location sharing.
 It was started for Android mobile devices but now it is available
for iPhone, BlackBerry, Windows Phone and Nokia smartphone
also.

8
4) Licensed software, Open source software, Shareware software and
Freeware
a) Licensed Software:
 Software license is a legal ( ) agreement. It specifies ( ) terms
of use for that software. It defines rights ( ) of software developer
and the user.
 When we purchase ( ) software, we are only allowed to use that
software. We cannot resale and distribute ( ) that software to our
others. It means we are not the full owner of the software we have
purchased.
 When we do not follow terms-of-use ( ), we are charged
for violating ( ) copy right law.
 Example: Microsoft Windows and Microsoft office

What is Copy right Law?


Copyright law prevents ( ) illegal ( ) copying of computer
software. It allows creators of computer software to benefit financially
( ) from their software and to retain ( ) some control over
how it is used.

Why copyright law is necessary?


If the software is given away free, it makes it difficult for the software
creators to stay in business. This makes it improper ( ) to make
copies of software and sell it. Software that is copied and sold without
the permission of the owner is known as pirated ( ) software and it
is violation of copyright law.

b) Open Source Software:


 In open-source software, the source code is also given along with the
software.
 User can study the code and can change these codes according to their
needs or to improve it.
 In open source software, the owner holds some right and user have to
follow license-rules. Example: Linux operating system
c) Shareware software:
 Shareware programs are given free for trail purposes. Un-registered
versions are given for some period of time (30 to 60 days).
 Within that time people uses these software and test them. Once the
trail period is over, users are asked to pay money for further ( ) use.
 Some un-registered versions are given with limited functionality. They
don’t have time limit, but these versions do not have full features. To
get full features, users are asked to buy licensed software.
 Shareware can also be downloaded from internet like antivirus
software.
9
d) Freeware Software:
 These programs are given free of cost. We can use full version of the
software for unlimited period of time.
 However owner of the program holds some right over these programs.
And user must abide by the rules of license. (abide by :::
) (or User must follow the rules of license).
 Examples: Skype, Viber and Mozilla web browser.

What is firmware?
Firmware is an intermediate ( ) form between hardware and software. It
consists of software embedded ( ) in an electronic device.
Firmware is used when the programs are:
 Rarely ( ) changed
 Stored permanently ( ) even when power is off.
Examples: programs embedded in toys or appliances.

What are Input devices?


Input devices are used to enter data and instructions into the computer. Input
devices receive data and instructions from outside and send them to CPU.
Popular input devices are keyboard, mouse, scanner etc…

Write brief note on following:


Keyboard:
 Keyboard is primary input device. It is used to enter textual data and
instructions into the computer.
 Keyboard is connected with the system unit through a keyboard port.
When the key is pressed, a signal for that key (character) is generated.
This signal is passed to ROM of computer.
 There are two popular arrangements of keyboard:
1. QWERTY
2. DVORAK
 Standard arrangement of keyboard is QWERTY.
 Styles of keyboard:
The two styles of keyboard are:
 PC/XT style keyboard
 AT-style keyboard
AT-style keyboard has normally 101 keys.
 Divisions of keyboard:
A keyboard may be divided into four general areas:
1. Alpha Numeric keypad
2. Numeric Keypad
3. Function keypad
4. Screen navigation and Editing keys

10
Pointing Devices:
These devices are used to control the movement of pointer (cursor) on the
screen to select items or to open computer program/file.
Examples: Mouse, Trackball, Joystick, Touch screen, light pen and Touch
Pad.

Mouse:
Mouse is an input pointing device. It is used to select various options. It is
a small hand held unit with two or more buttons.
It has a ball or optical light at the bottom. When mouse is moved over a
surface pad, it moves a small object (often an arrow) across the screen.

In which ways mouse is easier to use than keyboard?


Mouse is much easier to use than the keyboard for the following
reasons/operations:
1. Picking: Selecting options from a list displayed on screen.
2. Pointing: Moving rapidly from one point to another on the screen
3. Drawing: Creating lines and other shapes on the screen.

Trackball:
Trackball is an input pointing device. It is like a mouse turned upside
down. It has a ball and buttons. The ball is stationary ( ).
The ball is used to control the arrow on screen. It is moved with the help of
palm or finger tips. The buttons are used to select the options. Trackball is
useful for handicapped persons because it does not require movement of
arm. It is also useful where there is less space like in train etc.

Joystick:
Joystick is an input pointing device. It has a moving stick and buttons. It
is normally used for playing games and in computer aided designs (CAD).
The stick in joystick is used to control the character (an arrow or hero of a
game) on the screen and buttons are used to firing guns, applying brakes
etc…
Joystick is popular among the kids because it moves the objects on the
screen at a high speed and accuracy.

Touch Screen:
Touch screen is both an input device and an output device. It is a display
screen. The screen is sensitive to pressure. The user interacts ( )
with the computer by touching screen and selecting desired options.
Touch screen is also used in mobiles, PDA (personal digital assistant) and
satellite navigators.

Light Pen:
A light pen is an input pointing device. It consists of photo cells at its tip.
Photo cell sense the position on display when the tip of the pen is held
against the screen.

11
It is mainly used in engineering for designing purpose. It gives more
accuracy than our fingers and touch screens.

Entering Data through special pen

Touch Pad:
Touch pad is an input pointing device. It is used in laptop computers. It
can sense the movement of finger on the pad. Two buttons are also located
above or below it. Touch pads are used as an alternative ( ) to mouse in
laptops.

Microphone:
Microphone is an input device. It converts sound into electrical
signals/waves. These signals are passed onto the soundcard that converts
these signals to digital form and the data is stored on computer.

Digital Camera:
Digital Camera capture pictures, converts them to digital form and save
them on memory devices. The images and videos can be edited using
editing software.
Digital cameras have an LCD for viewing images. So it is an input as well
as output device.

Scanner:
Scanner is an input device. It converts hardcopy to softcopy, i.e.it transfer
material present on a paper to the computer. The scanned material is stored
in the form of digital image.
There are different types of scanner like hand held scanner, flatbed
scanner and barcode reader.
1. Hand held scanner
This scanner is held in hand and moved over the material to be
scanned. Hand held scanner should be moved with uniform speed
because uneven hand speed produces distorted ( ) result.
Hand held scanners are very useful for scanning articles from
magazines, newspapers and books.

12
Hand Held Scanner
2. Flatbed Scanner
Scanner:
Flatbed scanner has a flat glass bed. The paper is placed face down
( ) on glass bed
bed. Top cover is lowered over it to stop light from
entering. The camera moves across the glass and converts material
into digital form.
3. Barcode Reader:
It is a type of scanner that scans barcodes also called UPC ((Universal
Product Code
Code).
UPC is series of black and white lines. It holds coded information
like name of the product, company, manufacturing date, expiry date
etc…
Barcode reader is passed over the UPC code. It reads the information
hidden in bar codes and sends it to the computer.

What is Optical Character recognition software?


The scanned material is stored in computer in the form of image. If we
want to change
ge its text, we first have to convert image it into text file.
OCR software converts the image into the text than can be edited (
). OCR can read standard typefaces. It can’t read smeared ( )
characters, bad handwriting and unusual ( ) typefaces.
In such cases, OCR substitutes ( ) it with a special character

Smeared characters
haracters Bad handwriting

Magnetic Stripe cards:


These cards have a magnetic stripe ( ).. The magnetic stripe store data in
the form of tiny magnetized and non-magnetized
magnetized particles ( ).
The information stored on magnetic stripe cards is read by swiping the card
in a magnetic read head.
Examples:: ATM cards, credit cards, driver’s license

13
Magnetic Stripe

Read head

What are Output Devices?


Output devices display results of computer processing. Output devices receive
processed data from the computer’s memory and present ( ) it in a human
readable form. Popular output devices are monitors, printers etc…
Output can be in the form of hardcopy or softcopy:
Softcopy:
The output displayed on screen, or the files saved on hard disk or CD is
called soft copy
2. Hardcopy:
The output printed on paper sheets like book, newspaper etc is called Hard
copy.

Write Note on Monitors:


Monitors are output devices. Monitors are also called video display unit
(VDU). Monitors display information on the screen. Monitors display softcopy
output.
Monitors are distinguished on following characteristics:
Size:
The size of the monitor is measured diagonally ( ). Standard sizes are
15 to 22 inches.
Color:
The monitor can be either black and white or colored.
Pixel:
Picture or text that appears on the screen is formed by tiny dots called
pixels or picture elements.
Resolution:
Number of pixels per square inch is called resolution. Greater the
number of pixels, greater will be resolution and better will be the
image quality
Dot pitch:
The distance between the pixels on the monitor is called dot pitch. The
lesser the dot pitch, more will be resolution of the monitor.

Different types of Monitors are available in market like CRT (cathode ray
tubes), LCD (Liquid Crystal Display) and LED (Light Emitting Diodes).

14
Write note on following:
Cathode Ray Tubes:
Cathode ray tubes are similar to old TV sets. In cathode ray tubes, the
screen is coated with phosphor. There is an electron gun behind the
screen.
For colored CRTs, there are three guns one for each color Red, Green
and Blue.
A beam ( ) of electrons is emitted ( ) from the electron gun. When the
beam hits the phosphor, it glows ( ) up and produces light in different
colors. The combination of colors forms image on the screen.
Liquid Crystal Display (LCD) Monitors:
LCD is a thin and light weight monitor. It contains liquid crystals
between two sheets. The crystals produce colors when current is applied
on them.
The molecules of these substances are lined in such a way that the light
behind the screen is blocked or allowed and image is created.
LCDs have following advantages over Monitors:
 LCDs provide a sharper image than CRTs.
 LCDs emit less radiation ( ).
 LCDs are lightweight, compact and portable
 LCDs are more reliable and easier on the eyes than CRT.

Light Emitting Diodes (LED) Monitors:


LED is a thin and light weight flat panel monitor. It uses LEDs as pixels
for display. LEDs are better than LCDs and CRTs in following areas:
 LEDs produce brighter images
 LEDs emit less radiation.
 LEDs run at lower temperatures and consume ( ) less power.
 Their lifespan ( ) is longer than other monitors.
However, one drawback is that LEDs are quite expensive.

What are Printers? Briefly explain its types.


Printer is an output device. Printers are used to produce hardcopy. Printer can
print both text and graphics. Printers are connected on parallel ports but now
printers are also connected on USB ports. There are two main types of printers.
1. Impact Printers
2. Non Impact Printers.
1. Impact Printers:
Impact printers print by striking the paper like typewriters. These
printers are slow in speed and produce noise while printing. Impact
printers are cheap. Their print quality is not much better.
Examples: Dot Matrix, Daisy Wheel printers and Chain printers

15
2. Non Impact Printers
Non-impact printers print without striking the paper. Non-impact
printers are fast and do not produce noise while printing. Non-impact
printers are expensive. Their print quality is better.
Examples: Ink jet printers and LASER printers

In what aspects printers vary (differ) from each other?


Computer printers differ in following aspects:
 Quality of Output
 Printing Speed
 Printing Type:
Some printers can only print text while others can print both text and
graphics
 Printing Quantity:
Character printers print one character at a time. Line printers print
one line at a time. Page printers print one page at a time.
 Technology:
Printers also differ based on the technology they use like dot matrix,
daisy wheel, inkjet and LASER printer.

Write Note on Following:


Dot Matrix Printer:
 Dot matrix printer is an impact printer. Dot Matrix printer prints by striking
pins against an inked ribbon. Each character is made of closely spaced dots.
 The speed of a dot matrix printer ranges from 50 to 600 characters per
second. A dot matrix printer has 9 to 24 pins. These printers can draw simple
drawing.
Daisy Wheel Printer:
 Daisy wheel printer is an impact printer. There are wheels in it. Characters
are attached at the end of wheels. The wheel rotates and brings desired
character in position.
 Daisy wheel printer has a limited font capability. Also it cannot draw images.
 Daisy wheel printer produces more noise than dot matrix printer.
 It produces better quality print than dot matrix printer.
Chain Printer:
Print characters are contained in a chain. The chain moves though two geared
pulleys. When the desired character reaches in position, the hammer strikes the
page. The impression of that character is produced on paper.

Ink Jet Printer:


Inkjet printers print by spraying ink on paper. These printers have nozzles and
cartridges. Cartridges have ink and nozzles spray the ink on paper.
These printers print good quality prints. It can also perform colored printing.
Speed of Ink jet printers is less than the LASER printers.
LASER Printer:
LASER printer uses LASER technology. Their technology is similar to
Photocopier machine. LASER printers are the fastest printer and silent in
operation. Their print quality is good.
Working of LASER printer:
16
First, the image is transferred to the printer. It activates a LASER beam.
The LASER beam makes a negatively charged image on a rotating drum.
Then the paper is passed between the drum and the positively charged
corona wire.
The drum draws ink from the toner and the image is transferred to the
paper. Then the paper is passed through the heated roller. Heated roller
fixes the image.
Note: LASER stands for Light Amplification by Stimulated Emission of Radiation

What is plotter? Explain its types.


Plotter is an output device. It uses pen to produce hardcopy. Plotter is normally
used to get prints of large drawings such as construction plan ( ) of buildings,
blue prints of complex machines like aircraft design etc…
It works on a principle of a human hand holding a pen and moving it on paper.
There are two types of plotter:
1) Flatbed or x-y plotter
2) Drum plotter
1. Flatbed plotter:
In flatbed/x-y plotter, the paper is spread and fixed on a flatbed. A set of
pens moves in both x and y directions to produce hardcopy.
Flatbed plotters are less expensive than drum plotters. These plotters are
fast but these plotters are normally used to draw simple drawing
2. Drum Plotter:
In drum plotter, the paper is not fixed. It is rolled on a drum. The paper
is fed on one side and drum rotates the paper to other side.
The drum moves in y-direction and a set of pens moves in x-direction to
produce hardcopy.
Drum plotters are slower than flat bed plotter. But drum plotters are
used to draw complex ( ) drawings.

What are speakers?


Speakers are audio output devices. These are attached to soundcard on
motherboard. Speakers produce softcopy output in the form of voice. They are
available in different shapes and sizes.

CHAPTER 2 ::: COMPUTER MEMORY


What is computer memory?
Computer memory (also known as computer storage) is a physical device in
which data and instructions are stored.
Data can be stored on a temporary ( ) or permanent ( ) basis.
Computer memory is divided into two main types:
 Main memory
 Secondary memory

17
Write note on main memory.
 Main memory is directly connected with CPU and communicates directly
with CPU.
 Main memory is also known as internal memory or primary memory.
 It is very fast memory.
 It has small capacity as compared to secondary memory.
 Main memory is expensive.
 Examples: RAM, ROM, Cache and Registers
 All main memories are made of semiconductor chips.

Write note on Secondary Memory.


 Secondary memory is not connected directly to the CPU. These memories
communicate with CPU via ( ) main memory
 Secondary memory is also known as backing storage, mass storage or external
memory.
 It is slow in speed than main memory.
 It has large storage capacity than main memory
 It is cheap.
 Examples: CDs, Floppy disks, Hard disks, USB flash drives etc.
 Secondary memories may use magnetic, optical or chip technology.

Draw block diagram of a computer with memory unit.

Write Note on RAM.


 RAM stands for Random Access Memory. It is a primary memory.
 RAM stores active programs i.e. it stores data and instructions currently in
execution.
 It is a temporary memory. When active program is closed, it is removed from
RAM.
 RAM plays major role in the processing speed of computer. Larger RAM size
provides larger processing speed.
 RAM is known as Read and Write memory because data can be read from
RAM as well as data can be written on RAM.
 RAM is a volatile memory because data stored in RAM is lost when the
computer is turned off.

18
 RAM has two main types:
1) Dynamic RAM (D-RAM)
2) Static RAM (S-RAM)

Explain D-RAM and S-RAM.


Dynamic RAM:
In DRAM, charges (data) stored on transistor are lost after a short period of
time even if the power remains on. It needs frequent ( ) data refreshing so
these devices are slow and consume more power. These devices are cheap.
Static RAM:
S-RAM uses large number of transistors so charges (data) are not lost as long
as the power is supplied. There is no need for refreshing the data. These
devices are fast and consume less power. These devices are expensive. S-RAM
is used as cache in computers.

Write note on ROM.


 ROM stands for Read Only Memory. ROM is a permanent memory. When the
computer is turned on, a program in ROM (BIOS) makes the computer ready for
use. ROM is a primary/main memory.
 ROM is known as Read only memory because data can only be read from
ROM. ROM is also known as non-volatile memory because data stored in
ROM is not lost when the computer is turned off.
 Data can be entered to some types of ROMS. The process of entering the data to
ROM Is called programming the ROM.
 ROM has three types:
1) PROM
2) EPROM
3) EEPROM

What is meant by programming the ROM?


The process of writing data in ROM is called programming the ROM.

Explain PROM, EPROM and EEPROM.


PROM stands for Programmable read only memory. It is initially blank and
can be programmed once by PROM programmers. Data once written on it
cannot be changed. PROM is used when there is no need to change data.
EPROM stands for Erasable Programmable Read only memory. Data in it can
be changed with the help of ultraviolet radiations. However, frequent data
changes degrade ( ) its performance.
EEPROM stands for Electrically Erasable Programmable Read only memory.
Data in it can be changed very easily with the help of electrical devices.
EEPROM is used when data has to be changed frequently. It works like
read/write memory and also holds volatile nature of ROMs and PROMS. It can
also be used as BIOS.

What is Cache memory?


 Cache is placed between RAM and CPU. It stores some active portion of main
memory (RAM)
19
Microprocessor

L1 & L2
Cache

L3
Cache

Main Memory
(RAM)
 CPU first look up in the cache memory for required data and if it is not
available in cache then it is fetched ( ) from RAM.
 Cache is used to increase the speed of computer.
 Cache is faster than RAM.
 Cache is quite smaller in size than RAM.
 It can be located inside CPU or outside the CPU. Most common forms of
Cache are L1 (level 1) cache, L2 cache and L3 cache.
 L1 and L2 cache are located inside CPU. L3 cache is located on motherboard
outside CPU.
 L1 cache is faster and smaller than L2 and L3 while L3 is larger and slower of
the three.

If cache memory is removed from computer, what will happen?


Computer will slow down if we remove cache. We use cache to increase speed of
computer. Cache holds currently executing instructions and provides data to CPU in
no time ( ), so if we do not use cache, data transfer takes long time and
computer becomes slow.

What are registers?


Registers are smallest and fastest memory areas. Registers are located inside CPU
and stores incoming data and results of CPU calculations.

Categorize memories on the basis of retention power.


Volatile memory:
In volatile memory the data is stored as long as the power remains on. When the
power is turned off, data stored in volatile memory is lost.
Examples: RAM, Cache and Registers.
Non-Volatile Memory:
In non-volatile memory, data is not lost even when the power is turned off.
Examples: ROM, PROM, Hard disk, USB flash driver and all other memories
are non-volatile.

20
Explain Sequential Access Memory and Direct Access Memory
Sequential access memory:
 Sequential access memories are not addressable.
 The data is stored and accessed in a sequence. Each time the computer
requires any record, it starts scanning form the first record.
 Sequential access memory is slow because access time for different
locations is different.
 Sequential access memory is also called Serial Access memory.
 Examples: Magnetic Tapes and Audio Video Tapes.
Direct access Memory:
 Direct access memories are addressable memories.
 Stored records have unique addresses so the data is stored and accessed
directly by their addresses.
 Random access memory is fast as access time for every location is same.
 Direct access memories are also called Random access memories.
 Examples: Hard disk, RAM, ROM, CDs, DVDs, Floppy drives and flash
drives.

What is memory Cell?


It is the smallest storage area on memory. Memory cell has two states ON and
OFF. On represents 1 and OFF represents 0. Memory devices contain millions
of memory cells.

Memory Terminologies:
Bit:
Bit is the basic and smallest unit of memory in digital computers. It
represents either 0 or 1.
Byte:
 A group of 8 bits is called bytes. Byte is generally used to express the
memory of the computer. A byte can store one character in computer
like ‘A’, ‘*’ etc…
 The higher units of bytes are Kilo bytes (KB), megabytes (MB) etc…
Memory Word and Word size:
 Memory word is a group of bits that can be processed by CPU at one
time. It is fixed size piece of data.
 The number of bits in word is called word size. Speed of processor is
measured by the word size. Greater word size means greater speed.
 Word size in modern computers ranges from 16 to 64 bits.

Relationship between memory units:


1 bit stores either 0 or 1.
1 Nibble = 22 bits = 4 bits
1 byte = 23 bits = 8 bits
1 Kilobyte (KB) = 210 bytes = 1024 bytes
1 Megabyte (MB) = 220 Bytes = 1024 KB
1 Gigabyte (GB) = 230 Bytes = 1024 MB
1 Terabyte (TB) = 240 Bytes = 1024 GB
1 Petabyte (PB) = 250 Bytes = 1024 TB
1 Exabyte (PB) = 260 Bytes = 1024 PB
21
Characteristics of Memory:
Access Mode:
Memories have two access modes: Sequential Access and Direct Access. In
sequential access, the data is stored and accessed in a sequence. Each time the
computer requires any record, it starts scanning form the first record.
In direct access, records have unique addresses so the data is stored and
accessed directly by their addresses.
Access Time:
It is a time taken to retrieve ( ) data from memory. Access time of
sequential access memory is more than the direct Access memory.
Data Transfer Rate:
It is time taken to transfer data from one memory device to another. For
example; time taken to transfer data from Hard disk to RAM
Capacity:
It is the amount of space that a memory device has to store data or the amount
of memory required for a program to run.
Cost:
It is the price that the computer users pay as per capacity of the memory device.

Categorize memory/storage devices based on the technology used to store


data/instructions
Memory/storage devices can be divided into three main categories depending
upon the technology used to store data/instructions:
1) Chip Memory
2) Magnetic Memory
3) Optical Disc
1) Chip Memory:
 Chip memories are made of Semiconductors (usually silicon)
 IC (integrated circuit) is embedded on semiconductors. IC contains
millions of transistors.
 Transistors act as memory cells. ON and OFF states of transistor store
data in the form of 1s and 0s.
 These are faster than Magnetic memory and Optical memory because
chip memories do not require any mechanical movement.
Examples: RAM, ROM, Cache, Register, Flash drives, memory cards
2) Magnetic Memory:
Magnetic memory uses magnetic technology to read and write binary
information. 0s or 1s are stored in the form of magnetized and non-
magnetized spots. These devices have read and write head to read and
write data.
There are three commonly used magnetic memories:
1) Hard disk (has metal disk coated with magnetic material)
2) Floppy disk (has plastic disk coated with magnetic material)
3) Magnetic Tape (has plastic tape coated with magnetic material)
Zip disk is also an example of magnetic memory.

22
3) Optical Discs:
Optical Disc uses light technology to read and write binary information.
These devices have hard plastic disc. LASER beam is used to write data
on plastic disc and LASER light is used to read data from that disc.
Working:
LASER beam makes pits and lands on shiny side of plastic.
Lands represent 1 and Pits represent 0.
When we want to read data, LASER light is thrown on the disk.
If the light strikes on land, it reflects straight back to the sensor
and is considered 1. If the light strikes on pits, it is scattered (
) and is considered 0.
Examples: CDs (Compact Discs), DVDs (Digital Video Discs) and
Blue Rays.

Write Note on Hard disk.


Hard disk is a secondary storage device. It uses magnetic technology to store data
for the desired time. It is a direct/random access storage device.
Hard disk is also known as Winchester disk. Storage capacity of hard disk is in
GBs and Terabytes.
Construction:
Hard disk is made up of metallic disks called platters. These platters are
attached on spindle. The disks are coated with magnetic material. Each disk
platter has its own read/write head.
Data can be written on both the surfaces of a platter. So, a hard disk with four
disk platters has eight recording surfaces and eight read/write heads.
Each disk platter contains concentric circles called tracks. A disk contains
thousands of tracks. Tracks are divided into fixed size sectors where data is
stored,

Working:
The disk spins with the help of a motor. All the disk platters spin at the same
time. The heads move over the spinning disks. The Write head puts

23
positive/negative charges on the disk. 1 is stored as Positive charge and 0 is
stored as negative charge.
Positively charged read heads move over the disk. The point where read head
senses repulsion is considered 1 and the point where read head senses attraction
is considered 0.

What is portable hard drive?


It is an external magnetic disk drive that is plugged into the
USB port on a computer. It is used as portable secondary or
backup storage device. It consists of one or more platters
which are air-sealed inside a casing. It is powered by USB
port.
Its storage capacity ranges from 500 GB to 4 TB. Newly
built drives use USB 3.0 technology that provides fast file
transfer rate. Some have built in wireless functionality.

Write note on Compact Disks.


 It is an optical disk used for storing digital data. It was developed for storing
playback of sound recording but now it is used for computer data storage.
 It is 1.2 millimeters thick and has 120 millimeters of diameter.
 It is made of polycarbonate plastic and weights 15 to 20 grams. Storage
capacity ranges from 350 MB to 800 MB.
 It consists of single spiral track.
CDs are popular for following usage:
 For distributing different software like device drivers, Windows
Operating system, games etc…
 Taking backups of important data
 Storing audio video files and using as cheap sales tool
Working of CD-ROM:
Data is recorded on CD-ROM surface in the form of pits and lands. Pits are
tiny bumps that have been burned in by a LASER beam. Lands are flat areas.
Land reflects the LASER light into the sensor and is read as 1. Pit scatters the
light and does not reflect it into the sensor. It is read as 0.

Write Note on Digital video Disks (DVDs)


DVD is similar to CD but has seven times larger data storage capacity. DVD
writer or player is used to read data stored on DVD. DVD players are
compatible can also play CDs.
Storage technique is same as that of CD. Data is stored in the form of pits and
lands. However these pits and lands are smaller in size so more pits/lands can
be made on the disk. Its storage capacity ranges from 2 GB to 16 GB. The
MPEG (Moving Picture Experts Group) format is used for writing movies on
DVDs.

Write Note on Blue Ray Disk (BD)


It has large storage capacity than CD and DVD about 300 GB. Pits and lands
on Blue ray are much smaller than that of DVDs and more closely (densely)
packed. This increases its storage capacity. BDs are better choice for storing
movies. BDs have special coating that prevents scratches and marks so it is
more durable than CD/DVD.
24
Write note on Magnetic Tape:
Magnetic tape is sequential access and slow in operation. Magnetic tapes are
used to store large amount of data up to 5TB. It is used with minicomputers
and mainframe computers as backup and archives
Magnetic tape consists of a plastic strip. Strip is coated with magnetic material.
Bits are recorded as magnetic spots on the tape along several tracks. 7 to 9 bits
are recorded simultaneously. Every track has its own read/write head. Magnetic
tape drive is used to read and write magnetic tape.

Write note on Flash Memory.


Flash memory is a type of EEPROM. It uses chip technology i.e. transistors to
store data. It is called Flash because it can store chunks of data and also erases
large chunk of data at a very high speed. Flash memories come in two forms.
 Flash drives
 Memory Cards
Flash Drives:
Flash drives are also called USB flash drives. They are small and
portable drives that are connected to computers through USB ports. The
storage capacity of flash memory ranges from 2GB to 256GB
Memory Cards:
Memory cards are used with laptop computers and other electronic
devices such as digital cameras, mobile phones and video games. They
come in various sizes and with different storage capacity.

List advantages of using Flash/chip memories:


 It allows fast read/write operations.
 It is non-volatile semiconductor memory.
 It is very light and very small in size
 It is very reliable
 Its operation is noiseless since it has no moving part.

CHAPTER 3 ::: CENTRAL PROCESSING UNIT

What is the Central processing Unit? Name different components of CPU.


The Central Processing Unit (CPU) is the brain of the computer. It controls the
entire ( ) computer system and executes the instructions given to it. The CPU
processes the data as instructed and sends the results to an output unit. A CPU chip
or microprocessor consists of following components:
1. Arithmetic and Logic Unit (ALU)\
2. Control Unit (CU)
3. Registers
4. Cache
5. Internal Buses

What is Arithmetic and logic unit (ALU)? Describe its working with an example.
ALU is the part of the computer where the actual processing takes place. It has
logical circuitry that performs arithmetic and logical operations on two binary
numbers.
25
The two binary numbers are stored in two registers: data buffer register and
accumulator. In the end the result is stored in the accumulator register. ALU is
further divided in two units:

1) Arithmetic Unit:
It performs operations such as addition, subtraction, multiplication and
division.
2) Logical Unit:
It performs relational comparison such as greater than and less than
operations and operations like AND, OR, NOT etc…

Working of ALU with an example:


Suppose we want to add two numbers 30 and 45. ALU will perform following
steps:
1) First number 30 will be stored in Accumulator register.
2) Second number 45 will be stored in data register.
3) Control unit will send the command to add the numbers through control
input.
4) Numbers will be added by arithmetic unit circuitry in ALU.
5) The result 75 will appear at the ALU output and stored in AC register.
6) Finally the result is transferred from AC to main memory (RAM).

What is Control Unit?


Control unit controls and coordinates ( ) the activities of entire
computer system. It controls the working of all the input and output devices,
primary and secondary storage devices and ALU.
The control unit performs three main functions. It
1) Fetches an instruction
2) Decodes that instruction
3) Executes that instruction
It consists of three main components:
1) Instruction Register: It stores the instruction that is being
executed.
2) Instruction Decoder: It decodes the instruction
3) Timing and control logic: It generates the signals to execute that
instruction.

26
What is Bus? Explain.
Bus is a set of parallel wires. It provides electrical pathways ( ). It is used
to transfer bits from one unit to another. The bits transferred may be the data,
instructions, addresses or control signals. Buses can be internal or external.
Internal Buses:
Internal Buses are located inside CPU. These buses connect registers, ALU and
CU and Cache with each other.
External Buses:
External Buses are present on mother board. These buses connect CPU to main
memory and input output (I/O) devices.
What is Bus width?
Bus width is the bits transfer capacity of a Bus. Bus with greater width can transfer
more bits at a time.
Explain types of Buses.
There are three types of Buses:
 Control Bus
 Address Bus
 Data Bus
1) Control Bus:
 Control bus is a bidirectional bus. The Information flows in both directions
 It transfers control information. Control information consists of the timing
and control signals.
 Some of the control lines are outputs from the microprocessor and other are
inputs to the microprocessor from I/O devices.
 It connects CPU to memory and input output devices.
 Control Bus widths ranges from 8 to 16 bits.
2) Address Bus:
 Address bus is unidirectional bus. The information flows in only one
direction.
 It transfers address information from CPU to main memory and I/O
devices.
 It connects CPU to memory and input output devices.
 Address bus width ranges from 16 to 32 bits. A system with 32-bit address
bus can carry 232 memory locations.
3) Data Bus:
 Data bus is bidirectional bus. The Information flows in both directions.
 It transfers actual data and instruction codes.
 Data can be sent from CPU to memory (write operation) or from the
memory to the CPU (Read operation).
 It connects CPU to memory and input/output devices.
 Data Bus width ranges from 32 to 64 bits.
27
What is an instruction cycle? Explain.
It is the basic operation cycle of computer to execute instructions. It consists of
three instruction cycle steps:
1) Fetch instruction/Operation
2) Decode Instruction/Operation
3) Execute Instruction/Operation

1) Fetch instruction/operation:
In this operation Control Unit fetches an instruction from main memory. The
instruction is fetched by performing following steps:
 Control unit sends an address to main memory through address from
where to fetch an instruction.
 It places Read command though control bus.
 The instruction is transferred from main memory to the Instruction
register.
2) Decode instruction/operation:
The instruction decoder decodes the instruction and determines what the
instruction is intended to do.
3) Execution instruction/operation:
The timing and control logic circuitry generate ( ) signals to execute the
instruction.

What is an instruction (instruction code)?


An instruction (also known as instruction code) is a group of bits that tells the
computer to perform a specific operation. An instruction has two fields:
1. Operation code (Op-code)
2. Operand or Operand Address

Operation code Operand or Operand Address

28
What is Instruction Format?
Instruction format is the layout and arrangement of the instruction. It consists of
two parts, an Op-Code and Operand.
Operation code specifies the type of operation to be performed. The operation
may be addition, subtraction or Move instruction or load instruction etc…
Operand is the data or memory address of data on which an operation is
performed.
Example:
Consider following instruction:

10010 00001111

The op-code 10010 is the code for add operation. The add operation is performed
on the data that is stored on address 0000111.
Describe common instruction formats.
Some common instruction formats are given below:
1. Zero Address Instruction 2. One-address instruction
3. Two Address Instruction
4) Zero Address Instruction:
This instruction does not have any address. It only has an op-code.

Op-code

Examples: STOP, HALT etc…


5) One Address Instruction:
This instruction has an op-code and one operand/address. These instructions
require one address to do its task.

Op-code Operand/Address

For example JMP instruction only requires one address to jump. LDA (load
accumulator) is also one address instruction.
Example:
JMP AX (Jump to the register AX)

JMP AX

6) Two Address Instruction:


This instruction has one op-code and two operands/addresses.

Op-Code Operand/Address Operand/Address

MOV (move) instruction and add instruction are its examples.


Example:
ADD A, B (Add the value stored in register A and B)

29
ADD A B

Explain types of instruction.


There are three general types of instructions used in computers:
1) Data Transfer instructions
2) Data Processing instructions
3) Program Control instruction
1) Data Transfer instructions:
These instructions transfer data from one location in computer to another
location. MOV, LOAD and STORE instructions are examples. Data is
transferred between:
 Registers and main memory
 Registers and I/O devices
 Register to registers
MOV:
MOV instruction transfers data from register to memory, memory to register,
and register to register. MOV is short for MOVE.
Example: MOV A, B (Move the contents of register A to B)
LD:
It loads particular register contents from memory. LD is short symbol for
LOAD.
Example: LD A (Load the data to register A from memory)
STO (STORE)
It stores information from register to memory location.
2) Data Processing Instructions:
These instructions perform arithmetic, logical and shift operations.
Arithmetic Instructions perform arithmetic operations. Examples are ADD
for addition, SUB (subtraction), MUL (multiplication) and DIV (Division)
instructions.
Logical Instructions perform logical operations like AND, OR, NOT etc…
Both arithmetic and logical instructions are performed on values of two
registers and result is also placed in a register.
Shift Instruction is used for shifting bits to the left or right of an operand.
3) Program control Instructions:
These instruction changes the order of execution ( ) of statements.
JMP instruction jumps to another location and starts execution from that point.
Loop instruction repeats statement(s) for a number of times.

Describe CISC and RISC architecture.


CISC stands for Complex Instruction Set Computer. It is traditional (old)
architecture. It uses large number of instructions. Instructions have different
length. It uses all addressing modes. It requires complex circuit to decode
instructions. CISC uses more cycles than RISC. Computers normally use CISC
processors. Examples of CISC processors are Intel 486 series and Pentium series.
RISC stands for Reduced Instruction Set Computer. It is new architecture. It uses
small set of instructions. Instructions in RISC have same sizes. It does not use
indirect addressing mode. RISC instructions and simple and execute very fast and
30
cheap. Smart phones and Tablets normally use RISC processors. Examples of
RISC processors are IBM PowerPC, Sun SPARC, mobile phones and tablets.

Describe Intel and AMD processors.


Intel and AMD (Advanced Micro Devices) are main manufacturers of processors.
They make processors for desktop computers, laptops, notebooks and mobile
devices. Pentium and Celeron processors are made by Intel while Phenom, Athlon
and Sempron processors are made by AMD.
Intel Pentium IV processors:
These have 20 steps execution process. They have high clock speed and
perform fewer operations per clock. Pentium processors generally use 478 pin
socket and Mega Hertz (MHz) for specifying speed.
AMD processors:
These have 10 steps execution process. They use 462 pin sockets. AMD
processors do not use Mega Hertz (MHz) for specifying speed.

Specifications Intel Pentium IV AMD Athlon


Clock Speed 1.7 to 3.0 GHz 1.4 to 2.33 GHz
Bus Width 32/64 Bits 32/64 Bits
Cache 256 KB to 1 MB 256/512 KB
Architecture CISC/RISC RISC

What is register? Explain different registers used in CPU.


Registers are smallest and fastest memory areas. Registers are located inside CPU
and stores incoming data and results of CPU calculations.
Registers have two main types: General purpose register and Special purpose
register.
1) General Purpose Register:
These registers store data as well as addresses. Their size ranges from 8 to 32
bits. Commonly used general purpose registers are:

i. Accumulator Register (AC) and Data Register (DR):


Accumulator register holds one of the operand during execution of
instruction. It also holds results after calculation. Accumulator register can
receive data from the memory (RAM) and can send the data to the memory.
Data register holds one of the operand during execution of the instruction.
Data register can only receive data from the memory but it cannot send the data
to the memory.

ii. Base Register (BR):


It holds a number that is added or subtracted from an address portion of
instruction. It is also called Index Register.

iii. Counter Register (CR):


It contains address of the instruction currently ( ) executing. Its value is
increased by 1 whenever a new instruction is fetched. If computer restarts or
reset, its value becomes 0.

31
2) Special Purpose Register:
These registers hold the state of program. These registers are used by Control
Unit to control the operations of CPU. Operating system also uses them to
control execution of programs.

i. Instruction Register (IR):


Instruction register holds instruction that is fetched from memory (RAM).
Instruction register is connected to instruction decoder circuit. Instruction
decoder circuit decodes the instructions. Then the timing and control logic
generates proper signals for the execution of instruction.

ii. Memory Address Register:


It stores address of the memory location from where a memory word is fetched
or where data is to be stored.

iii. Memory Buffer Register (MBR):


Memory buffer register acts as a buffer. It holds incoming data to CPU or
outgoing data to memory. Thus it increases speed.

iv. Program Counter (PC) register:


Program counter (PC) register indicates the address in the memory from which
the next byte of instruction code is to be fetched. It is a 16-bit counter register
that controls the sequence in which the instructions are fetched from the
memory. Contents of PC are loaded into MAR.
When an instructions address is used by CPU, the PC count is incremented and
the counter now points towards the address of next instruction.

CHAPTER 4 ::: INSIDE SYSTEM UNIT


What is System Unit?
System unit consist of computer casing and all the components installed in that
casing. System unit contains two main components:
1) Power Supply
2) Mother Board
Other Components like processor (CPU), RAM, Hard disk, DVD writer are
attached to mother board directly or by wire etc…

What is Computer Casing?


Computer casing is the box. It encloses most of components of computer like
mother board, power supply, DVD writer etc…
Casing can be Tower casing or Desktop casing. Tower casing is most commonly
used. Desktop casing is normally placed on desk and monitor is kept over it.

What is power supply?


It converts alternating current (AC) to low-voltage direct current (DC). It is
already fixed in the casing when it is purchased.

What is motherboard?
It is also known as main board or system board. It is a circuit board that connects
all the components of computer through ports, cables or expansion slots.
32
Peripheral Devices:
All the devices that are attached to the computer motherboard are called peripheral
devices. Devices like RAM, ROM, mouse, keyboard monitor are called peripheral
devices.

Describe components/Parts of Motherboard.


CPU Socket: It is used to mount (connect) CPU or processor on motherboard. It
forms electrical interface and contact with CPU.
BIOS: It stands for Basic Input and Output System. It is a non-volatile ROM chip.
It is a firmware whose programming is done by manufacturer. BIOS have two
purposes:
1) When the computer is turned on, it initializes devices such as keyboard, mouse,
hard disk etc… It then loads operating system from hard disk to RAM and makes
computer ready for use.
2) It controls basic input/output operations of the peripheral devices.
It also has a setup utility to set password, set clock, select boot device, enable or
disable computer components and to configure computer hardware.
Ports: (Discussed in next question)

Memory Slots: With the help of memory slots, RAM is connected with CPU.
RAM card is attached on these slots. RAM card is a circuit board that has series of
RAM chips. Generally there are two memory slots available on motherboard.

Disk Controller: Disk controllers control disk drives like hard disk, CDs and
Floppy disks. Disk controller helps in communication between CPU and disk
drives. Nowadays Disk controllers are integrated ( ) into disk drive itself
such as EIDE and SATA hard disks.

Cooling System: It maintains proper temperature inside system unit. Components


inside system unit produce heat when computer is on so the temperature rises. If
temperature crosses limit, it can damage system parts. A fan is fixed on the top of
CPU to cool it. Heat sinks are also used that absorb ( ) heat. Some computers
automatically turned themselves off if temperature crosses limit.

Expansion Slots: Expansion slots are long narrow ( ) sockets on


motherboard. Expansion cards are attached on it to add new capabilities ( ).
Different expansion slots are available that can attach different cards like sound
cards, video graphics cards, network cards etc… Expansion slots come in different
standards like AGP, PCI and PCI express.

AGP: AGP stands for Accelerated Graphics Port. Video cards are attached on it. It
provides high speed and dedicated path-way between CPU and Graphics card. Its
bus width is 32 bits.

33
PCI: PCI stands for Peripheral Component Interface. Different cards can be
attached on it like sound card, network card or modem card etc… It is still in use
but now it is replaced by PCI express.

PCI express: PCI express is a latest ( ) standard that is designed to replace PCI
and AGP standards. It has a bus width of 32 bits. It is used in micro and laptop
computers. It provides high speed serial communication.

Ribbon Cables: This cable has several parallel wires in a flat plane. It looks like a
piece of ribbon that’s why it is called ribbon cable. It transfers bits from floppy
drive, hard drive and CD-Rom drive. Following are different types of ribbon cable
interfaces:
1) IDE interface and cable:
IDE interface is used to attach hard disk drives and CD-Rom to
motherboard while IDE interface cable transfers bits from hard disk/CD-
Rom to motherboard. In IDE interface, disk controller is integrated into disk
drive itself.
IDE stands for Integrated Drive Electronics. It was developed by Western
Digital. Compaq PCs used IDE interface hard drive for the first time. In
1994 Western Digital introduces Enhanced IDE named as EIDE.
2) SATA Interface and Cable:
SATA stands for Serial Advanced Technology Attachment. SATA interface
is used to attach hard drives and CD-Rom to mother board while SATA
interface cable transfers bits from hard disk/CD-Rom to motherboard. It is a
newer interface and has replaced EIDE. It is used with laptops and desktop
computers.
SATA interface provides faster and more efficient data transfer rate. Its
cable is also small in size and cost. SATA 1, SATA 2 and SATA 3 interfaces
provide communication rates of 1.5GB/Sec, 3 GB/Sec and 6 GB/sec.

What is port? Explain its types.


Port: Port is an interface or socket that connects external input and output devices
to computer. Ports are normally located at the back of the casing.
Following are common types of ports:
1) Serial Ports:
Serial port transfer one bit at a time. Serial ports have 9-pins or 25-pins. Serial
ports are used to connect serial (slow) devices. Serial ports provide slow
transfer rate. Serial ports are named as COM ports (COM 1, COM 2 and COM
3). Serial ports are now replaced by USB ports.

2) Parallel Ports:
Parallel ports transfer 8 or 25 bits at a time. Parallel ports are used to connect
parallel (fast) devices. Parallel ports provide fast transfer rate. Parallel ports
are named as LPT ports (LPT 1, LPT 2, and LPT 3). Parallel ports have 25
pins. 8 pins carry 1 byte of data and 17 pins carry control signals.
3) PS/2 ports:
PS/2 stands IBM’s personal System 2 micro computer. It was used to connect
keyboard and mouse. It is a round shaped serial port.

34
4) USB ports:
USB stands for Universal Serial Bus. It provides fast serial transmission. It is
used in modern computers. It can connect up to 127 different devices like
mouse, keyboard, printer, scanner, digital camera etc… It is a plug and play
port. It automatically detects and determines what type of device is attached to
the computer.

5) Fire Wire Port:


It is a rectangular shaped port and connects video devices such as camcorder to
the computer. It has 4 or 6 pins. In a 6 pin connector, extra 2 pins are used to
provide electric power. Laptop computers have 4 pin ports because laptops do
not provide electric power facility.

6) HDMI port:
It stands for High Definition Multimedia Interface. It provides audio-video
interface and transmits high quality audio-video data in digital form through a
single cable. All modern computers, laptops, TVs, digital cameras, set-top
boxes, DVR, disk players have at least one HDMI port.

What is expansion card? Explain its types.


Expansion card is a printed circuit board that is attached on expansion slots. It is
also known as add-on card, interface card or simply card. It gives new ability to
computer. Four types of expansion cards are commonly used in computers.
1. Sound Card:
Sound card provides an interface for attaching speakers and microphones.
Sound card performs two main functions.
 It receives analog voice input from microphone in the form of electrical
pulses and converts them to digital signals. These signals are stored in
computer.
 It converts digital signals back to electrical signals. These signals are sent to
the speaker. The speaker converts them into analog voice output.
Without sound card we cannot play DVDs, CDs and multimedia applications.
Sound cards can be attached on expansion slot as well as integrated on
motherboard.

2. Video Graphic Card


Video Graphics Card provides an interface for attaching Monitors. These
convert digital data into electrical signals to display text, graphics and images
on screen.
Nowadays, graphics card are integrated on mother board. Such graphic cards
are called integrated graphics or on board graphics.
External graphic cards can also be attached on AGP, PCI or PCI express slots.
These improve visuals while playing games. 3D graphic cards have their own
memory from 256 to 1 GB. Some computer-games require special high
performance 3d cards.

3. Modem Card
A Modem is a communication device. It allows computer to connect with
other computers via telephone line or some other line. Modem stands for
35
Modulator DEModulator. Modem cards can be attached on expansion slot as
well as integrated on motherboard. There are three types of modems:
 Dial-up Modem: It uses telephone lines. Its transmission speed is very
slow i.e. up to 56 Kbps (Kilo bits per second). But it provides internet
connection from any location in the world and is quite cheap.
 ISDN Modem: These Modems are used with ISDN (Integrated Service
Digital Network) connections. These are called integrated because it
combines voice and data services in one wire. It also uses phone lines. Its
speed is up to 128 Kbps.
 DSL (Digital Subscriber Line) Modem: These modems are used with DSL
connections. DSL modems are advanced and provide fast internet speed
depending upon Internet Service Provider (ISP). Dial-up modems and ISDN
modems are now replaced by DSL modems. It also uses phone lines.
However it is expensive than dial-up and DSL modems.

4. Network Interface Card (NIC):


NIC is also known as network card or LAN card. It provides networking
facility both LAN and WAN. It allows computers to connect with each other.
Connection can be wired or wireless.
NIC cards can be attached on expansion slot as well as integrated on
motherboard. Following are some commonly used network cards:
 10/100 Ethernet Cards: These cards are used in home and small offices.
Its transmission speed is 10 to 100 Mbps. These are attached to PCI or
PCIE slots.
 Gigabit Card: These cards have transmission speed up to 1 Gbps (Giga
bits per second). These cards are attached on PCIE slots.
 Wireless Network Card: These cards are used for wireless networking.
They have an antenna and do not require wire for connection. Their speed is
normally less than wired cards. These cards are attached to PCIE slots or
USB port.

Memory Chips:
Memory chips are classified into four categories.
1. SIMM:
SIMM stands for Single Inline Memory Module. SIMM have contacts, the
bunch of memory chips, on one side only. It uses 32 bit bus. Their
storage capacity is from 256 KB up to 32 MB. SIMM was used in 80s and 90s
and replaced by DIMM.

2. DIMM:
DIMM stands for Dual Inline Memory Module. DIMM have contacts, the
bunch of memory chips, on both sides so it has more storage capacity than
SIMM from 64 MB to 512 MB. It uses 64 bit bus so its data transfer speed is
higher than SIMM.

36
3. SDRAM:
SDRAM stands for Synchronous Dynamic Random Access Memory. It is an
improvement over DRAM. It retrieves ( ) data alternatively between two
sets of memory. It eliminates ( ) delays that DRAM had i.e. the delay
caused when one bank of memory addresses is shut down while another is
prepared for reading. It is called Synchronous DRAM because the memory is
synchronized ( ) with the clock speed of CPU bus. Faster the bus speed,
the faster will be the SDRAM.

4. DDR SDRAM:
DDR SDRAM stands for Double Data Rate SDRAM. It is synchronous DRAM
but has improved memory clock speed as compared to SDRAM. It reads or
writes 2 words per clock cycle. DDR 2 and DDR 3 are also available. DDR 2
can read/write 4 words per clock cycle where as DDR 3 read/write 8 words per
cycle.

CHAPTER 5 ::: NETWORK COMMUNICATION AND


PROTOCOLS

What is a computer network? Explain.


Computer network is an interconnection of two or more computers for
communication ( ) with each other. It is also called information network.
With it, we can share information and resources (hardware and software) like
printers, hard disks, scanners etc…
Computer Networks can be wired (telephone lines, copper wire, Fiber optics) or
wireless (microwaves and communication satellites).
Examples of computer network
Computer network can be used in student lab to access common information
and resources.
Internet is also an example of computer network in which millions of
computers are connected.

What is network/Data communication? Describe its basic components.


Network/Data communication is a process of transferring data electronically
from one place to another. Network communication consists of five basic
components.
1. Sender:
The device that sends the information over network is called Sender or
Transmitter. It is the source of information. It may be a computer, cell phone,
camera or workstation. The sender first converts electrical signals into the form
that is suitable for transmission over network.
2. Message:
It is the data or information that is to be transmitted. Message can be text,
audio, video or combination of these.

37
3. Medium:
It is the path through which message is carried from source to destination.
Medium can be wired (telephone lines, copper wire, Fiber optics) or wireless
(Bluetooth, microwave, WI-FI, radio wave and satellite)
4. Receiver
The computer or electronic device, which receives the message is called
receiver. It is the destination of information. It may be a computer, cell phone,
camera or workstation. The message received is first converted into the form
readable by receiving device.
5. Protocol:
It is a set of rules that governs data communication. It represents an
agreement between communicating devices. Without a protocol, two devices
are connected but cannot communicate with each other.

Describe modes of data communication.


The method or the ways in which data is transmitted from sender to receiver is
called data communication mode. There are two modes of transmission:
1. Simplex, Half Duplex and Full Duplex modes
2. Asynchronous and Synchronous Modes of Transmission

Describe Simplex, Half Duplex and Full duplex mode.

Simplex Mode:
In this type of mode, data can be sent only in one direction. It is uni-
directional. One device acts as sender and the other device acts as receiver.
TV remote is an example of Simplex mode where Remote acts as sender and
TV acts as receiver and receives commands from Remote Control.
Radio and Television broad casting are other examples of Simplex Mode.
Transmission of information from a computer to printer is also in one
direction. Electronic notice boards in train stations and Airports are also its
example.

Half Duplex Mode:


In half duplex mode, data can be sent in both directions but not
simultaneously. Both devices can act as sender and receiver but at one time,
only one device is sender and other is receiver.
A common example is the use of walkie-talkies. Where only one person can
speak at a time and other person will wait for his turn ( ).
Transaction oriented systems like ATM terminals and credit card terminals
also work in half duplex mode.

38
Case 1:

Case 2:

Full Duplex Mode (Also known as Duplex Mode):


In this mode, data can be sent in both directions simultaneously ( ). Both
devices can act as sender and receiver at the same time. It is the fastest bi-
directional data communication mode.
Telephone and cell phone systems are full duplex where both people can talk
at same time. Computer networking is also an example of full duplex mode.

Descibe Asynchronous and Synchronous Transmission.


Asynchronous Transmission
In asynchronous transmission data is transmitted byte by byte (character by
character). The time interval (gap) between two characters is not fixed but the
time interval between bits within a byte is fixed.
It uses start/stop bits so it is also called start/stop transmission. A start bit has
value 0 and indicates that a character is to be transmitted. If the start bit has
value 1, it indicates that the line is idle ( ).
It is best for slow speed communication where different gap sizes occur during
transmission.
Figure:

Synchronous Transmission
In synchronous transmission, the data is transmitted in blocks. Each block may
consist of many characters. In this transmission the time interval (gap) between
two characters is always exactly the same.
It does not use start/stop bits. It uses a clock to control the timing of sent
blocks.

39
A large amount of information can be transmitted at a single time. Synchronous
transmission is much faster than asynchronous transmission because start/stop
bits are not used and only data is sent.

What is node?
Any device that is connected to a network is called node. A node may be a
computer, printer, keyboard, scanner, a video terminal, switch or router etc…

What is Communication Media? Describe main categories of communication


media.
Communication media is the link that provides the path for communicating
devices. The data travels through this path from sender to receiver. There are two
main categories of communication media.
1) Guided Communication Media
2) Unguided Communication Media

What is Guided Communication Media? Explain different guided media.


In guided communication media there is a physical path between two nodes. It
uses cables that guide data signals along a specific ( ) path. It is also called
physical or bounded communication media. Following are some important guided
media:
 Telephone Cable
 Twisted Pair Cable
 Coaxial Cable
 Fibre Optic Cable

Telephone Cable:
Telephone lines are the most common and widely ( ) used data
communication media. These are cheaper as the telephone lines have already
been placed. Telephone lines provide communication media to almost every
part of the world. However, telephone line is slow as compared to other
communication devices so its use is declining ( ). Telephone lines are
mostly made of copper.

Coaxial Cable:
Coaxial cables are used long distance transmission. It transmission speed is
higher than telephone lines about (10 Mbps to 100 Mbps).

40
It is made up of a central copper wire that is covered by plastic cladding,
metallic shield and plastic jacket. These are laid underground or on the ocean
bed.
Coaxial cables provide high quality data transmission without loss of signal or
distortion. A large cable can handle hundreds of thousands of telephone calls at
the same time.

Twisted Pair cables:


These cables are twisted ( ) together in pairs. The
twisting helps to reduce interference. Some of these cables are also shielded
and called Shielded twisted pair cable (STP). Some are not shielded and
called Unshielded Twisted Pair Cable (UTP).

Fibre Optic Cable:


Fibre optic cable consists of smooth hair-thin strands of a transparent
material. It carries signals in the form of light waves.

It is small in size and lightweight and provides faster communication. It is not


affected by electromagnetic waves so noise and distortion are also reduced. It is
a new technology that is replacing conventional ( ) cables.

What is Unguided Communication Media? Explain different unguided media.


In unguided communication media, there is no physical path. The transmission
takes place through open air. They are not guided through any specific path. It is
also called unbound media. Common unguided media are:
 Microwave Transmission
 Communication Satellites
Microwave Transmission:

Microwave transmission signals travel through open space like radio signals.
Microwave systems consist of transmitters which are normally installed on
high buildings, mountain tops or high towers.

41
Long distance microwave channels consist of a series of relay stations
(boosters) spaced approximately 30 miles apart. Signals are amplified at every
station. Microwave uses line of sight transmission because the signals cannot
bend and travel in straight line. So the two stations must be within sight ( ) of
one another. They provide a much faster transmission rate than telephone lines
or coaxial cables.

Communication Satellites:

Communication satellites are positioned in space approximately 22,000 miles


above the earth. These satellites serve as relay stations. Satellites receive
microwave signals from earth stations. The satellites amplify the signals and
send them to the desired earth station.
Communication satellites are ideal for long distance communication. These
allow large amount of data to be sent over long distances. But it is very costly
to place the satellites in its orbit. Satellites are launched by rockets or by space
shuttles.
Communication satellites are called geo-stationary satellites because they orbit
with the same speed as rotation speed of Earth. So they remain stationary (
) with respect to the Earth.

What are communication devices? Explain different communication devices.


The devices that are used in telecommunication system for transmitting data from
one location to another are called communication devices. Common used devices
are switches, routers and gateways.
Hub:
Hub connects computer in LAN. It is a non-intelligent device i.e. it forwards data
to all the devices on the network.
Hub consists of a box with multiple input and output ports.

Switches:
Switch connects computer in LAN. Switch is more intelligent device as
compared to hub. When switch receives data packets, it determines the source
and destination address and forward the packet to intended device only.
Like Hub, switch consists of a box having multiple input and output ports.

Router:
It connects two or more networks. Since internet is a connection of multiple
networks so routers are used in internet. When router receives the data packets,
it looks to the remote computer address and forwards to the computer/router
closer to the remote computer. It selects the best path-way based on network
42
traffic. Many routers take part ( ) in transmitting data packets from source to
destination.

Gateway:
It connects one network to another network that uses different protocols. For
Example if we connect a network of IBM mainframe computers with the
network of PCs, we might use a gateway. Gateways change the formatting ( )
of data packets according to the receiving network format.

What are server computers and client computers?


Server computers control whole network. Servers are used to process the
requests of client. Server computers share resources like hard disk, software and
printer etc… for other computers to use. These are fast and powerful computers.
Client computers send requests to servers. Client computers use the resources
shared by server computers. They are less fast and less powerful computers than
server computers.

What is network architecture? Explain types of network architecture.


It is the design of communication system. It includes devices such as routers and
switches, cables, network topology, physical and wireless connection. There are
two commonly used network architectures:
1. Dedicated Server networks:
In dedicated server networks, one or more computers act as fixed servers and
other computers act as clients. The servers in this type are called dedicated
servers. The servers cannot be used as clients. All the requests of clients are
processed by the servers.

These servers provide centralized data processing. In this network, one


computer/person/group normally acts as administrator. So securities and other
administrative policies can be applied in this type of network.
These networks are expensive and require expertise to set them up. These
networks are fast.
2. Peer to Peer Network:
All computers in Peer-to-peer networks have same status. There is no fixed
server computer to control other computers. Each computer has its own software
and information. Every computer in it can become server or client. Every
computer on this network is called a peer.
Peer to peer networks are easy to setup and cheap. These networks are suitable
for small offices of ten or less computer. However these networks are slow.

43
Explain types of computer Network.
Based on size and coverage area, computer networks are divided into following
types.
1. Local Area Networks (LAN):
LAN connects computers within a building or a group of nearby ( ) buildings.
For example network of computers in college lab is local area network. It is used
to share printers, hard disks and applications and project tracking etc...

Characteristics:
 It covers (spans ) limited physical area, building or group of nearby
buildings.
 It connects computer at single place.
 It consists of limited number of computers.
 Its communication speed is fast. It uses high speed wired/wireless connections
like coaxial cables etc…
 It is a very reliable and error free network.
 The connection in LAN is permanent.
2. Metropolitan Area Network (MAN):
MAN connects computer within an entire city. It spreads over several buildings
and connects multiple LANs within a city.
Characteristics:
 It is larger than LAN and smaller than a WAN. It covers an area of 5 to 50 km.
 It uses fiber optic cable or microwave transmission.
 It provides high speed communication.
 It is used by telephone companies, cable TV companies and Internet service
providers.

3. Wide Area Networks (WAN):


WAN connects computer anywhere in the world across cities, countries and
continents. Internet is one of its examples.
Characteristics:
 It covers large physical area; cities, countries and continents.
 It connects computer anywhere in the world.
 It connects multiple LANs.
 It consists of unlimited number of computers.
 Its communication speed is slower than LANs. It uses telephone lines, fiber
optics and satellites, leased lines and public networks.
44
 Errors may occur in WANs.
 The connection in WAN is not permanent.

4. Virtual Private Network:


This network is private and owned by single organization. Physically, this
network may spread in a city or all around the world, but only the employees (
) of that organization can use this network. Employees can access this
network sitting in their home or from some remote ( ) office in another
country/city.
Characteristics:
 It uses public networks such as internet to connect computers.
 It provides secure remote access.
 It provides cheap communication over long distances.
 It enables file sharing, video conferencing and similar network services.

What is network topology? Explain different network topologies.


The physical arrangement (or map of the layout) of the nodes and the connection
between them is called the network topology. Most popular network topologies are:
1. Bus topology
2. Star topology
3. Ring topology
4. Mesh topology
1. Bus topology:
All network nodes are connected to a common piece of cable called Bus. Data
among nodes is transferred through the bus.

Features
 It is simple and easy to use.
 It suitable for small networks.
 It is cheap.
 It requires small length of cable.
 At each end of the bus, there are terminators that absorb signals. The signals
do not reflect back and this prevent errors. Terminators are attached to the
ground.
Limitations:
 If central cable (bus) fails, whole network goes down.
 It is not suitable for large networks.
 Difficult to identify the problems.
Working:
The sender computer places data and destination address on the bus. The data and
address reaches to all computers via bus. Each computer checks the address. If the

45
address matches with its own address, the computer keeps the data otherwise it
discards ( ) it.

2. Star Topology:
All network nodes are connected to a central device called hub. Larger networks
may require many hubs. In this case hubs are connected with each other to join all
the nodes into a single large network.

Features:
 It is suitable for both small and large networks.
 It is easy to install and wire.
 Faults are easily detected and removed.
 Failure of one cable or computer does not affect whole network.

Limitations:
 If central hub fails, entire network goes down.
 It requires large length of cables as compared to bus topology.
 It is more expensive.
Working:
The sending computer sends data and destination address to the hub. The hub
sends data to the receiving computer. All communication is carried via hub.

3. Ring Topology:
Each node is connected to the next node and the last node is connected to the first
one. So, it forms a ring or circle of nodes. Data flows in one direction.
Features:
 Each node is directly connected to the ring.
 It is easy to install and wire.
 Data flows in one direction.
 It is less expensive.
Limitations:
 If the ring is broken or any one computer fails, whole network goes down.
 Slower than other topologies.

Working:
Data and address moves from computer to computer. Each computer checks the
address. If the address matches with its own address, the computer keeps the data
otherwise the data moves to the next computer.

46
4. Mesh Topology:
Each node is directly connected to all the other nodes in the network.

Features:
 It is most reliable network.
 It manages high data traffic.
 Different paths are available for the data in case any direct link is broken.
Limitations:
 It is most expensive topology to implement.
 Its installation (setup) and maintenance ( ) is very difficult.
Working:
Since all computers are directly connected, so the data is directly sent to the other
computer. In case the direct link is damaged or broken, data is routed from another
path.

What is meant by data communication standards?


Hardware and software specifications that make communication between
different computers possible are called data communication standards.

What is OSI model? Explain.

OSI stands for Open System Interconnection. It is data communication model. It


consists of seven layers and specifies roles and responsibilities of each layer in data
communication process.
The data is passed from layer-7 to layer-1 on sending side and is moved from layer-1
to layer-7 on receiving side.
OSI was developed by International Standard Organization ISO in early 1970s. This
organization is located in Geneva and develops standards for international and
national data communications. Seven layers of OSI model are as follows:

Layer 7 - Application Layer:


Application layer provides services to end-user. It interacts with operating system
and application software when user wants to send files, read messages or perform
other network related tasks.

47
Layer 6 – Presentation Layer:
Presentation layer takes data from application layer. It converts data into the
format that the other layers can understand. On the receiving end, it converts
information in the form human can understand.

Layer 5 - Session Layer:


Session layer enables two applications or two pieces of same application to
communicate across the network. It performs security, name recognition, logging
functions. It also establishes, maintains and ends communication.

Layer 4 – Transport Layer:


Transport layer provides process to process delivery. It establishes connections
and handles quality control by making sure that the data received is in the right
format and the right order. It provides error checking and flow control facility.

Layer 3 – Network Layer:


Network layer provides source to destination delivery. It decides physical path-
way through which data moves from source to destination.

Layer 2 – Data Link Layer:


Data Link Layer provides node to node delivery. It defines the format of data and
provides error checking facility at each node.

Layer 1 – Physical Layer:


Physical Layer defines cables and connector standards and signaling levels to be
used for data communication.

What is protocol? List different protocols along with the layers and devices they
are used in and their purpose.
Definition of protocol is already given at start of this chapter.
Layers of Protocol Devices
Protocol Function
OSI Model Name Used
Application
HTTP It provides interaction between user and software Gateway
Layer
It converts data into the format that the other layers
Presentation Window
can understand. On the receiving end, it converts Gateway
Layer O.S
information in the form human can understand.
Session Starts and Stops communication session between
NetBIOS Gateway
Layer applications
Transfer Data between source process and
Transport Router and
TCP destination process, and is responsible for error
Layer Gateway
recovery and flow control.
Network Controls routing and forwarding of data between
IP Router
Layer source and destination.
Data Link X.25 Forward data from one node to the other. Provides Switches &
Layer IEEE 802 error checking facility. NICs
Physical X.25 Provides hardware such as cables and connectors Cables and
Layer IEEE 802 for sending and receiving data. Connectors

48
Explain TCP/IP protocol.
TCP stands for Transmission Control Protocol/Internet Protocol. It is a combination
of two protocols: TCP and IP. It was developed by Department of Defense (DoD). It
is used on the largest network i.e. Internet and is available on small and big
computer.
IP protocol works on network layer. It handles the data transfer from the sender to
receiver. It assigns IP address. IP address is the unique logical address of connecting
devices.
TCP protocol works on transport layer. It ensures ( ) reliable and accurate data
transfer. It involves error checking and flow control of data between sender and
receiver.

Explain TCP/IP architecture.


TCP/IP architecture is a model like OSI. However it has four layers instead of seven.
The data is passed from layer-4 to layer-1 on sending side and is moved from layer-1
to layer-4 on receiving side. These layers are:
Layer 4: Application Layer
Layer 3: Transport Layer
Layer 2: Network Layer
Layer 1: Network Access Layer

What are TCP/IP ports and Applications?


When an application on the computer sends/receives data over the internet, it uses IP
address and a specific port. The port distinguishes one process (application) from the
other on same computer. There are total of 65,535 ports in TCP/IP.
IANA (Internet Assigned Numbers Authority) registers port numbers of common
internet services.

Compare TCP/IP and OSI model.


 TCP/IP model has four layers whereas
OSI model has seven layers.
 The application layer of TCP/IP model
combines the services of Session,
Presentation and Application layers of
OSI model.
 The network access layer of TCP/IP
model combines the services of
physical and data link layers of OSI
model.
 TCP/UDP protocol works on Transport
layer and IP protocol works on Network
layer in TCP/IP model

What is an IP address?
IP address is a unique address of computer (or node) on a network. It is 32-bit
address and is divided in four octets. Each octet is represented by 8-bits. The octets
are separated by dot and are converted to decimal for human understanding.

49
For Example, consider the following IP address in binary form:

11000000.10101000.00001111.10000100

The same address for human understanding is represented in decimal form as


follows:
11000000.10101000.00001111.10000100

192.168.15.132
Parts of IP address:
IP address has two parts:
1) Network Number: It is the network address to which computers in that
network are connected.
2) Computer Number: It is the address of computer in that network.

Network Number Computer Number

Computers of same network have same Network number but different computer
number.
Computers of different networks have different Network number and may have
same or different computer number.

Explain different address classes of IP address.


IP addresses are divided into three address classes (categories or groups). These
classes are named as Class A, Class B and Class C addressing.
1) Class A address:

Class A has 8-bits Network Number and 24-bits Computer Number. The first most
significant bit of network number is always 0. Class A can identify about 224
computers per network.

2) Class B Address:

Class B has 16-bits Network Number and 16-bits Computer Number. The first two
most significant bits of network number are always 10. Class B can identify more
than 65000 computers about 216 computers per network.

50
3) Class C Address:

Class C has 24-bits Network Number and 8-bits Computer Number. The first three
most significant bits of network number are always 110. Class C can identify about
28 => 256 computers per network.

What is subnet mask?


Subnet mask is used to specify which portion of IP address identifies Network
number and which portion identifies Computer number. Default masks for the three
classes are given below:

Class A: 255.0.0.0
Class B: 255.255.0.0
Class C: 255.255.255.0

Explain subnet mask by an example:


Consider the following IP address of Class C addressing:

192.168.15.132
Its binary representation is:

11000000.10101000.00001111.10000100

The default subnet mask for Class C addressing is:

255.255.255.0

11111111. 11111111. 11111111.00000000

The IP address and subnet mask is lined up against each other:

11000000.10101000 .00001111.10000100
11111111. 11111111. 11111111.00000000

The bits of IP address that matches with the 1s in subnet mask are taken as network
number and remaining bits are taken as computer number. So the network number
here is:
11000000.10101000 .01111011.00000000 i.e. 192.168.15.0

And computer number is:

00000000. 00000000. 00000000.10000100 i.e. 0.0.0132

51
Explain circuit switched networks and packet switched networks.
In circuit switched networks, a physical connection is established every time
between the two connecting devices. This connection can only be used by the two
connected devices. The connection remains open for the duration of the
communication. Circuit switch network provides fixed data rate channel. An
example of a circuit switched network is the telephone network.

In Packet Switched networks, no physical connection is needed. Data is first


broken down into one or more small blocks called packets. Each packet includes
both the source and destination addresses. The two communication subscribers can
operate at different data rates
The packets are first passed by the source to its local Packet Switching Exchange
(PSE). The exchange stores the packet and checks the destination address. The
PSE using its routing directory selects a suitable outgoing link and places the
packet on that link. Receiving device reassembles ( ) the packets in sequence.

CHAPTER 6 ::: WIRELESS NETWORK

What is a wireless network?


A network in which the information is transferred without any wire, cable or any
other electrical conductors is called wireless network. The information is transferred
through open air. Cellular mobile communication is an example of wireless network.

List some advantages of wireless networks.


Some advantages of wireless networks are as follows:
 New user can be added easily without changing physical connection.
 User can connect automatically if the device is in range.
 It is cheap and cost effective. Because it does not need cables, so the cables
cost and installation cost is saved.
 We can move around and change our position easily. We can shift to the other
floor or room in wireless range without disturbing the connection.
 Traffic of wireless network can be filtered or blocked easily.
 We can easily expand wireless coverage by simply adding a new wireless
device.
 It provides remote access to the employees of a company. The employees can
access company network while they are away from the company.

List some disadvantages of wireless networks.


Some advantages of wireless networks are as follows:
 The main disadvantage of wireless network is security problem. Intruders
(hackers) can tap into wireless network more easily than a wired network.
 User might also face problem of signal range and signal strength.
 Low signal strength results in slow speed.
 Wireless signals are radio signals so they are likely to be distorted from
magnetic or electronic devices.
 The energy of wireless signals weakens rapidly ( ) while passing through
group of trees and buildings.
52
 Bad weather also plays a role in weakening of signals.
 Speed of wireless cards is less than the speed of wired connection

Explain following wireless network terminologies.

Radio Signal:
A radio signal (radio wave) is an electromagnetic wave propagated by an antenna. The
waves have different frequencies. Radio frequency (RF) systems have two components:
Transmitter: It sends radio signals at different frequencies.
Receiver: It tunes itself to certain frequency signal and listen that signal.
RF systems also have set of rules that tell how the transmitter and receiver will
communicate, for example the transmitter and receiver must communicate at a certain
frequency.
Early radio signals were analog but today most of the radio signals are digital.

Radio Transceiver:
It is a device that can both transmit and receive radio signal. It has a common circuitry for
sending and receiving data. Cell phone is an example of transceiver that can both send and
receive radio signals.
Radio stations are transmitter only as they can only send radio signals. Similarly radio tapes
are receiver only as they can only receive radio signals.

Wireless Access Point:


WAP is a device that connects wireless
devices to a wired network. A wire
from a wired network is connected to
Wireless Access point.
It receives signals from that wire and
broadcasts these signals wirelessly using
WI-FI.
All the wireless devices connected to it
can receive those signals. WI-FI is a
wireless LAN protocol. A device must
have a WI-FI to connect to Wireless
Access Point.

Line of Sight Communication:


In this communication, the sender and receiver antennas must be in line-of-sight because
the signals cannot bend or cannot pass through buildings, structures or hills. Transmitters
are installed on high buildings of mountain tops. Relay stations (boosters) amplify the
signals and retransmit from one station to another. Microwave and Satellite media are
example of Line of Sight communication.

Microwave Communication

Satellite Communication

53
Explain Short and Long Distance Wireless communication:
Based on the region covered, wireless communication can be short distance or long
distance.
A. Short distance wireless communication:
Short distance wireless communication ranges from few meters (like infra red) to a
distance of up to 50 km (WI-Max). Following are different types of short distance
wireless communications:
1) Infra Red 2) Bluetooth
3) WI-FI 4) WI-MAX

1) Infra Red (IR):


Its range is very short i.e. only few meters. IR has extremely high frequency waves.
Common applications are:
 Remote control systems in TV and toys etc use infrared technology.
 Home security systems have infrared enabled burglar alarm system.
 Modern computers have infrared enabled mouse, keyboard and printers.
 Car locking system uses infrared technology for automatic locking and unlocking doors
of cars.

2) Bluetooth:
Its range is about 10 meters and data transfer rate is up to 723Kbps. It is low speed
and has short range as compared to WI-FI and WI-Max. It consumes low power.
Devices like mobiles, laptops, PCs and video cameras etc connect and exchange
information through Bluetooth. Wireless keyboards, mouse and printers also use
Bluetooth technology.

3) Wi-Fi (Wireless Fidelity):


Its normal range is about 32 meters or above that’s why it is used in homes and
offices. It is also called wireless LAN (WLAN). It provides high speed connection.
But it ranges only a home or portion of a large building. Wi-Fi uses radio signals.
It is normally password protected for security purposes. It is popular among Mobile
and laptop users for connecting with wired Network through Wi-Fi.

4) Wi-Max (Worldwide Interoperability for Microwave Access):


Its range is about 40 - 50 km. It is similar to Wi-Fi but provides public network
services to users. Wi-Max creates a Metropolitan area network and provides
services anywhere within a city. It can be used as alternative to Cable TV and DSL
internet connection. It uses microwave and other complex technologies than Wi-Fi.

B. Long Distance Wireless Communication:


Long Distance Wireless Communication provides services that are not possible with
the use of cables. It includes cellular and global positioning system.

1) Cellular Communication:
It divides geographical region into section called cells. Each cell has a base station.
Base Station has a transceiver and controller that provides radio transmission to
mobile phones.
Each mobile phone uses a separate temporary radio frequency (channel) to talk to
base station (BS). BS can talk to many mobile users at the same time. Channel uses
pair of frequencies. One frequency (the uplink) is used by mobile phone to
communicate with base station. The other frequency (Downlink) is used by BS to

54
communicate with mobile phone. Main feature of this type of communication is the
reuse of radio frequencies at each cell.

2) Global positioning system (GPS)


GPS is a radio navigation system that allows people to determine their exact position.
It works anywhere on land, in seas or in air and 24 hours a day.
GPS system has a GPS satellite, ground stations and GPS devices. GPS is used for
navigation on airplanes, ships, ground vehicles and by individuals. Relative
positioning and time data is used to study the movement of tectonic plates for
understanding earthquakes, astronomical observations, telecommunication etc…

Explain classification of satellites based on orbits.


Based on the orbits, Satellites in GPS can be classified in three ways:
1) Geostationary Earth Orbit (GEO)
2) Medium Earth Orbit (MEO)
3) Low Earth Orbit (LEO)
1) Geostationary Earth Orbit (GEO)
This orbit is directly above the Earth’s equator (at 0 latitude). Its period is equal to the
Earth’s rotational period. So when we observe the satellite in geostationary orbit from
Earth, it appears to be fixed in the sky.
Communication satellites and weather satellites are placed in geostationary orbit because
earth antennas can be installed having fix direction towards satellite.

2) Medium Earth Orbits (MEO):


MEO is located above low earth orbit and below geostationary orbit (between 2000 km to
35786 km). These are generally used for navigation such as in Global positioning system.
Examples are GLONASS (a Russian satellite-based navigation system located at 19100)
km and GALILEO (a European Union EN satellite based navigation system at 23,222
km).

3) Low Earth Orbit (LEO) also known as Low orbit:


Its range is generally defined from the Earth’s surface up to an altitude of 2000km above.
However practical range is from 160km to 2000 km above the Earth’s surface. Less
energy is required to place satellite in low orbits. It also requires low power amplifiers for
communication so this orbit is used in many communication applications.
Satellite like International Space Station, the Space Shuttle and the Hubble Telescope are
all exist in Low Earth Orbit.

What is Mobile Communication?


Mobile communication involves the use of mobile devices to communicate with others. We
can also access information from everywhere so it increases our efficiency and
productivity.
Mobile devices include cell phones, PDAs, Laptops, Tablets and smart phones etc.

Explain Requirements of Mobile Communication:


Following are the components required for mobile communication:
1) Mobile Phones 2) Base Station
3) Switching Node 4) Landline telephone Network
1) Mobile Phones:
Mobile Phone allows us to make and receive calls over a cellular network. Mobile
phones also support text messaging service, MMS, email and internet.

55
2) Base Station:
Base Station communicates with many mobile phones at the same time. It has a
transceiver and antenna for sending and receiving signals from mobile phones. It is
responsible for handling data traffic and signals between mobile phones.

3) Switching Node
It performs switching and mobility management functions for mobile phones. Switching
nodes are owned and developed by mobile phone operators. These allow mobile phones
to communicate with each other and telephone landline network.

4) Landline Telephone Network:


It is a wired Public Switched Telephone Network (PSTN). It is connected with cellular
network. It provides communication between cellular network and telephone (PSTN).

Describe Features and limitations of Mobile communication systems.


 Information can be easily accessed from World Wide Web. However, the validity and
accuracy of information cannot be guaranteed because anybody can easily upload false
information on internet.
 User copy and paste information from internet without the permission of publisher and
this is the violation of copy right law.
 Daily use of mobile devices makes people more dependent on machines instead of
relying on their own potentials.
Limitations:
 Handheld mobile devices have small display, low memory, limited battery power and
limited CPU power.
 Wireless mobile communication has low processing capability, high error rate and low
storage availability.
 If proper protection is not given the hackers can install spyware and can see credit card
information, account login details and password.

Describe Architecture for communication over mobile devices:


The architecture includes following wireless data communication capabilities:
1) Web Protocol Stack 2) Wireless Markup Language (WML)
3) Wireless Application Protocol (WAP)

1) Web Protocol Stack (HTTP/TCP/IP):


Web protocol Stack consists of HTTP and
TCP/IP. Its purpose is to allow two devices to
communicate over internet. It is usually built in
the operating system such as Windows.
When a message is sent over network it is
translated from text to electronic signals at source
device and then translated back to text at
destination device.
Every mobile device need a web protocol stack
that makes communication possible. This
protocol comes with operating system i.e. Working of Web Protocol Stack
android OS or Windows OS.

56
2) Wireless Markup Language (WML)
Wireless Markup Language is based on HTML and XML. It delivers Internet contents to
small wireless devices like mobile phones and tablets etc…WML uses less memory and
less processing power from browser than HTML. It also supports small display sizes.

3) Wireless Application Protocol (WAP)


WAP consists of multiple protocols that provide Internet access to wireless devices like
mobile phones, pagers and personal digital assistants (PDAs). It has become the standard
for providing data and voice services to wireless hand held devices.

CHAPTER 7 and CHAPTER 8

Define data and information.


Data is a collection of facts and figures in raw (unorganized) form. It is an input for
processing. It does not convey any meaning/information by itself.
Information is an output of processing. It is obtained from data after processing and analysis.
It is meaningful and organized.

Example:
When students get admission in a college, they fill admission form. This form contains raw
facts (data of student) like name, father’s name, address of student, marks obtained etc.
After collecting admission forms, merit is calculated on the basis of obtained
marks/percentage of each candidate. Then the candidates’ names are arranged in
descending order by percentage. This makes up a merit list that is information.

What is file management (file based) system?


File management system is a collection of programs and files. The programs manage files.
Each program works independently and manages its own data. The records of one file are
not related to the records of other files.
Example: In a college having file management system, student name, class number and
contact number is stored by examination department and the same information is stored
independently by library department and student affairs department.

What is database or database approach?


A database is a collection of related data. In database approach records are related to each
other. A central program manages all the related data. A database may be created manually
or it is computerized.
Example: In a college having database approach the data of student is held and managed at
a single place while different departments use this data whenever needed.

What is database management system (DBMS)?


Database Management System is a collection of programs that enable users to create,
maintain and manipulate database. It also enables us to store and retrieve ( ).
Manipulation of data includes:
1) Adding new data
2) Deleting unwanted data
3) Changing existing data

57
DBMS provides user-friendly access and controls between user and database. Its main
purpose is to improve data sharing, data access, decision making and increase end user
productivity.
Examples of DBMS are customer information system, Library management, Inventory
information.

Compare advantages of database approach over traditional file approach method.


Database approach has following advantages over file approach method:
1. Reduced Data redundancy:
Data redundancy means duplication of data in many files. For example: Data of same
student may be kept separately by library, exam department, student cell etc… The
database management reduces this disadvantage. In database management, the data is
stored at a centralized location.

2. Reduced Data Inconsistency:


When changes are made in file management, the data has to be updated in all the files
which contain that data. If any file is not updated it results in data inconsistency.
In database approach the data is stored on single location so the changes are made at only
one location and this reduces inconsistency.

3. Data was not shareable:


In file management, it is difficult and takes much time to get data from other department.
If copy of data is taken, it results in duplication (redundancy). If original file is taken, it
results in update issues. However in database management the data is available easily.

4. Lack of flexibility:
With file management method, it is hard to assemble data in different formats. If format
changes a whole new file has to be made again. Database management method is flexible
and we can easily assemble data in different formats.

5. Backup and Recovery:


DBMS provides facility for backup and recovery from failures including disk crash,
power failure, software errors etc…

6. Reduced Program-Data Dependency:


In file management, the programming is dependent on data format. If format of data
changes, we have to reprogram. On the other hand, DBMS program is not dependant on
its data format.

Who is database administrator (DBA)? Explain responsibilities of DBA.


Database administrator is a person responsible for supervising the database and the use of
DBMS. DBA performs following tasks or has following responsibilities.
1.Designing the database.
2.Enforcing Operational policies and procedures.
3.Planning security measures and backup of database.
4.Assigning passwords to users
5.To give training to the user about working of database.
6.Planning recovery procedure if hardware or software fails and ensuring no data is lost.
7.Controlling privileges and permissions of database users.

58
What is database planning? Describe its steps.
Database planning is a step-by-step approach to the development of database. It starts from
the concept of design and then moves to development and implementation. It saves time
and efforts and makes data entry and retrieval consistent. Following are the steps involved
in planning a database:
1) Problem Identification:
The nature and scope of the problem is identified and the problem is clearly defined.
Database developers identify the type of information needed as well as the unknowns.

2) Feasibility study:
The purpose of feasibility study is to fine one or more solutions of the problem and to
suggest the most desirable and economic solution. More than one solution is
generated from which one solution is proposed. Feasibility study includes:
1) Investigate the problem
2) Find out all the possible solution
3) Study all the solutions to determine their feasibility
4) List issues with each solution
5) Select the preferred solution
6) Document the results in feasibility report

3) Requirement Analysis:
The purpose of requirement analysis is to obtain thorough and detailed understanding
of the problem. It is important to create a complete and accurate representation of all
the requirements. Requirements analysis includes following:
1) Entities required, (i.e. the number of tables)
2) Fields required for each entity in table
3) Key field in each table 4) Data types of the fields
5) Relationship between entities 6) Queries
7) Forms Designs 8) Reports

4) Identify Entities and attributes:


In this step, the entities and attributes are identified. An Entity is a place, person,
concept, event or an abject about which organization is interested to store data.
Examples: Student, Car, Book etc…
Attributes are properties of Entity that describe it completely. For example, attributes
of student can be name, age, father name, marks obtained, group etc…

5) Assigning Names to Tables and Columns:


In this step, the entities are converted to the tables and the attributes are converted to
the columns of the tables. There is no standard convention for naming tables and
columns the names should be meaningful and consistent.

Define following terminologies:


Entity:
An Entity is a place, person, concept, event or an abject about which
organization wants to store the data. Examples: Student, Car, Book
etc…
Entity Instance:
Instance is the single occurrence (record) of an Entity. For example Student is an
entity. While every record of students such as Ali, Aslam etc are instance of the
entity.

59
Fields:
Attributes of an entity are stored in computer as fields. Each field stores one attribute.
Example: Name of student will be stored in one field and his age in other field.
Characters:
Characters are grouped together to form fields. For example student name Ali is made
of three characters.
Record:
A collection of related fields treated as a single unit is called a record. . It is also
known as tuple/row. It is a combination of attributes/fields. For example:

Fields

Name Father Name Age Weight


Record
Ali Jamal 16 45
Hussain Asghar 17 48
Aslam Fahad 16 47

Table/Relation:
A database table is a file that contains data about a single entity. For example a
student table contains all the records of students.
File:
A file is a collection of records. For example a stock file contains record for items of a
stock.
View:
It is made up of rows and columns. It may display information that is restricted to a
part of table. It may also present selected data from several tables at a time.

Data Types:
Every Field in table is assigned a data type. Data types available in a database are:
1) Character: It is used to store text, or combination of text and numbers.
2) Integer: It is used to store whole numbers such as 34, 2073 etc…
3) Real Numbers: It is used to store numbers that have fractional part such as 73.89.
4) Boolean Data: It is used for TRUE or FALSE values. NULL values are not allowed.
5) Date and Time: It is used for storing date and time.

What is a key? Explain different keys available in database.


Key is an attribute that is used to identify records in a table. The purpose of key is to link
data together without repeating all the data in every table.
Primary key: The key that uniquely identifies a record is called primary key. It is
composed of one or more attributes. Every table should have a primary
key. The value of primary key should not be NULL.
Example: In student table, Roll no can be the primary key.
Candidate key: Candidate key is a unique key that can be chosen as primary key. It is
also a called Alternate key.
Foreign key: A foreign key is an attribute or set of attributes whose value matches
with a primary key in another table. Foreign key is used to create
links/relationships.
Composite key: Such key that is composed of more than one attributes is called
composite key.
60
Secondary Key: Secondary keys are used for search (retrieval) purposes. These are
non-primary keys and non-unique keys. For example, name can be a
secondary key if we want to search a student by name.

Consider following tables:

DOCTOR Table:
Doctor Id Name CNIC Gender Phone No Sp
x-123 Fahad 3723-7213 Male 0333-0000 3
x-124 Samreen 3740-7235 Female 0312-0132 2
x-125 Khalid 3712-4597 Male 051-12365 3
SPECIALTY Table:
Specialty Id Specialty Name
1 Heart Specialist
2 Dentist
3 ENT specialist
4 Urologist

Candidate keys for DOCTOR Table:


1) Doctor Id
2) CNIC

Candidate keys for SPECIALITY Table:

Primary key for Doctor Table:


 Doctor Id

Foreign Key in DOCTOR Table:

What is data modeling and data model?


Data modeling is the process of designing logical structure of database with a diagram. It
uses text and symbols to represent the way data needs to flow. This diagram is called Entity
Relationship Diagram (ERD).
A Data model can be thought of as a diagram or flowchart that illustrates the relationships
between data.

Briefly describe different approaches to data modeling.


Following are different approaches sued for data modeling:
1) Conceptual Data Modeling identifies the highest level relationships between entities.
2) Enterprise Data Modeling addresses the unique requirements of a specific business. It
is similar to the conceptual data modeling.
3) Logical Data Modeling illustrates the entities, attributes and relations ships involved in
business functions. It serves as the basis for creation of the physical data model.

61
4) Physical Data Modeling represents an application and database-specific
implementation of logical data model.

What is entity relationship diagram (ERD)?


Entity relationship diagram is a diagrammatical (‫ )تصويری‬representation of relationships
between different entities. It is a conceptual view of database. ER model is a best option for
the conceptual design of a database.
ER model is based on:
1) Entities and their attributes
2) Relationships among Entities
Entities are represented by Rectangles. Attributes are represented by ellipses. The
relationship is identified by diamond symbol. The lines are used to connect entities and
relations.

Teacher Teaches Classe

Define relationship.
A relationship is a link or association between entities. For example, there is a relationship
between doctor and patient, i.e. Doctor treats patient. The relationship is identified by
diamond symbol. The relationship between doctor and patient is represented as:

Doctor Treats Patient

Define degree of a relationship. Explain types of degrees of relationships.


Degree is defined as the number of entities participating in a relationship. It has two main
types:
1) Unary Relationship
2) Binary Relationship (Binary relationship is further subdivided as follows):
i. One-to-One Relationship
ii. One-to-many Relationship
iii. Many-to-Many Relationship

1) Unary Relationship:
When the relation/association is maintained within a single entity then such relation is
called unary relationship or recursive relationship. Example: The Employee Manages
Employee.

Employee Manages

2) Binary Relationship:
When the relation/association is made between two entities then such a relation is called
binary relationship. Example: Doctor treats Patients.

Doctor Treats Patient

62
i. One-to-one:
One entity instance has only one with other entity instance. These are marked as 1:1.
Example: Person and Id card has one-to-one relationship. One person can only have
one ID card. Similarly an ID card belongs to only one student.

1 1
Person Has Passport
ii. One-to-many:
One entity-instance has many relations with other entity-instances. These are marked
as 1:N, where N means more than one
Example: Mother and children have one-to-many relationship. A mother can have
more than one child but every child has only one mother.

1 N
Mother Has Children
iii. Many-to-Many:
Many entity-instances have many relations with the other entity-instances. It is
marked as N:N.
Example: Teacher and Class entities have Many-to-Many relationship because a
teacher can teach more than one classes. Similarly a class is taught by more than one
teacher.

N N
Teacher Teaches Class

Define Cardinality and Modality.


Cardinality:
 Maximum number of times that an entity-instance is associated with another
entity-instance is called Cardinality.
 Cardinality can be 1 or many. Many is represented by > symbol.
Modality:
 Minimum number of times that an entity-instance is associated with another
entity-instance is called Modality.
 Modality can be 0 or 1.

Representation Method:

>0 (It means Cardinality is many and modality is 0)

>I (It means Cardinality is many and modality is 1)

II (It means Cardinality is 1 and modality is 1)

I0 (It means Cardinality is 1 and modality is 0)

Examples:

Person II Has 0I ID Card


sdI

63
Mother II Has I< Children

Teacher >I Teaches 0< Class

What is relational schema? Explain.


Relational schema represents the structure of database in formal language. It also refers to
the organization of data to construct database. It defines the objects in database.
It includes transformation of ER diagram into the relational schema. Following steps
transform E-R diagram into relational schema.
1) Transforming Entity to relational schema:
An entity turns into a table.

2) Transforming Attribute to relational schema:


Each attribute turns into a column (field) in table.

3) Transforming relationship to relational schema:


Relationships are made with the help of foreign keys. The primary key of one table goes
in to the other table as foreign key and creates link.
i. Transforming One-to-One Relationship:
We have the choice either to make one big table or make two tables. In case two
tables are made, primary key of both tables can become foreign key for other tables.
ii. Transforming One-to-Many Relationship:
The primary key of the table on the one side is inserted as foreign key on the table
of many sides. It is the most common use of a foreign key.
iii. Transforming Many-to-Many Relationship:
A bridge table is formed. This bridge table holds the primary keys of both tables as
foreign keys. These two foreign keys form composite primary key of bridge table.

What is normalization and normal form? How many normal forms are available?
Normalization is a process of producing simple and more reliable data structure. The
process of normalization goes through different Normal forms like 1NF, 2NF and 3NF
etc…
A normal form is state of tables that can be determined by applying some set of rules.
There are five normal forms namely First normal form (1NF), Second normal form (2nF)
and so on..

Explain first three normal forms.


First Normal Form (1NF):
The table is in first normal form, if it contains no repeating groups. All the multi valued
attributes are removed and each intersection of row and column contains exactly one
value.

Second Normal Form (2NF):


The table is in second normal form if it contains no partial functional dependency. Partial
function dependencies exist when only one part of composite key is needed to determine
some attributes.
Partial functional dependencies are removed by breaking single table into more than one
table.

64
Third Normal Form (3NF):
The table is in third normal form if it contains no transitive functional dependencies.
Transitive functional dependencies exist when a non-key attribute determine other non-
key attributes.
Transitive functional dependency is removed by making a new table and shifting
dependant attributes there. The determinate column acts as foreign key in original table.

What is SQL? Explain different database languages.


SQL (Structured query language) is standard language for accessing and manipulating
database. Following are types of SQL languages:
1) Data Definition Language:
DDL is use to define data structures. DDL statements create, modify and remove data
objects such as tables. Some important tasks of DDL are:
1) To create objects in database
2) To alter (change) structure of the database
3) To delete objects from the database
2) Data Manipulation Language:
DML statements are used to manage or manipulate data. Some DML tasks are:
1) To retrieve data from database
2) To insert data into a table
3) To update existing data within table
4) To delete records from table
3) Data Control Language:
DCL is used to control privileges ( ) on use of data. Some tasks of DCL are:
1) To allow specified users to perform specific task
2) To disallow specified user from performing specific task
3) To cancel previously granted or denied ( ) permissions.

Why Microsoft Access is used? List names of objects of MS. Access.


Microsoft is Database management software. It is used to create database and maintaining
database. Microsoft Access is a part of MS Office suite. MS Access provides facility for
making following objects:
1) Table 2) Form 3) Query 4) Report

What is table?
Table is a combination of rows and columns. It holds actual record of same nature. Rows
represent records, while Columns represent fields of each record.
In access, Table can be defined in three ways:
1) Design View
2) Using Wizard
3) By entering Data
Data is entered in table using Datasheet View. Datasheet view shows data in the form of
rows and columns.

65
What is the standard notation of describing a Table/Entity?
Consider following Book table:
Book ID Title Author Date Published

Standard notation for writing is:

BOOK (Book ID, Title, Author, Date Published)

Entity/Table Primary key


Name is underlined Other attributes are
written simple
without underlining

Entity Name (BOOK) is shown in upper case (Capital) letters.


 Attributes are written in lower case inside brackets, separated by comma.
 Primary key attribute is underlined.

What is Form? List its purpose?


 Form is a window that provides easy and user friendly way of entering data to the
tables.
 It consists of different controls like buttons, text boxes, label etc…
 With forms, we can view and modify data as well. Forms can also display result of
queries and combines different tables.

For example following is a member form made from Member table:

What are the advantages of using form?


 Forms are easy to use.
 Forms are user friendly and interactive.
 Forms are flexible as we can add different controls to the forms.
 We can add data to more than one tables using single form.
Differentiate between Forms and Tables.
 Tables hold actual data while Forms provide easy way to view and modify the data.
 Tables are handled by experts while Forms are used by normal users.
 Data entry in tables is done one at a time while Forms can have fields for more than
one table.

Describe queries.
 Queries are used to gather selected information from database. It can access
data from more than one table at a time.

66
 Results of queries are shown as Data sheet view. Queries can also be accessed
through forms or reports.
 We can make parameter queries that ask user to enter desired value. It then displays
result which matches that value.
 We can also apply criteria on different fields.

Consider following query. On execution, it asks user to enter Member Name and then gather
required information of that member:

The result is shown in datasheet view. However, same query can be accessed through form or
reports. In following figure, the same query is accessed through form.

Explain types of queries.


1) Select query:
Select query is used to retrieve data from the database. Data can be retrieved from
more than one table in a single query. We can also apply some conditions if needed.
2) Append Query:
Append query is used to add new record to the table from one or more source tables.
It adds a complete record. It cannot change individual fields.
3) Update query:
Update query is used to change, add or delete data in existing record (fields of a
record). It only updates column of a record. We cannot add new record or delete
whole record using update query.
4) Delete query:
Delete query is used to delete an entire record (row) from table along with the primary
key.
5) Parameter Query:
Parameter query asks user to enter input at run time. The input provided by user is
used to perform rest of the tasks. Parameter query can be used with other queries like
select query etc…

67
6) Make Table query:
Make table query retrieves records from a table and copies them into a new table.

Describe use of reports.


Reports are used for printing information from the database. A report can combine data from
more than one table or queries.
Reports can be generated in two ways:
i. Create Report by Wizard option
ii. Create Report Using Design View Option

What is meant by database integrity? Explain


Database integrity means the correctness and consistency of data. It is achieved by applying
two types of integrities:
1. Entity Integrity
2. Referential Integrity
1) Entity Integrity:
Entity integrity states that primary key cannot contain NULL value. It is a constraint on
primary key. Because, if a primary key contains NULL value, record cannot be uniquely
identified.

2) Referential Integrity:
It states that if a foreign key exist in a table, its value must match to a primary key in
another table. It is a constraint on foreign key. Database cascading deletion and
cascading update option helps maintain referential integrity.

What is meant by indexing? List advantages and disadvantage


An index is a list of numerical values that gives the order of record when they are sorted on
particular field. It has following advantages:
1. They speed up queries
2. They provided ready-made sorted data if required
It has following disadvantage:
1. They slow down data entry and editing, because indexes have to be updated
whenever data is added or deleted.

Explain different field data types available in access.


Text: It can hold all type of textual data like alphabets, numbers and special
characters. Maximum characters are 255. Default length for text is 50
characters.
Memo: Memo holds large textual data. It can contain maximum of 65,535 characters.
It cannot be a key field.
Number: This data type holds numeric values. It has different sub-types like byte,
integer, long integer, double etc…
AutoNumber:It is a long-integer type field. Access automatically fills this field for every
new record. Access can increment the AutoNumber field by 1 or by randomly
filling as per New-Value setting we chose. Maximum value for AutoNumber
type is slightly more than 2 billion.

68
Date/Time: This field is used to store date and time in fixed formats. The date is
represented by whole number and time in decimal portion.
Currency: This field is used to store currency data. It has special fixed format with four
decimal places to prevent rounding errors.
Yes/No: This field can either store Yes or No. -1 represents Yes (True) and 0
represents No (False).

What is Microsoft Access?


Microsoft access is one of the most popular database software by Microsoft. It is a database
management system that is used to make databases on computer.

What is Openoffice Base?


It is database module of OpenOffice Suite. It is an open source application. It is a fully
featured database management system. It helps users to create database designs, tables,
queries forms and reports.

What is SQL server?


SQl server is a product of Microsoft Office. It is a relational database management system.
Its main function is to store and retrieve data as requested by software applications. It can
support small number of users as well as large databases. It is used to create web based
databases.

What is Office Button? What tasks are performed from office button?
Office button is located on the top left corner of the access window. When we click this
button it provides list of different tasks such as saving, opening, new file creation and
printing etc… We can select the desired option.

What is access ribbon?


Access ribbon consists of a row of tabs like Home, Create, External data etc… Each tab
provides different options in the form of icons. We click on icons to use these options. The
Home tab provides frequently used options while Create Tab provides icons for creating
tables, queries, forms and reports.

What is access navigation pane?

Access navigation pane is located on the left


side access window.
It provides list of objects (Tables, Queries
etc…) created by the user as shown in figure
here.
To open an object we can double click on its
name.

69
What is query design grid? Explain its usage.
The grid that you use to design a query or applying filter in query Design view is called
query design grid. It has following options, 1) Criteria 2) Show 3) Sort 4) Table and Field.
In criteria option we can apply particular criteria as per our requirement. Show option is
used to show/hide any field in query result. Sort filter option is to sort data against a
particular field. Field name shows the selected field and table name shows the table from
which field is selected.

Write Steps for creating table.


 Click on Create tab on access Ribbon. From Table Section, select Table design.
 Enter field names in field name section and select data types for each field in data type
section.
 Right click on the selection box of the field you want to make primary key and select
Primary key option.
 Click on Close button the computer will ask for the table name, Enter the desired name
and press OK.

Write Steps for creating Query.


 Click on Create tab on access Ribbon. From Query Section, select Query design.
 A Show-table dialog box will open. Select tables from the list on which query is
applied
 Double click on the desired fields, the selected fields will be shown below in query
design grid.
 Enter criteria if any in the criteria field. Choose other options.
 Click on close button the computer will ask to enter query name, Enter the desired
query name and press OK.

Write steps for creating form.


 Click on Create tab on access Ribbon. From Form Section, select More Form Option
and then select Form Wizard.
 A form wizard will appear that asks you to select fields from tables and queries. Select
the desired fields and Click on Next button.
 The wizard will ask to select “Form layout”. Select the desired layout and click Next
button.
 Now the wizard will ask to select a style. Select the desired style and click Next button.
 Enter the Form Name and click on Finish button.

Write steps for creating reports.


 Click on Create tab on access Ribbon. From Report Section, select Report Wizard
Option.
 A Report wizard will appear that asks you to select fields from tables and queries.
Select the desired fields and click on Next button.
 The wizard will ask to select Grouping level. Select the desired grouping level and
click Next button.
 The wizard will ask to select “Report layout” and Orientation. Select the desired
layout and Orientation and click Next button.
 Now the wizard will ask to select a style. Select the desired style and click Next button.
70
 Enter the Report Name and click on Finish button.

Write steps for creating relationship between tables.


 Click on Database Tools tab on access Ribbon. Select Relationship option.
 Select the tables on which relationship is to be made.
 The tables will be shown along with their field names.
 Select the field name from one table and drag it over to the field on other table.
 Edit Relationship box will appear.
 Select following three options:
1) Enforce Referential Integrity
2) Cascade Update Related Fields
3) Cascade Delete Related Records
 Click on OK button.

What is layout? Explain layouts of forms.


Layout is the representation of fields name and data on the form or reports. Forms have four
layouts Tabular, columnar, justified and datasheet.
1) Tabular Layout: This layout displays data in tabular form (rows and columns). The
headings (labels) are placed at the top while each row represents a record.

2) Columnar Layout: Columnar layout displays data in the form of columns. The
headings (labels) are placed on the left side while data is placed on right side.

3) Justified Layout: Justified layout uses full width of the page to display records. The
data is spread across full width of the page.

4) Datasheet layout: This layout displays data in datasheet layout the same way data is
shown in tables.

Explain layouts of Reports.


If we do not select Grouping Level option, following three layouts can be used:

1) Tabular Layout: This layout displays data in tabular form (rows and columns). The
headings (labels) are placed at the top while each row represents a record.

2) Columnar Layout: Columnar layout displays data in the form of columns. The
headings (labels) are placed on the left side while data is placed on right side.

3) Justified Layout: Justified layout uses full width of the page to display records. The
data is spread across full width of the page

And if we select Grouping Level option then following layouts can be used:
4) Stepped
It is similar to table of context. The grouping level field comes first and other fields
are arranged below on next line.

5) Block
Grouping level field and other fields are arranged on same line. The fields are
enclosed in blocks.

71
6) Outline:
It is similar to Stepped layout. Grouping level field and other fields are arranged on
separate line. However for every level, the Fields name is shown separately.

What is database model? Explain its types.


Database model is the theoretical foundation of database. It determines in which manner
data is stored, organized and manipulated. Database models have five types.
1) Hierarchical Database Model:
In this model, data is organized into tree-like structure. It has owner and subordinate
relationship. Data elements in subordinate are called members and those having
subordinate are called owners. A subordinate can only have one owner. There is only
one data element that has no owner. Examples are table of contents, departments of an
organization and types of memories.

2) Network database Model:


In network model, some data elements can have more than one owner. It is more
complex structure than a hierarchical model. Examples are crew members, air craft,
routes and schedules applications.

3) Relational Database Model:


Data is held in tables in this model. Tables consist of rows and columns. Tables are
linked by means of common fields. Rows hold records and each column in table holds
one attribute (field).
It is used for making database management systems. It is the most popular database
model used in business applications.

4) Object Oriented database Model:


Object-oriented database are also called Object Database Management Systems
(ODBMS). Object databases stores objects rather than data, Real world objects have
two characteristics, state and behavior. Objects are used in Object Oriented
Programming languages like C++ and Java.

5) Object Relational database model (ORD):


It is similar to relational database model but have object oriented database. The data is
stored in database and is manipulated with queries.

Tidbits

 The first computer mouse was invented by Doug Engelbart in around 1964 and
was made of wood.
 Robert H. Dennard invented first dynamic random access memory (DRAM) in
1968
 In September 1965, IBM launched the 305 RAMAC, the first super computer
with a hard disk drive (HDD). The HDD weighed over a ton and stored 5 MB
of data.
 The Intel 4004, a 4-bit central processing unit (CPU) was released by Intel
Corporation in 1971. It was the first microprocessor.

72

You might also like