0% found this document useful (0 votes)
166 views

FOC- Full Notes

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

FOC- Full Notes

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

Chapter -1 Introduction to Computer

1) What is computer?
A computer is a programmable device that stores, retrieves, and processes data.
2) What is data processing?
Data processing means to process the data i.e. to convert its format. As we all
know data is the very useful and when it is well presented and it becomes
informative + useful. Data processing system is also referred as information
system. It is also right to say that data processing becomes the process of
converting information into data and also vice-versa.
3) Difference between data and information

The term Data is defined as a raw and unstructured fact that needs to be processed
to make it meaningful. Data can be simple and unstructured at the same time until
it is structured. Usually data contains facts, numbers, symbols, image,
observations, perceptions, characters, etc.

To derive meaning, data is always interpreted by a machine or human. So, it is


meaningless. Data comprises of statements, characters and numbers in a raw
form. Examples of Data; the number of visitors to a website by country, for the
past 100 years, the history of temperature readings around the globe is the data.

The term Information is defined as a set of data that is processed according to the
given requirement in a meaningful way. To make the information useful and
meaningful, it must be processed, presented and structured in a given context.

Information is processed from data and possess context, purpose and relevance.
It also includes raw data manipulation.

Information gives meaning and increases the accuracy of the data. It helps to
guarantee undesirability and reduces confusion. Thus, when the data is
transformed into information, there is no unwanted and useless detail contained
in the information. Example of information: Merit List, receipts, reports, report
cards etc.
4) List and explain characteristics of computer
Speed: – As you know computer can work very fast. It takes only few seconds
for calculations that we take hours to complete. You will be surprised to know
that computer can perform millions (1,000,000) of instructions and even more
per second.
Therefore, we determine the speed of computer in terms of microsecond (10-6
part of a second) or nanosecond (10 to the power -9 part of a second). From this
you can imagine how fast your computer performs work.
2. Accuracy: – The degree of accuracy of computer is very high and every
calculation is performed with the same accuracy. The accuracy level is 7.
determined on the basis of design of computer. The errors in computer are due
to human and inaccurate data.
Diligence: – A computer is free from tiredness, lack of concentration, fatigue,
etc. It can work for hours without creating any error. If millions of calculations
are to be performed, a computer will perform every calculation with the same
accuracy. Due to this capability it overpowers human being in routine type of
work.

4. Versatility: – It means the capacity to perform completely different type of


work. You may use your computer to prepare payroll slips. Next moment you
may use it for inventory management or to prepare electric bills.
5. Power of Remembering: – Computer has the power of storing any amount
of information or data. Any information can be stored and recalled as long as
you require it, for any numbers of years. It depends entirely upon you how much
data you want to store in a computer and when to lose or retrieve these data.
No IQ: – Computer is a dumb machine and it cannot do any work without
instruction from the user. It performs the instructions at tremendous speed and
with accuracy. It is you to decide what you want to do and in what sequence. So
a computer cannot take its own decision as you can.
7. No Feeling: – It does not have feelings or emotion, taste, knowledge and
experience. Thus it does not get tired even after long hours of work. It does not
distinguish between users.
8. Storage: – The Computer has an in-built memory where it can store a large
amount of data. You can also store data in secondary storage devices such as
floppies, which can be kept outside your computer and can be carried to other
computers.
5) What is garbage-in-garbage-out?
Garbage in, garbage out, or GIGO, refers to the idea that in any system, the
quality of output is determined by the quality of the input. For example, if a
mathematical equation is improperly stated, the answer is unlikely to be correct.
Similarly, if incorrect data is used as input into a computer program, the output
is unlikely to be correct or informative.
5) Write a note on evolution of computers? Or Write a note on
generation of computers.

Evolution of Computer Generations.

The modern computer took its shape with the advent of time. It was around 16th
century when the evolution of computer started. The initial computer faced
many changes, obviously for the betterment. It continuously improved itself in
terms of speed, accuracy, size, and cost to get the shape of the modern day
computer. This long period can be conveniently divided into the following
phases called computer generations:

1. First Generation Computers (1940-1956)


2. Second Generation Computers (1956-1963)
3. Third Generation Computers (1964-1971)
4. Fourth Generation Computers (1971-Present)
5. Fifth Generation Computers (Present and Beyond)
First Generation Computers: Vacuum Tubes (1940-1956):
The technology behind the First generation computers was a fragile glass
device, which was called vacuum tubes. These computers were very heavy and
very large in size. These were not very reliable and programming on them was a
very tedious task as they used high level programming language and used no
operating system. First generation computers were used for calculation, storage
and control purpose. They were too bulky and big that they needed a full room
and consume rot of electricity.

Main first generation computers are:


 ENIAC: Electronic Numerical Integrator and Computer, built by J.
Presper Eckert and John V. Mauchly was a general purpose computer.
It was very heavy, large and contained 18,000 vacuum tubes.
 EDVAC: Electronic Discrete Variable Automatic Computer was
designed by Von Neumann. It could store data as well as instruction
and thus the speed was enhanced.
 UNIVAC: Universal Automatic Computer were developed in 1952 by
Eckert and Mauchly.
Second Generation Computers:
Transistors (1956-1963):
Second generation computers used the technology of transistors instead of bulky
vacuum tubes. Another feature was the magnetic core storage. Transistor is a
device composed of semiconductor material that amplifies a signal or opens or
closes a circuit.

Transistors were invented in Bell Labs. Use of transistors made it possible to


perform powerfully and with due speed. It reduced the size and cost and
thankfully the heat too, which was generated by vacuum tubes. Central
Processing Unit (CPU), memory, programming language and input and output
units were also came into the force in the second generation.

Programming language was shifted from high level to assembly language and
made programming comparatively an easy task for programmers. Languages
used for programming in this era were FORTRAN (1956), ALGOL (1958) and
COBOL (1959). Examples: PDP-8, IBM1400 series, IBM 1620, IBM 7090,
CDC 3600.

Third Generation Computers:


Integrated Circuits. (1964-1971):
During the third generation, technology envisaged a shift from huge transistors
to integrated circuits, also known as IC. Here a number of transistors were
placed on silicon chips, called semiconductors. The main feature of this era’s
computer was the speed and reliability. IC, were made of silicon and also called
the silicon chips.

A single IC, has many transistors, registers and capacitors built on a single thin
slice of silicon. The cost size were reduced and memory space and working
efficiency was increased in this generation. Programming was now done in
Higher level language such as BASIC (Beginners All purpose Symbolic
Instruction Code). Mini computers find their shape in this era. Examples: NCR
395, B6500.. IBM 360,370

Fourth Generation Computers:


Micro-processors (1971-Present):
In 1971 First micro¬processors were used, large scale of integration LSI circuits
built on a single silicon chip called microprocessors. The main advantage of this
technology is that a single microprocessor can contain all the circuits required to
perform arithmetic, logic and control functions on a single chip.

The computers using microchips were called microcomputers. This generation


provided even smaller size of computers, with larger capacities. That is not
enough, after that Very Large Scale Integrated (VLSI) circuits replaced LSI
circuits. The Intel 4004chip, developed in 1971, located all the components of
the computer from the central processing unit and memory to input/ output
controls on a single chip and allowed the size to reduced drastically.

Technologies such as multiprocessing, multi programming, time¬sharing,


operating speed, and virtual storage made it more user friendly and common
device. The concept of personal computer and computer networks came into
being in the fourth generation. Examples: Apple II, Alter 8800
Fifth Generation Computers:
The technology behind the fifth generation computers is of artificial
intelligence. It allows the computers to behave like humans. It can be seen in
programmes like voice recognition, area of medicines and entertainment. In the
field of games playing also it has shown remarkable performance where
computers are capable of beating human competitors.

The speed is highest, size is the smallest and area of use has remarkably
increased in the fifth generation computers. Though not hundred per cent
artificial intelligence has been achieved till date but keeping in view the current
developments, it can be said that this dream will also become a reality very
soon.

In order to summarize the features of various generations of computers it can be


said that a gigantic improvement has been seen as far as the speed and accuracy
of functioning is concerned, but if we talk about the size, it is being small over
the years. The cost is also diminishing and reliability is of course increasing.

The first generation computers used the technology of vacuum tubes, which has
been replaced by transistors in the second generation and integrated circuits in
the third. The fourth generation envisaged the use of microprocessors and now
is the era of artificial intelligence.

6) Explain classification of computers based on size and speed.

 Supercomputers are extremely large, very expensive, and extremely


fast. They are used for solving complex mathematical computations and
are capable of executing trillions of instructions per second .
 Popular supercomputers are:
 PARAM
 CRAY 3
 IBM’s super MUC in Germany
 NUDT Tianhe-1A in China
 Mainframe computers are medium in size, expensive, and very fast. They
are used in large organizations for processing bulk data such as census
data, financial transactions, and airline reservations .
 Popular mainframe computers are:
 IBM 4300
 Fujitsu’s ICL VME
 Hitachi’s Z800
 Minicomputers are smaller than mainframes and microcomputers. They
are used in small to medium-sized businesses for processing data such as
inventory control, payroll processing, and accounting .
 Popular mini computers are
 K-202
 Texas instrument TI-990
 SDS-92
 IBM Midrange computers

 Microcomputers are the smallest and cheapest of all computers. They are
also known as personal computers (PCs) and are used for general-purpose
computing tasks such as word processing, browsing the internet, and
playing games .
 Popular micro computers
 Desktop computers
 Notebooks
 PDA’s, Tablet PC’s

7) Explain classification of computers based on functions and


operations.

1. Analog: An analog computer is a form of computer that uses the


continuously-changeable aspects of physical fact such as electrical,
mechanical, or hydraulic quantities to model the problem being
solved. Any thing that is variable with respect to time and continuous
can be claimed as analog just like an analog clock measures time by
means of the distance traveled for the spokes of the clock around the
circular dial.
2. Digital: A computer that performs calculations and logical operations
with quantities represented as digits, usually in the binary number
system of “0” and “1”, “Computer capable of solving problems by
processing information expressed in discrete form. from
manipulation of the combinations of the binary digits, it can perform
mathematical calculations, organize and analyze data, control
industrial and other processes, and simulate dynamic systems such as
global weather patterns.
3. Hybrid: A computer that processes both analog and digital data,
Hybrid computer is a digital computer that accepts analog signals,
converts them to digital and processes them in digital form.

8) What are five basic functions performed by a computer system.

Computers perform five basic functions, which are:


1. Input: This function involves the process of entering data and instructions
into the computer system. Input devices such as a keyboard, mouse,
scanner, microphone, and USB drives are used to input data and
instructions into the computer .
2. Processing: This function involves the manipulation of data by the
computer system. The central processing unit (CPU) is responsible for
processing data according to the instructions given by the user .
3. Output: This function involves the presentation of processed data or
information to the user. Output devices such as a monitor, printer, and
speakers are used to display or present processed data or information .
4. Storage: This function involves the process of storing data and
information on a computer system. Storage devices such as hard disks,
flash drives, and memory cards are used to store data and information on
a computer system .
5. Control: This function involves the process of controlling all operations
inside a computer system. The CPU is responsible for controlling all
operations inside a computer system .

9) Explain basic organization of digital computer with neat diagram.

Central processing unit:


The CPU is the brain of a computer where all kind of processing is done. This
unit takes the input data from the input device and processes it according to the
set of instruction called program.
The major function of CPU is to store the data temporarily in the registers and
perform arithmetical and logical computation.
CPU has two major parts called…
1. Arithmetic and logic unit
2. Control unit
 Arithmetic and logic unit:
 this is responsible for carrying out

(i). Arithmetical operational on data by adding, subtracting, multiplying and


dividing one set with another and

(ii) logical operations often known by comparing by using AND, OR, NOT and
exclusive OR operation which is done by analyzing and evaluating data by
matching it with a set of known data that are included in the program or called
from the memory.

 Control Unit
this unit is mainly used for generating the electronic control signals for the
synchronization of various operation.

2. Memory

1. Memory: memory in a computer is analogous to a notebook where we may


note down various things for future reference.

The memory can be classified into the following categories


· Primary memory
· Auxiliary or secondary memory
(i) Primary memory: main memory is the fastest memory in a digital
computer system. This memory is primarily used to store the data and program
temporarily during the execution of a program.

(ii) Auxiliary or Secondary memory: secondary memory or auxiliary


memory is used to store the operating system, compiler, assembler, application
programs, data file etc. those are not read by CPU directly.

3. Input/Output unit:

Data and instructions must enter the system, before any computation can be
performed,

the following function are performed by input unit.

i). It accepts the instructions and data from the outside world.
ii). It converts these instructions and data in computer readable form.
iii). It supplies the converted instruction and data to the computer system for
further processing.
Output unit:
the job of an output unit is just reverse of an input unit, it supplies the
information obtained from processed data to the outside world.

The following functions are performed by an output unit:

1). Accept the result produced by the computer and gives to the outside world;
2). It converts this codes result to human readable form.
3). It supplies the converted result to outside world.

10) What are the two main components of CPU? List the main
functions of each component.

Arithmetic logic unit (ALU)

Control unit

Arithmetic logic unit: It performs arithmetic operations (add, subtract,


multiply, divide, etc.) or logical operations (comparisons like equal to
,less than, greater than, etc.) on data to convert them into useful
information.

Control unit: This unit controls the operations of all parts of computer but
does not carry out any actual data processing operations. Functions of
control unit are:

It is responsible for controlling the transfer of data and instructions


among other units of a computer.

It manages and coordinates all the units of the computer.

It obtains the instructions from the memory, interprets them, and directs
the operation of the computer.

It communicates with input/output devices for transfer of data or results


from storage.
It does not process or store data.

11) Differentiate between primary and secondary memory.

Primary memory Secondary memory

Primary memory is temporary. Secondary memory is permanent.

Primary memory is directly Secondary memory is not directly


accessible by Processor/CPU. accessible by the CPU.

Nature of Parts of Primary memory


varies, RAM- volatile in nature. It’s always Non-volatile in nature.
ROM- Non-volatile.

Primary memory devices are more Secondary memory devices are less
expensive than secondary storage expensive when compared to
devices. primary memory devices.

The memory devices used for


The secondary memory devices are
primary memory are semiconductor
magnetic and optical memories.
memories.

Secondary memory is also known


Primary memory is also known as
as External memory or Auxiliary
Main memory or Internal memory.
memory.

Examples: RAM, ROM, Cache


Examples: Hard Disk, Floppy
memory, PROM, EPROM, Registers,
Disk, Magnetic Tapes, etc.
etc.

12) Write the full form of following abbreviations used in computer


technology

CPU-Central processing unit

ALU-Arithmetic logic unit

CU-Control unit
MU- Memory unit

ENIAC- Electronic numerical integrator and calculator

EDVAC- Electronic discrete variable automatic calculator

UNIVAC- Universal automatic computer

IBM- International business machine

DEC- Digital equipment corporation

ALGOL- Algorithmic language

BASIC- Beginners all-purpose symbolic instruction code

FORTRAN- Formula Translation

COBOL- Common business-oriented language

PL/I- Programming language/Implementation

IC- Integrated circuits

SSI- Small scale integration

MSI- Medium scale integration

LSI- Large scale integration

VLSI- Very large-scale integration

ULSI- Ultra large-scale integration

GIGO- Garbage in Garbage out

AI- Artificial Intelligence

PDA- Personal digital assistant

NASA- National aeronautics and space administration

LAN- Local area network

WAN- Wide area network


MAN- Metropolitan area network
Chapter -2 Number systems

1. What is a number system?

The writing system for denoting numbers using digits or symbols in a


logical manner is defined as a Number system.

2. Differentiate between positional and non- positional number


system?

Positional (or Weighted) Number System: A positional number system


is also known as weighted number system. As the name implies, there
will be a weight associated with each digit. According to its position of
occurrence in the number, each digit is weighted.
Few examples of positional number systems are decimal number system,
Binary number system, octal number system, hexadecimal number
system, BCD, etc.
Non-Positional (or Non-weighted) Number System: Non-positional
number system is also known as non-weighted number system. Digit
value is independent of its position. Few examples of non-weighted
number systems are gray code, roman code, excess-3 code, etc.

3. Write a note on different types of positional number system.

Types of Positional Number Systems


There are four very popular positional number systems, which are:
 Decimal Number System
 Binary Number System
 Octal Number System
 Hexadecimal Number System

Decimal Number System


The decimal number system is the most familiar number system for us. It is
called decimal number system because its base or radix is ten (10). This means,
it has 10 unique symbols, i.e. 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9 to represent different
numbers of the system. Also, there is no symbol for its base, i.e. for ten.
The decimal number system is a positional or weighted number system.
Binary Number System
The binary number system is also a positional number system or a weighted
number system. The base or radix of the binary number system is 2, which means
it has two unique symbols, i.e. 0 and 1 to represent numbers. Similar to decimal
number system, the base of the binary number system itself cannot be a symbol.
In the binary number system, each digit is called a bit (binary digit). Thus, a
binary number is nothing but a string of binary 0s and 1s.

Octal Number System


Octal Number System is again a type of positional number system. That means,
the value of a digit in an octal number depends upon its position in the number.
The base or radix of the octal number system is 8, thus, the octal number system
has eight unique symbols, i.e. 0, 1, 2, 3, 4, 5, 6, and 7.

Hexadecimal Number System


The hexadecimal number system is also a type of positional or weighted
number system. The base or radix of the hexadecimal number system is 16,
which means there are sixteen independent symbols present in this system. These
symbols are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F. All the numbers in
hexadecimal number system can be expressed using these symbols
4. What is a computer code?

Code is a symbolic representation of discrete elements of information,


which may be in the form of numbers, letters or any other varying
physical quantities. The symbol used is a string of binary digits 0 and 1,
these are arranged according to the rules of code. These codes are used to
communicate the information to the digital computer and to receive from
it.

5. What is a BCD? Explain.


Binary Coded Decimal, or BCD, is another process for converting decimal
numbers into their binary equivalents.

 It is a form of binary encoding where each digit in a decimal number


is represented in the form of bits.
 This encoding can be done in either 4-bit or 8-bit (usually 4-bit is
preferred).
 It is a fast and efficient system that converts the decimal numbers
into binary numbers as compared to the existing binary system.
The BCD equivalent of a decimal number is written by replacing each
decimal digit in the integer and fractional parts with its four bit binary
equivalent. The BCD code is more precisely known as 8421 BCD code,
with 8,4,2 and 1 representing the weights of different bits in the four-bit
groups.

DECIMAL NUMBER BCD

0 0000

1 0001

2 0010

3 0011

4 0100

5 0101

6 0110

7 0111

8 1000

9 1001

6.What is ASCII? Mention its types.

Short for American Standard Code for Information


Interchange, ASCII is a standard that assigns letters, numbers, and
other characters in the 256 slots available in the 8-bit code.
There are two types of ASCII codes:
ASCII-7
ASCII-8

7. Write a note on ASCII.

Short for American Standard Code for Information


Interchange, ASCII is a standard that assigns letters, numbers, and
other characters in the 256 slots available in the 8-bit code.
There are two types of ASCII codes:
ASCII-7
ASCII-8
The ASCII table, an abbreviation for American Standard Code for
Information Interchange, utilizes a 7-bit character encoding system to
represent 128 unique characters. These include both control and printable
characters.
A-O >65-79
P-Z >80-90
&
a-o >97-111
p-z >112-122

8. What is a Unicode?
Unicode is a standard for character encoding. The introduction of ASCII
characters was not enough to cover all the languages. Therefore, to overcome this
situation, it was introduced. The Unicode Consortium introduced this encoding
scheme.

9. What is the different Unicode encoding forms?

UTF stands for Unicode Transformation Format

 UTF-8: It uses 8 bits to represent the characters.


 UTF-16: It uses 16 bits to represent the characters.
 UTF-32: It uses 32 bits to represent the characters.

10. What is the need of Unicode?

1. It defines all the characters needed for writing the majority of known
languages in use today across the world.
2. It is a superset of all other character sets.
3. It is used to represent characters across different platforms and programs.
11. What are the features of Unicode?

 It is a global standard for encoding.


 It has support for the mixed-script computer environment.
 The encoding has space efficiency and hence, saves memory.
 It provides a unique number for every character, no matter what
platform, device, application or language.
 It has been adopted by all modern software providers and now allows
data to be transported through many different platforms, devices and
applications without corruption.

12.What is a Boolean algebra?

Boolean algebra is a type of algebra that is created by operating the


binary system. In the year 1854, George Boole, an English
mathematician, proposed this algebra. This is a variant of Aristotle’s
propositional logic that uses the symbols 0 and 1, or True and
False. Boolean algebra is concerned with binary variables and logic
operations.

13. What are the basic Boolean algebra operations? Explain.

 Logical complementation (‘), NOT Operation


 Logical multiplication (.), AND Operation
 Logical addition (+), OR Operation

Negation or NOT Operation:

Using the NOT operation reverse the value of the Boolean variable from 0 to 1
or vice-versa. This can be understood as:
 If A = 1, then using NOT operation we have (A)’ = 0
 If A = 0, then using the NOT operation we have (A)’ = 1
We also represent the negation operation as ~A, i.e if A = 1, ~A = 0

Conjunction or AND Operation:

Using the AND operation satisfies the condition if both the value of the
individual variables are true and if any of the value is false then this operation
gives the negative result. This can be understood as,
 If A = True, B = True, then A . B = True
 If A = True, B = False, Or A = false, B = True, then A . B = False
 If A = False, B = False, then A . B = False
Disjunction (OR) Operation:

Using the OR operation satisfies the condition if any value of the individual
variables is true, it only gives a negative result if both the values are false.
This can be understood as,
 If A = True, B = True, then A + B = True
 If A = True, B = False, Or A = false, B = True, then A + B = True
 If A = False, B = False, then A + B = False

13. Write the different boolean algebra laws.

1. Law of identity A+0=0+A=A


A.1=1.A=A
2. Communicative law (A+B)=(B+A)
(A.B) = (B.A)
3. Distributive law A+(B.C) =(A+B).(A+C)
A.(B+C) =(A.B)+(A.C)
4. Associative law A+(B+C) =(A+B) +C
A. (B.C) =(A.B).C
5. Complement law A+A’=1
A.A’=0
6. Absorption law A+A.B=A
A.(A+B) =A

14. What are principles of duality?

Here are some of the main steps used to solve the duality theorem
in boolean algebra:

 Change each AND operation to an OR operation.


 Change each OR operation to an AND operation.
 Replace 0 with 1.
 Replace 1 with 0.

Now, let me demonstrate several examples of the duality principles by


using the table that is provided below. In this table, the boolean
expression will be written in the first column, and the duals of that
expression will be written in the second column.

Expression Dual
1=0 0=1

0=1 1=0

1.0 = 0 0+1=1

0.1 = 0 1+0=1

1+0=1 0.1 = 0

0+1=1 1.0 = 0

A.0 = 0 A+1=1

A.A = 0 A+A=1

A.(B.C) = (A.B).C A + (B + C) = (A + B) + C
UNIT 1-(CHAPTER 3) COMPUTER SOFTWARE

1. Define the term hardware and software.

Software is the programs and routines for a computer or the program


material for an electronic device which make it run. An example of
software is Excel or Windows or iTunes. Word processing programs and
Internet browsers are examples of software.
Hardware refers to the physical elements of a computer. Also referred to as
the machinery or the equipment of the computer. Examples of hardware in
a computer are the keyboard, the monitor, the mouse and the processing
unit However, most of a computer’s hardware cannot be seen; It’s inside
the computer case.

2. What is a computer program?

The set of instructions used to perform a specific task to obtain a specific


result is termed as a computer program. The computer program is
generated by programmers or software developers. The code is then
processed and executed to provide the output of the program.

3. What is a software package?


A software package is a group of computer programs that can be licensed,
downloaded or subscribed to as a bundle of related products. The products
in the package may include executable programs, program documentation
and, in some cases, example files that show how the various components
work.
4. Explain types of software.

The two main categories of software are:


System software
Application software
System software: System software refers to the collection of programs
and software components that enable a computer or computing device to
function properly. It acts as an intermediary between the user and the
computer hardware, allowing the user to interact with the hardware and
use various applications and programs.
Types of System Software
1. Operating System
An operating system (OS) is a type of system software that manages a
computer’s hardware and software resources. It provides common services for
computer programs. An OS acts as a link between the software and the
hardware. Ex: MS-DOS, Windows, UNIX etc.

2. Programming Language Translator

Programming language translators are programs that translate code written in


one programming language into another programming language. Ex:
Assembler, Interpreter, Compiler etc.

3. Device Drivers(communication software)

Device drivers are a class of system software that minimizes the need for system
troubleshooting. Internally, the operating system communicates with hardware
elements. Device drivers make it simple to manage and regulate this
communication.
To operate the hardware components, the operating system comes with a variety
of device drivers. The majority of device drivers, including those for a mouse,
keyboard, etc., are pre-installed in the computer system by the businesses that
make computers.
5. Utility Software

System Software and application software interact through utility software. A


third-party product called utility software is created to lessen maintenance
problems and find computer system defects. It is included with your computer’s
operating system.
Ex: Antivirus software, Backup software etc.
Application software:
Application software is designed to satisfy a particular need of a particular
environment. Application software may consist of a single program or collection
of programs.
Some commonly known application software are:
 Word Processing Software: Word Processing Software can be
explained as software that has the functionalities of editing, saving,
and creating documents with Word Processor Software like Microsoft
Word.
 Spreadsheet Software: Spreadsheet Software is a kind of software that
deals with the worksheet where it works on some automated version to
perform numeric functions. For Example, Microsoft Excel.
 Database software: Database software is a software program used to
create, edit, and maintain database files and records. For ex, Microsoft
Access, oracle etc.
 Graphics Software: Graphics Software is a collection of programs
that allows user to create, edit and manipulate images or models
visually on a computer. For ex, Adobe Photoshop, Coreldraw etc.
 Personal Assistance software: Personal assistant is a software that
can perform tasks or services for an individual based on a combination
of user input. It has the ability to access information from a variety of
online sources. For ex, Google assistant, cortana etc.
 Educational Software: Educational Software is a software developed
for the purpose of teaching and learning. For ex, Google classroom,
Learning Management system (LMS) etc.
 Entertainment software: Entertainment software allows a computer
to be used as entertainment tool. For ex, Video games, Arcade games
etc.

5. Differentiate between system software and application software.


System Software Application Software

System Software maintains the system


Application software is built for
resources and gives the path for
specific tasks.
application software to run.

While high-level languages are


Low-level languages are used to write
used to write the application
the system software.
software.

While it’s a specific purpose


It is general-purpose software.
software.

Without system software, the system While Without application


stops and can’t run. software system always runs.

System software runs when the system


While application software runs as
is turned on and stops when the system
per the user’s request.
is turned off.

Example: System software is an Example: Application software is


operating system, etc. Photoshop, VLC player, etc.

Application software programming


System Software programming is more
is simpler in comparison to system
complex than application software.
software.

The Software that is designed to control, A set of computer programs


integrate and manage the individual installed in the user’s system and
hardware components and application designed to perform a specific task
software is known as system software. is known as application software.

A system software operates the system Application software runs in the


in the background until the shutdown of front end according to the user’s
the computer. request.
System Software Application Software

The system software has no interaction Application software connects an


with users. It serves as an interface intermediary between the user and
between hardware and the end user. the computer.

Application software is dependent


on system software because they
System software runs independently.
need a set platform for its
functioning.

6. What is a programming language?

A programming language is a computer language that is used


by programmers (developers) to communicate with computers. It is a
set of instructions written in any specific language ( C, C++, Java, Python)
to perform a specific task.

7. What is program coding?


Coding is the process of transforming ideas, solutions, and instructions into
the language that the computer can understand – that is, binary-machine
code.
Coding involves communicating and giving instructions for different
actions we want our computers to perform using a computer programming
language.

8. Define syntax rules of a programming language?

Every natural language has a systematic method of using the words and
symbols in that language defined by the grammar rules of the language.
Similarly, we need to use the words and symbols of a computer language
as per set rules is known as syntax rules of the language.

9. What is machine language?


Machine language is a low-level language made up of binary numbers or
bits that a computer can understand. It is also known as machine code or
object code and is extremely tough to comprehend. The only language that
the computer understands is machine language.

10. What are the advantages and limitations of machine language?


Advantages of machine language
High speed: Programs which are written in the machine language are quite
efficient because it takes shorter time for execution as compare to those
programs which are written in other language.
Translation free: No need of translation of the programs because those
program which are written in machine language are directly understood by
computer.
Machine Language Disadvantages
The major disadvantage of machine language is that the codes and
programs are complicated to write, memorize and execute.
Very tedious to resolve bugs and errors present in the codes and programs.
Not every individual can write or even memorize the code.
Writing codes in machine language take a considerable amount of time.

11. What is Assembly language?


Assembly language is a type of programming language that is designed to
be used by developers to write programs that can run directly on a
computer’s central processing unit (CPU). It is a low-level language, which
means it is closer to the machine code the CPU can execute, making it more
powerful than other higher-level languages such as C++, Java, or Python.
12. What is mnemonic?
Assembly level language is a low- level language in which operation codes
and operands are given in the form of alphanumeric symbols instead of 0’s
and 1’s. These alphanumeric symbols are known as mnemonic codes and
can combine in a maximum of five letter combinations such as ADD for
addition.
13. What are the advantages and limitations of assembly language?

Advantages of machine language:


Machine language programs can be replaced by mnemonics that are easier
to remember.
Efficient use of memory.
It is not necessary to keep track of memory locations.
The speed is faster.
Easy to insert and delete data.
The same result can be achieved with fewer instructions.
Disadvantages of machine language:
 Machine-dependent.
 lengthy code.
 error-prone (likely to generate errors).
 Coding or writing the program takes a lot of time, as it is more complex.
 The syntax is difficult to remember.
 Programs cannot be transferred between computers of different makes.
14. What is a High level language? What are the advantages and
disadvantages of High level language?

High level language is abbreviated as HLL. High level languages are


similar to the human language. Unlike low level languages, high level
languages are programmers friendly, easy to code, debug and maintain.
High level programs require compilers/interpreters to translate source code
to machine language. We can compile the source code written in high level
language to multiple machine languages. Thus, they are machine
independent language.

Advantages of High level language

1. High level languages are programmer friendly. They are easy to


write, debug and maintain.
2. It is machine independent language.
3. Easy to learn.
4. Less error prone, easy to find and debug errors.

Disadvantages of High level language

1. It takes additional translation times to translate the source to machine


code.
2. High level programs are comparatively slower than low level
programs.
3. Compared to low level programs, they are generally less memory
efficient.
4. Cannot communicate directly with the hardware.
15. What is a translator?
A program written in high-level language is called as source code. To
convert the source code into machine code, translators are needed.
A translator takes a program written in source language as input and
converts it into a program in target language as output.
It also detects and reports the error during translation.
16. Explain types of translator?
Compiler

Compiler is a translator which is used to convert programs in high-level language


to low-level language. It translates the entire program and also reports the errors
in source program encountered during the translation.

Interpreter

Interpreter is a translator which is used to convert programs in high-level


language to low-level language. Interpreter translates line by line and reports the
error once it encountered during the translation process.

Assembler

Assembler is a translator which is used to translate the assembly language code


into machine language code.
17. Differentiate between compiler and interpreter.

Compiler:
Performs the translation of a program as a whole.
Execution is faster.
Debugging is hard as the error messages are generated after scanning the
entire program only.
programming languages like C, C++ uses compilers.

Interpreter
Performs statement by statement translation.
Execution is slower.
It stops translation when the first error is met. Hence, debugging is easy.
programming languages like Python, BASIC, and Ruby uses interpreters.

What is a program planning?


Program planning is a process of designing and managing a collection of
related projects to achieve maximum efficiencies and benefits for an
organization. It involves defining policies, procedures, and processes to
follow and reach program goals and objectives.

18. What is Algorithm?


The word Algorithm means A set of finite rules or instructions to be
followed in calculations or other problem-solving operations.

19. What are the characteristics of an algorithm?

Each instruction should be precise and unambiguous.


Each instruction should be executed in a finite time.
No instruction should repeat infinitely. This ensures that the algorithm
terminates ultimately.
After executing the instructions, the desired results are obtained.

20. What is a Flow chart?


A flowchart is a type of diagram that represents a workflow or process. A
flowchart can also be defined as a diagrammatic representation of an
algorithm, a step-by-step approach to solving a task.

21. Differentiate between macro and micro flowchart.

A flowchart that outlines the main segments of program is known as


macro flowchart. It is also known as less detail flowchart.
The flowchart that shows all details necessary to capture exactly how a
process is done is known as micro flowchart. It is also known as detailed
flowchart.

22. What is the use of flowchart?


The following are the uses of a flowchart:
 It is a pictorial representation of an algorithm that increases the
readability of the program.
 Complex programs can be drawn in a simple way using a flowchart.
 It helps team members get an insight into the process and use this
knowledge to collect data, detect problems, develop software, etc.
 A flowchart is a basic step for designing a new process or adding extra
features.
 Communication with other people becomes easy by drawing
flowcharts and sharing them.

23. Write a note on Flowchart symbols.

1) Terminal: An oval flow chart shape indicating the start or end of the
process.

2) Input/Output:
A parallelogram that indicates data input or output (I/O) for a process.

3) Process

A rectangle shape is used to represent a process, action step or an operation.

4) Decision

A diamond flow chart shape indicates a branch in the process flow.


5) Connector

A small, labeled, circular flow chart shape used to indicate a jump in the
process flow.

6) Flow

Lines represent the flow of the sequence and direction of a process.


7) Subroutine
The subroutine allows us to write one subroutine and call it anywhere in
the code.
8) Document
This shape is used to represent a Document or Report in a process flow.

24. What is a pseudocode?

A Pseudocode is defined as a step-by-step description of an algorithm.


Pseudocode does not use any programming language in its representation
instead it uses the simple English language text as it is intended for human
understanding rather than machine reading.
Pseudocode is the intermediate state between an idea and its
implementation(code) in a high-level language.

25. What are the advantages and limitations of pseudocode?

Advantages of pseudocode:

It allows the designer to focus on main logic without being distracted by


programming languages syntax.

Since it is language independent, it can be translated to any computer


language code.

It allows designer to express logic in plain natural language.

It is easier to write actual code using pseudocode.

Unlike algorithms, pseudocodes are concise so pseudocodes are more


readable and easier to modify.

Disadvantages of pseudocode:

There are no accepted standards for writing pseudocodes and designer use
their own style while writing pseudocodes.

Pseudocode cannot be compiled and executed so its correctness cannot be


verified by using computers.
Chapter-4
1. Explain different types of microcomputers.
Desktop
The desktop computer is the one that is placed on the table. It is
connected to input and output devices such as keyboard, mouse, monitor,
and CPU. The desktop is not portable as it cannot be moved and is
restricted to a fixed area.
Laptop
The laptop appears like a notebook and can perform complex functions
like the desktop. The laptop runs on an in-built battery. Laptops are quite
expensive and are available in various sizes.
The laptop has an inbuilt screen, keyboard, touchpad, and has an inbuilt
processor. Laptops are portable as they can be taken anywhere and can
run on the battery backup.
Tablet
Tablet is a microcomputer that is smaller than a laptop and has a touch
screen interface. This touch screen interface is used for both entering the
data and for displaying the data. They operate on a chargeable inbuilt
battery and are handy and portable.
Smartphones
Smartphones are a smaller form of a table as they also have a touch
screen interface that can be used for performing both input and output
activities. Smartphones are pocket-sized device that operates on an inbuilt
chargeable battery.
PDA
PDA (personal digital assistant) is a portable handled computer. PDA is a
small size microcomputer that can be carried along almost anywhere.
PDA operates on an in-built chargeable battery.
We can even connect from other computers using the PDAs. In modern
days PDAs have been replaced by smartphones.

Workstation

The workstation works similarly to the server. Workstations are meant for
sharing data on the network at the workplace.

2. List out various characteristics of microcomputer.


 Affordable cost
 Small size
 Used by single user
 No need well training for using it
 Less power consuming
 Mostly designed for personal usage
 Use single integrated semiconductor chip
 Less processing power
 Produce less heat
 Mostly microcomputers are portable
 Several software can be run on the microcomputer
3. Write the applications of microcomputers.
 It is used in several applications such as word processing,
accounting, presentation, DBMS, etc.
 It is used in the integration of computing intelligence for improving
products, services, infrastructure, etc.
 This computer can be used in the microdata center sector.
 It is used in the defense area for training devices.
 It is used in IOT applications in the form of micro controllers such
as smart TV’s, refrigerators etc.
4. List the various characteristics of minicomputer.
It is smaller in size than a mainframe computer.
It is less expensive than a super and mainframe computer.
It is not much more powerful than the mainframe and supercomputer, but
powerful than microcomputers.
It supports multiprocessing and multi-tasking.

It can be used by small organizations and individuals.

5. Write the applications of minicomputer.

It is used in business accounting

o it is used as the sub computer of the mainframe computer; for example, it


is used in the sub-departments of an organization because it is cheaper than
a mainframe computer.
o A group of minicomputers can be created for creating its internal network.
o It is used for circulation, cataloging, series control, management,
acquisitions, communications, data retrieval, etc.

6. List the various characteristics of mainframe computer.


It allows to process huge amount of data simultaneously.
It is more popular due to their long life performance.
Mainframe application programs get outstanding performance due to their
large scaled memory management.
It is capable to share their over workload on the other multiple processors
and I/O terminals.
It has ability to manage different complicated operating systems such as
UNIX, VMS etc.
It supports centralized computing system.
It is capable to manage several users.
7. Write the applications of mainframe computer.
It is used in banking sector to maintain huge transactions.
It is used in health care organizations to maintain details about patient,
medicine etc.
It is used in Defense sector to pass massive information in different area
with protection such as land, ship, planes etc.
It is used in education sector to maintain details about teachers, students,
etc.
It is used in retail industry to maintain customer details, massive
transactions etc.
It is used in railway and airlines for ticket reservation, cancellation etc.
It is used in research center to maintain huge amount of data.
8. List the various characteristics of Supercomputer.
Supercomputers are able to solve large amount of claculations, and
complicated calculation as well.
Multiple users are capable to access supercomputer at same time.
Having more expensive so any ordinary users cannot purchase this
computer.
Use for special areas where high amount and complicated calculations
needs to be done.
Having vast number of processing units.
Having huge storage capacity.
9. Write the applications of supercomputer.

Supercomputers are used to detect various diseases and aid in the


production of excellent results in strokes, brain traumas, and other blood
flow problems in the body.
Virtual testing of nuclear explosions and weapon ballistics is made
possible with the use of supercomputing.
Climate trends may be studied and understood using a supercomputer
program
Supercomputers are used in scientific research fields. In addition, the
supercomputers are used for weather forecasting, meteorology, nuclear
energy research, and so on.
 Scientists use them to investigate the impacts of nuclear weapon
explosions.
10. Write a note on Central processing unit.
A Central Processing Unit, or CPU, is functionally the most important
component of a computer system. Without a CPU, any computer is more
or less non-functional. It is generally referred to as the ‘brain’ of the
computer due to the vast number of functions it performs.
A CPU can be installed or inserted into a CPU socket. These sockets are
usually located on the motherboard.
 It can perform various types of data processing operations.CPU can store
data, instructions, programs, and intermediate results.
 It controls the functions of all the significant parts of a computer.

The cpu can be divided into different functional units:


Registers
Control unit
ALU(Arithmetic logic unit)
A register is a tiny, fast storage memory within the central processing
unit (CPU) or the arithmetic logic unit (ALU) of a computer. Registers
are utilized for a variety of functions in handling and controlling
instructions and data and play an important role in the operation of a
computer’s CPU.
Types of Registers
1. Accumulator Register: The accumulator acts as a central point for
arithmetic and logical operations within the CPU. It fetches data
from memory and stores intermediate results during calculations.
Arithmetic operations such as addition, subtraction, multiplication,
and division often take place in the accumulator. The final result may
be stored in the accumulator or transferred to other registers or
memory locations.
Program Counter (PC) Register: The program counter is a special
register that keeps track of the memory address of the next instruction to
be fetched and executed.
4. Instruction Register (IR): The instruction register holds the
currently fetched instruction from memory. It allows the CPU to
decode and execute the instruction based on its opcode and operands.
Memory Address Register (MAR): The memory address
register stores the memory address of data or instructions to be accessed
or written in memory.
Memory Data Register (MDR): The Memory Data Register holds the
actual data fetched from or written to memory. When the CPU retrieves
data from memory, it is temporarily stored in the MDR before being
processed further.
1. Arithmetic and Logic Operations: The Registers are extensively
used during arithmetic and logic operations in the CPU. They
temporarily store operands, intermediate results, and flags facilitating
quick and efficient calculations.
Control Unit Operations: The Registers play a critical role in the
control unit of the CPU. They hold control signals and flags that
determine the control flow and sequencing of the instructions during
program execution.
11. What is a bus in computer system?
Alternatively known as an address bus, data bus, control bus, or local
bus, a bus is a link between components or devices connected to
a computer. For example, a bus carries data between a CPU and the
system memory via the motherboard.
12. What is a microprocessor?
A Microprocessor is an important part of a computer architecture
without which you will not be able to perform anything on your
computer. It is a programmable device that takes in input performs some
arithmetic and logical operations over it and produces the desired
output. In simple words, a Microprocessor is a digital device on a chip
that can fetch instructions from memory, decode and execute them and
give results.
13. What is RISC processor?
Reduced Instruction Set Computer (RISC) –
RISC or Reduced Instruction Set Computer is a computer architecture
where instruction is simple and designed to get executed quickly.
Instructions get completed in one clock cycle this is because of the
optimization of instructions and pipelining (a technique that allows for
simultaneous execution of parts, or stages, of instructions more
efficiently process instructions).
14. What is CISC processors?
Complex Instruction Set Computer (CISC) –
CISC or Complex Instruction Set Computer is a computer architecture
where instructions are such that a single instruction can execute multiple
low-level operations like loading from memory, storing into memory, or
an arithmetic operation, etc. It has multiple addressing nodes within a
single instruction.
15. What is Epic processors?
EPIC (Explicitly Parallel Instruction Computing)
It allows the instructions to compute parallelly by making use of compilers.
Moreover, the complex instructions also process in fewer clock frequencies.
Furthermore, it encodes the instructions in 128-bit bundles. Where each bundle
contains three instructions encoded in 41 bits each and a 5-bit template.

16. What is a bit?

A bit (short for "binary digit") is the smallest unit of measurement used to
quantify computer data. It contains a single binary value of 0 or 1.

17. What is a byte?

A unit of computer information or data-storage capacity that consists of a


group of eight bits and that is used especially to represent an
alphanumeric character.

18. Write a note on memory storage units.

Bit

In a computer, data is stored in the form of 0s and 1s. We can store each and
every data in a computer with the help of 0s and 1s. Each digit, either 0 or 1, is
called a Bit. The Bit is the smallest unit of memory. Bit simply refers to the
binary digit.
Nibble

Nibble is just a greater version of Bit. It is a combination of 4 bits of binary


digits or half of an Octet.
Byte: In computer systems, a unit of data that is eight binary digits long
is known as a byte. A byte is a unit that computers use to represent a
character such as a letter, number.

Word: A word “size” refers to the amount of data a CPU’s internal data
registers can hold and process at one time. Computers embedded in
word sizes of 8, 16, 32, or 64 bits.

Kilobyte(KB): A group of 1024 bytes are called a kilobyte. (1024


bytes=1KB)

Megabyte(MB): A group of 1024 kilobytes are called a megabyte. (1024


KB=1 MB)

Gigabyte(GB): A group of 1024 megabytes are called a gigabyte. (1024


MB=1GB)

Terabyte(TB): A group of 1024 gigabytes are called a terabyte. (1024


GB=1 TB)

Petabyte(PB): A group of 1024 terabytes are called a petabyte. (1024


TB=1PB)

Exabyte(EB): A group of 1024 petabytes are called an Exabyte. (1024


PB=1 EB)

19. Differentiate between hardware and software.


Hardware is a physical part of the Software is a set of instructions
computer that causes the processing that tells a computer exactly what
of data. to do.

It is manufactured. It is developed and engineered.

Hardware cannot perform any task The software can not be executed
without software. without hardware.

Electronic and other materials are Created by utilizing a computer


used to create hardware. language to write instructions.
Chapter 5 Input and Output devices

1. What is an input device? Give example.


Input device enables the user to send data, information, or control signals
to a computer.

Some of the popular input devices are:

1. Keyboard
2. Mouse
3. Scanner
4. Joystick
5. Light Pen
6. Digitizer
7. Microphone
8. Magnetic Ink Character Recognition (MICR)
9. Optical Character Reader (OCR)
10. Digital Camera
11. Webcam
12. Biometric Devices

2. Write a note on Keyboard.


The keyboard is a basic input device that is used to enter data into a
computer or any other electronic device by pressing keys. It has different
sets of keys for letters, numbers, characters, and functions. Keyboards are
connected to a computer through USB or a Bluetooth device for wireless
communication.
Types of keyboards: There can be different types of keyboards based on
the region and language used. Some of the common types of keyboards are
as follows:
QWERTY Keyboard:
It is the most commonly used keyboard with computers in modern times.
It is named after the first six letters of the top row of buttons and is even
popular in countries that do not use Latin-based alphabet. It is so popular
that some people think that it is the only type of keyboard to use with
computers as an input device.
AZERTY Keyboard:
It is considered the standard French keyboard. It is developed in France as
an alternative layout to the QWERTY layout and is mainly used in France
and other European countries. Some countries have manufactured their
own versions of AZERTY.
DVORAK Keyboard:

This type of keyboard layout was developed to increase the typing speed by
reducing the finger movement while typing. The most frequently used letters are
kept in a home row to improve typing.

3. Write a note on mouse.


The mouse is a hand-held input device which is used to move cursor or
pointer across the screen. It is designed to be used on a flat surface and
generally has left and right button and a scroll wheel between them.
Laptop computers come with a touchpad that works as a mouse.
It lets you control the movement of cursor or pointer by moving your
finger over the touchpad.
Some mouse comes with integrated features such as extra buttons to
perform different buttons.
The mouse was invented by Douglas C. Engelbart in 1963.
Trackball Mouse:
It is a stationary input device that has ball mechanism to move the pointer
or cursor on the screen.
The ball is half inserted in the device and can be easily rolled with finger,
thumb or the palm to move the pointer on the screen.
The device has sensor to detect the rotation of ball.
Mechanical Mouse:
It has a system of a ball and several rollers to track its movement.
It is a corded type of mouse.
Optical Mouse:
An optical mouse uses optical electronics to track its movement. It is more
reliable than a mechanical mouse and also requires less maintenance.
Cordless or Wireless Mouse:
As the name suggests, this type of mouse lacks cable and uses wireless
technology such as IrDA (infrared) or radio (Bluetooth or Wi-Fi) to control
the movement of the cursor.
4. What is a Scanner?

A computer scanner is a digitizer, a type of input device. It takes real-world


objects (e.g., a document or picture) and converts them to digital
information for a computer to store or manipulate. A scanner only sends
information to the computer and cannot receive information from the
computer like a printer (an output device).

5. What is a Digitizer?

A digitizer is a hardware device that receives analog information, such as


sound or light, and records it digitally.

For example, a digital camera is a digitizer. Light enters through the


camera lens, and the hardware and software inside the camera converts
that information to binary data, and stores it an image file.

6. What is MICR?

Magnetic ink character recognition is the string of characters at the bottom


left of a personal check that includes the account, routing, and check
numbers.

MICR numbers are designed to be readable by both individuals and sorting


equipment.

They can't be faked or copied, due to the use of magnetic ink and unique
fonts.

The benefits of the technology include enhanced security against fraud and
mechanization of check processing.

7. What is OCR?

Short for optical character recognition or optical character


reader, OCR is taking an image of letters or typed text and converting it
into data the computer understands. A good example is companies and
libraries taking physical copies of books, magazines, or old printed
material and using OCR to put them onto computers. While far from
perfect, OCR is currently the best method of digitizing typed pages of text.

8. What is OMR?

Short for optical mark reading or optical mark recognition, OMR is


gathering information from human beings by recognizing marks on a
document. OMR is accomplished using a hardware device (scanner) that
detects a reflection or limited light transmittance on or through a piece of
paper.

OMR allows the processing of hundreds or thousands of documents per


hour. For example, students may recall taking tests or surveys where they
filled in bubbles on paper with a pencil. Once the form had been completed,
a teacher or teacher's assistant would feed the cards into a system that
grades or gathers information from them.

9. What is bar code reader?

A barcode is a set of lines of different widths and sizes representing data,


that when read help identify the scanned object.

Barcodes are used to help organize and index information or prices about
an object.

Barcodes used by the U.S. postal service to help speed the delivery of mail
is an example of how a barcode could be used.

10. What is a smart card reader?

It is a data input device that reads data from a card shaped storage medium.

A memory card reader is a device used for communication with a smart


card or a memory card.

A magnetic card reader is a device used to read magnetic stripe cards, such
as credit cards.

A business card reader is a device used to scan and electronically save


printed business cards.

11. Explain any five input devices?


Keyboard
The keyboard is the most frequent and widely used input device for entering
data into a computer. Although there are some additional keys for performing
other operations, the keyboard layout is similar to that of a typical typewriter.
Generally, keyboards come in two sizes: 84 keys or 101/102 keys but currently
keyboards with 104 keys or 108 keys are also available for Windows and the
Internet.
Types of Keys
 Numeric Keys

Typing Keys

Control Keys

Special Keys
Function Keys

Mouse
The most common pointing device is the mouse. The mouse is used to move a
little cursor across the screen while clicking and dragging. The cursor will stop
if you let go of the mouse. The computer is dependent on you to move the
mouse; it won’t move by itself. As a result, it’s an input device.
The left mouse button can be used to select or move items, while the right mouse
button when clicked displays extra menus.

Joystick
A joystick is a pointing device that is used to move the cursor on a computer
screen. A spherical ball is attached to both the bottom and top ends of the stick.
In a socket, the lower spherical ball slides. You can move the joystick in all four
directions.

Track Ball
Track Ball is an accessory for notebooks and laptops, which works on behalf of
a mouse. It has a similar structure to a mouse. Its structure is like a half-inserted
ball and we use fingers for cursor movement. Different shapes are used for this
like balls, buttons, or squares.
Optical Mark Reader (OMR)
An Optical Mark Reader is a device that is generally used in educational
institutions to check the answers to objective exams. It recognizes the marks
present by pencil and pen.

12. What is an output device? Give example.


Output Devices are the devices that show us the result after giving the input to
a computer system. Output can be of many different forms like image, graphic
audio, video, etc.
Example: Monitor
Printer
Television
Speakers

13. Write a note on monitors.


Monitors, also known as Visual Display Units (VDUs), are a computer’s
primary output device. It creates images by arranging small dots, known as
pixels, in a rectangular pattern. The amount of pixels determines the image’s
sharpness.
The two kinds of viewing screens used for monitors are described below.
 Cathode-Ray Tube (CRT) Monitor: Pixels are minuscule visual
elements that make up a CRT display. The higher the image quality or
resolution, the smaller the pixels.
 Flat-Panel Display Monitor: In comparison to the CRT, a flat-panel
display is a type of video display with less volume, weight, and power
consumption. They can be hung on the wall or worn on the wrist.
Flat-panel displays are currently used in calculators, video games, monitors,
laptop computers, and graphical displays.

14. Write a note on printers.

Printers are output devices that allow you to print information on paper. There
are certain types of printers which are described below.
 Impact Printers
 Character Printers
 Line Printers
 Non-Impact Printers
 Laser Printers
 Inkjet Printers

Printer

Impact Printer
Characters are printed on the ribbon, which is subsequently crushed against the
paper, in impact printers. The following are the characteristics of impact
printers:
 Exceptionally low consumable cost.
 Quite noisy
 Because of its low cost, it is ideal for large-scale printing.
 To create an image, there is physical contact with the paper.
Character Printers
Character Printer has the capability to print only one character at a time. It is of
two types.
 Dot Matrix Printer
 Daisy Wheel
Line Printers
Line Printers are printers that have the capability to print one line at a time. It is
of two types.
 Drum Printer
 Chain Printer
Non-Impact Printers
Characters are printed without the need for a ribbon in non-impact printers.
Because these printers print a full page at a time, they’re also known as Page
Printers. The following are the characteristics of non-impact printers:
 Faster
 They don’t make a lot of noise.
 Excellent quality
 Supports a variety of typefaces and character sizes
Laser Printers
Laser Printers use laser lights for producing dots which will produce characters
on the page.
Inkjet Printers
Inkjet printers are printers that use spray technology for printing papers. High-
quality papers are produced in an Inkjet printer. They also do color printing.
15. What is a projector?
Projectors are optical devices that have the work to show visuals on both
types of screens, stationary and moving both. It helps in displaying
images on a big screen. Projectors are generally used in theatres,
auditoriums, etc.
16. What is a speaker?
Speakers are devices that produce sound after getting a command from a
computer. Nowadays, speakers come with wireless technology also like
Bluetooth speakers.
17. Write a note on Output devices.
Output Devices
Output Devices are the devices that show us the result after giving the input to
a computer system. Output can be of many different forms like image, graphic
audio, video, etc. Some of the output devices are described below.
Monitor
Monitors, also known as Visual Display Units (VDUs), are a computer’s
primary output device. It creates images by arranging small dots, known as
pixels, in a rectangular pattern. The amount of pixels determines the image’s
sharpness.
The two kinds of viewing screens used for monitors are described below.
 Cathode-Ray Tube (CRT) Monitor: Pixels are minuscule visual
elements that make up a CRT display. The higher the image quality or
resolution, the smaller the pixels.
 Flat-Panel Display Monitor: In comparison to the CRT, a flat-panel
display is a type of video display with less volume, weight, and power
consumption. They can be hung on the wall or worn on the wrist.
Flat-panel displays are currently used in calculators, video games, monitors,
laptop computers, and graphical displays.
Printer
Printers are output devices that allow you to print information on paper. There
are certain types of printers which are described below.
 Impact Printers
 Character Printers
 Line Printers
 Non-Impact Printers
 Laser Printers
 Inkjet Printers
Impact Printer
Characters are printed on the ribbon, which is subsequently crushed against the
paper, in impact printers. The following are the characteristics of impact
printers:
 Exceptionally low consumable cost.
 Quite noisy
 Because of its low cost, it is ideal for large-scale printing.
 To create an image, there is physical contact with the paper.
Character Printers
Character Printer has the capability to print only one character at a time. It is of
two types.
 Dot Matrix Printer
 Daisy Wheel
Line Printers
Line Printers are printers that have the capability to print one line at a time. It is
of two types.
 Drum Printer
 Chain Printer
Non-Impact Printers
Characters are printed without the need for a ribbon in non-impact printers.
Because these printers print a full page at a time, they’re also known as Page
Printers. The following are the characteristics of non-impact printers:
 Faster
 They don’t make a lot of noise.
 Excellent quality
 Supports a variety of typefaces and character sizes
Laser Printers
Laser Printers use laser lights for producing dots which will produce characters
on the page.
Inkjet Printers
Inkjet printers are printers that use spray technology for printing papers. High-
quality papers are produced in an Inkjet printer. They also do color printing.
Speakers
Speakers are devices that produce sound after getting a command from a
computer. Nowadays, speakers come with wireless technology also like
Bluetooth speakers.
Projector
Projectors are optical devices that have the work to show visuals on both types
of screens, stationary and moving both. It helps in displaying images on a big
screen. Projectors are generally used in theatres, auditoriums, etc.

18. What is a computer memory?


Computer memory is just like the human brain. It is used to
store data/information and instructions. It is a data storage unit or a data storage
device where data is to be processed and instructions required for processing are
stored. It can store both the input and output can be stored here.

19. What is a cache memory?


It is a type of high-speed semiconductor memory that can help the CPU
run faster. Between the CPU and the main memory, it serves as a buffer.
It is used to store the data and programs that the CPU uses the most
frequently.
20. What is primary memory? Give example.
It is also known as the main memory of the computer system. It is used to
store data and programs or instructions during computer operations. It
uses semiconductor technology and hence is commonly called
semiconductor memory. Primary memory is of two types:
RAM (Random Access Memory)
ROM (Read Only Memory)
21. What is a volatile memory?
Volatile memory is used to store information based on power supply. If
the power supply is off, all the data and information on this memory will
be lost. For example, RAM (Random Access Memory).

22. Write a note on primary memory?


RAM. The term is based on the fact that any storage location can be
accessed directly by the processor.
Dynamic RAM. DRAM is a type of semiconductor memory that is
typically used by the data or program code needed by a computer processor
to function.
Static RAM. SRAM retains data bits in its memory for as long as power
is supplied to it. Unlike DRAM, which stores bits in cells consisting of a
capacitor and a transistor, SRAM does not have to be periodically
refreshed.
 D RAM (Dynamic RAM): D RAM uses capacitors and transistors
and stores the data as a charge on the capacitors. They contain
thousands of memory cells. It needs refreshing of charge on capacitor
after a few milliseconds. This memory is slower than S RAM.
ROM (Read Only Memory): It is a non-volatile memory. Non-volatile
memory stores information even when there is a power supply failed/
interrupted/stopped. ROM is used to store information that is used to
operate the system. As its name refers to read-only memory, we can only
read the programs and data that is stored on it.
 PROM (Programmable Read Only Memory): This read-only
memory is modifiable once by the user. The user purchases a blank
PROM and uses a PROM program to put the required contents into the
PROM. Its content can’t be erased once written.
 EPROM (Erasable Programmable Read Only
Memory): EPROM is an extension to PROM where you can erase the
content of ROM by exposing it to Ultraviolet rays for nearly 40
minutes.
 EEPROM (Electrically Erasable Programmable Read Only
Memory): Here the written contents can be erased electrically. You
can delete and reprogramme EEPROM up to 10,000 times.
23. What is secondary memory? Give example.
It is also known as auxiliary memory and backup memory. It is a non-
volatile memory and used to store a large amount of data or information.
The data or information stored in secondary memory is permanent, and it
is slower than primary memory. A CPU cannot access secondary memory
directly. The data/information from the auxiliary memory is first
transferred to the main memory, and then the CPU can access it.
Magnetic Tapes
Optical Disks
CD – ROM

24. What is a non volatile memory?


non-volatile memory is used to store information even when the power
supply is off. For example, ROM (Read Only Memory).

25. Write a note on secondary memory.


Hard Disk: A hard disk is a part of a unit called a hard disk drive. It is
used to storing a large amount of data. Hard disks or hard disk drives
come in different storage capacities.(like 256 GB, 500 GB, 1 TB, and 2
TB, etc.).
Floppy Disk: A floppy disk consists of a magnetic disc in a square plastic
case. It is used to store data and to transfer data from one device to another
device. Floppy disks are available in two sizes (a) Size: 3.5 inches, the
Storage capacity of 1.44 MB (b) Size: 5.25 inches, the Storage capacity
of 1.2 MB. To use a floppy disk, our computer needs to have a floppy disk
drive. This storage device becomes obsolete now and has been replaced
by CDs, DVDs, and flash drives.
Compact Disc: A Compact Disc (CD) is a commonly used secondary
storage device. It contains tracks and sectors on its surface. Its shape is
circular and is made up of polycarbonate plastic. The storage capacity of
CD is up to 700 MB of data.
Digital Versatile Disc: A Digital Versatile Disc also known as DVD it is
looks just like a CD, but the storage capacity is greater compared to CD,
it stores up to 4.7 GB of data. DVD-ROM drive is needed to use DVD on
a computer.
Flash Drive: A flash drive or pen drive comes in various storage
capacities, such as 1 GB, 2 GB, 4 GB, 8 GB, 16 GB, 32 GB, 64 GB, up
to 1 TB. A flash drive is used to transfer and store data. To use a flash
drive, we need to plug it into a USB port on a computer. As a flash drive
is easy to use and compact in size, Nowadays it is very popular.

26. Differentiate between primary and secondary memory.

Primary memory Secondary memory

Primary memory is temporary. Secondary memory is permanent.

Primary memory is directly accessible Secondary memory is not directly


by Processor/CPU. accessible by the CPU.

Nature of Parts of Primary memory


varies, RAM- volatile in nature. It’s always Non-volatile in nature.
ROM- Non-volatile.

Primary memory devices are more Secondary memory devices are less
expensive than secondary storage expensive when compared to
devices. primary memory devices.

Examples: RAM, ROM, Cache


Examples: Hard Disk, Floppy Disk,
memory, PROM, EPROM, Registers,
Magnetic Tapes, etc.
etc.

27. Explain the steps involved during program execution.

Every file that contains a C program must be saved with ‘.c’ extension. This is
necessary for the compiler to understand that this is a C program file. Suppose
a program file is named, first.c. The file first.c is called the source file which
keeps the code of the program. Now, when we compile the file, the C compiler
looks for errors. If the C compiler reports no error, then it stores the file as a .obj
file of the same name, called the object file. So, here it will create the first.obj.
This .obj file is not executable. The process is continued by the Linker which
finally gives a .exe file which is executable.
Linker: First of all, let us know that library functions are not a part of any C
program but of the C software. Thus, the compiler doesn’t know the operation
of any function, whether it be printf or scanf. The definitions of these functions
are stored in their respective library which the compiler should be able to link.
This is what the Linker does. So, when we write #include, it includes stdio.h
library which gives access to Standard Input and Output. The linker links the
object files to the library functions and the program becomes a .exe file. Here,
first.exe will be created which is in an executable format.
Loader: Whenever we give the command to execute a particular program, the
loader comes into work. The loader will load the .exe file in RAM and inform
the CPU with the starting point of the address where this program is loaded.

CPU Registers

Instruction Register: It holds the current instructions to be executed by the


CPU.
Program Counter: It contains the address of the next instructions to be
executed by the CPU.
Accumulator: It stores the information related to calculations.
The loader informs Program Counter about the first instruction and initiates the
execution. Then onwards, Program Counter handles the task.
28. What is a microcontroller?
A Microcontroller is a small, programmable computer chip that controls
specific tasks within an electronic device. It is a type of microprocessor,
but unlike a general-purpose microprocessor, a microcontroller is
specifically designed for embedded systems, which are computer systems
that are integrated into other devices and perform a specific function.

29. Write a note on types of microcontrollers.


Types of Microcontroller:
Here are some of the most common types of microcontrollers:
 8-bit Microcontrollers: It can process 8-bit of data at a time. These
are the most basic type of microcontrollers, typically used in simple
applications such as toys, small appliances, and remote controls. They
have a limited processing power and memory capacity, but they are
easy to use and cost-effective.
 16-bit Microcontrollers: It can process 16-bit of data at a
time.These are more advanced than 8-bit microcontrollers and are
capable of performing more complex tasks. They are commonly used
in applications such as medical devices, automotive systems, and
industrial control systems.
 32-bit Microcontrollers:It can process 32-bit of data at a
time. These are the most powerful and feature-rich microcontrollers,
capable of handling large amounts of data and performing high-speed
processing. They are used in applications such as gaming systems,
multimedia devices, and high-end industrial automation.

Memory:

 External Memory Microcontroller – When an embedded structure is built


with a microcontroller which does not comprise of all the functioning
blocks existing on a chip it is named as external memory microcontroller.
For illustration- 8031 microcontroller does not have program memory on
the chip.
 Embedded Memory Microcontroller – When an embedded structure is
built with a microcontroller which comprise of all the functioning blocks
existing on a chip it is named as embedded memory microcontroller. For
illustration- 8051 microcontroller has all program & data memory, counters
& timers, interrupts, I/O ports and therefore its embedded memory
microcontroller.
Instruction Set:

 CISC- CISC means complex instruction set computer, it allows the user to
apply 1 instruction as an alternative to many simple instructions.
 RISC- RISC means Reduced Instruction Set Computers. RISC reduces the
operation time by shortening the clock cycle per instruction.

30. Explain block diagram of microcontrollers.

Any electric appliance that stores, measures, displays information or


calculates comprise of a microcontroller chip inside it. The basic structure
of a microcontroller comprise of:-
CPU – Microcontrollers brain is named as CPU. CPU is the device which
is employed to fetch data, decode it and at the end complete the assigned
task successfully. With the help of CPU all the components of
microcontroller is connected into a single system.

Memory – In a microcontroller memory chip works same


as microprocessor. Memory chip stores all programs & data.
Microcontrollers are built with certain amount of ROM or RAM (EPROM,
EEPROM, etc) or flash memory for the storage of program source codes.

Input/output ports – I/O ports are basically employed to interface or drive


different appliances such as- printers, LCD’s, LED’s, etc.
Serial Ports – These ports give serial interfaces amid microcontroller &
various other peripherals such as parallel port.

Timers – A microcontroller may be in-built with one or more timer or


counters. The timers & counters control all counting & timing operations
within a microcontroller. The main operations performed by timers’ are-
pulse generations, clock functions, frequency measuring, modulations,
making oscillations, etc.

ADC (Analog to digital converter) – ADC is employed to convert analog


signals to digital ones. The input signals need to be analog for ADC. The
digital signal production can be employed for different digital applications
(such as- measurement gadgets).

Interpret Control- This controller is employed for giving delayed control


for a working program. The interpret can be internal or external.

31. List the applications of microcontrollers.

Microcontrollers are used in a wide range of electronic devices and systems,


including:
1. Home Appliances: Many home appliances, such as washing machines,
refrigerators, and air conditioners, use microcontrollers to perform
various functions, such as temperature control, timing, and
monitoring.
2. Automotive Systems: Microcontrollers are used in automotive
systems, such as engine control units, anti-lock braking systems, and
airbag systems, to control various functions and ensure safe and
efficient operation.
3. Medical Devices: Medical devices, such as insulin pumps, heart
monitors, and blood glucose meters, use microcontrollers to perform
various functions and provide accurate and reliable results.
4. Industrial Control Systems: Microcontrollers are used in industrial
control systems, such as robotics, process control systems, and
manufacturing equipment, to control and monitor various processes
and operations.
5. Consumer Electronics: Many consumer electronics devices, such as
digital cameras, gaming systems, and audio players, use
microcontrollers to perform various functions and provide advanced
features and capabilities.
6. IoT Devices: Internet of Things (IoT) devices, such as smart home
systems, wearables, and environmental sensors, use microcontrollers
to connect to the internet and perform various functions.
7. Aerospace and Defense Systems: Microcontrollers are used in
aerospace and defense systems, such as satellites, avionics, and
missiles, to control and monitor various functions and ensure safe and
efficient operation.

32. Difference between microcontroller and microprocessor.

Microcontroller Microprocessor

A microcontroller is a specialized The microprocessor is designed to


form of a microprocessor be general-purpose.

It is cost-effective. It is a silicon chip

It is self-sufficient. It is a dependent unit

The microcontroller is used to perform The Microprocessor is


a particular tasks. used to perform a certain task.

Its power consumption is low. Its power consumption is high.

It contains CPU, RAM, ROM, It requires a combination of timers,


Registers, Timer and input/output controllers
ports. memory chips.
Chapter -6 Operating system fundamentals
1. What is an operating system?
An Operating System (OS) is a software that acts as an interface between
computer hardware components and the user. Every computer system must
have at least one operating system to run other programs. Applications like
Browsers, MS Office, Notepad Games, etc., need some environment to run
and perform its tasks.
The OS helps you to communicate with the computer without knowing
how to speak the computer’s language. It is not possible for the user to use
any computer or mobile device without having an operating system.

2. What are the objectives of operating system?

 Make a computer system easier to use: An operating system hides


details of hardware resources from programmers and other users and
provides them with a convenient interface for using computer
system.
 Manage the resources of a computer system: An operating system
manages all the resources of a computer system. This involves
performing such tasks as keeping track of who is using what
resources.
 Ability to evolve an operating system: An operating system
constructed in such a way as to permit effective development,
testing, and introduction of new system functions without interfering
with service.

3. Write various functions performed by an operating system.

Process management

Memory management

File management

Device management

Security

Command interpretation

Control over system performance

Error detection and response


Process management: In a multi-programming environment, the OS
decides the order in which processes have access to the processor, and
how much processing time each process has. This function of OS is
called Process Scheduling. An Operating System performs the following
activities for Processor Management.

Keeps track of the status of processes.

Allocates the CPU that is a processor to a process.

De-allocates processor when a process is no longer required.

Memory management: The operating system manages the Primary


Memory or Main Memory. An operating system does the following
activities for memory management.

It keeps track of primary memory

In multiprogramming, the OS decides the order in which processes are


granted memory access, and for how long.
It Allocates the memory to a process when the process requests it.
It deallocates the memory when the process has terminated or is
performing an I/O operation.

File Management
A file system is organized into directories for efficient or easy navigation and
usage. These directories may contain other directories and other files. An
Operating System carries out the following file management activities.

It keeps track of where information is stored, user access settings, the status of
every file.
It decides who gets the resources.

Device Management

The operating system manages the communication between the computer system
and the peripheral devices connected to the I/O port of the system. Peripheral
devices use their respective drivers to communicate with the system. The
operating system determines which program or process is accessed by which
connection and device. It also makes sure when a program is executed or
terminated, it will stop the communication between the device and the computer
system.
Security:

Computer security is a very important aspect of any operating system. The


reliability of an operating system is determined by how much better security it
provides us. Modern operating systems use a firewall for security. A firewall is a
security system that monitors every activity happening in the computer and
blocks that activity in case of any threat.

Command interpretation:

Command interpretation module takes care of interpreting user commands, and


directing system resources to process the commands. With this mode of
interaction with system users are not much concerned about hardware details of
the system.

Controlling System Performance

One of the most important functions of the operating system is controlling the
system's health. For this purpose, it monitors and observes the delay time between
a service being requested and the requested service being served. This delay time
is reduced as much as possible to improve the overall performance of the system.

Error detection and response:

A variety of errors can occur while a computer system is running. These include
internal and external hardware errors, such as a memory error, a device failure
and various software errors. In each case, the operating system must provide a
response that clears the error condition with the least impact on running
applications.

4. What is Uniprogramming operating system?

Uniprogramming means one program sits in the main memory at a time.


Uniprogramming was used in old computers and mobiles.

When the computer starts then the operating system and application
programs are loaded into main memory.

In old operating systems (OS) only one program runs on the computer at a
time.

Either of the browser, calculator or word processor runs at a time.

These types of operating systems in which one program runs at a time are
known as Uniprogramming operating systems.
5. Differentiate between CPU bound and I/O bound jobs.

CPU bound jobs: These jobs mostly perform computations with little I/O
operations. Hence, their CPU utilization is more. For example, multiplying
small matrices, is likely to be CPU bound.

I/O bound jobs: These jobs mostly perform I/O operations with little
computation. Hence their CPU utilization is very low. For example,
counting the number of lines in a file is likely to be I/O bound.

6. What are the advantages and limitations of uniprogramming


operating system?

Advantages:

The system of uniprogramming memory can be a small unit so it is easy to


design.

Uniprogramming memory management system is moderate without bug.

It additionally executes with minimal overhead.

Once an application is stacked, that application is ensured 100% of the


processor’s time, since no different procedure will intrude on it.

Uniprogramming memory management systems are suitable for the


embedded system.

Disadvantages:

Due to lack of protection scheme, one batch job can affect pending jobs.

Wastage of CPU time.

No user interaction.

7. What is multiprogramming operating system.

Multiprogramming in an operating system as the name suggests multi


means more than one and programming means the execution of the
program. when more than one program can execute in an operating
system then this is termed a multiprogramming operating system.

Before the concept of Multiprogramming, computing takes place in other


way which does not use the CPU efficiently. Earlier, CPU executes only
one program at a time. In earlier day’s computing, the problem is that
when a program undergoes in waiting state for an input/output operation,
the CPU remains idle which leads to underutilization of CPU and thus
poor performance. Multiprogramming addresses this issue and solve this
issue.

Multiprogramming was developed in 1950s. It was first used in


mainframe computing.

8. What are the advantages and limitations of multiprogramming


operating system?

Advantages of multiprogramming systems

 CPU is used most of time and never become idle


 The system looks fast as all the tasks runs in parallel
 Short time jobs are completed faster than long time jobs
 Multiprogramming systems support multiple users
 Resources are used nicely
 Response time is shorter
 In some applications multiple tasks are running and multiprogramming
systems better handle these type of applications

Disadvantages of Multiprogramming
Prior knowledge of scheduling algorithms is required.
If it has a large number of jobs, then long-term jobs will have to
require a long wait.
Memory management is needed in the operating system because all
types of tasks are stored in the main memory.
Using multiprogramming up to a larger extent can cause a heat-up
issue.

9. What is multitasking operating system?

The operating system that runs more than one task at a time is known as a
multitasking operating system (MOS). MOS can be desktop or mobile
operating system (OS).

Different tasks run in the OS are MS Word, MS Excel, email application,


browser, media player, OS services etc. End users use all these programs at
the same time.
10.What is a context switch?

Context Switching refers to the process/method used by the system to


change the process from one state to another using the CPU present in the
system to perform its job.

11.What are the advantages and limitations of multitasking operating


system?

Pros of Multi-Tasking Operating System


 Multi-Tasking Operating System is capable of executing multiple
application simultaneously without slowing down the system.
 A multitasking OS can effectively manage I/O devices, RAM, hard disks,
CPUs, and other computer resources.
 In Multi-Tasking Operating a user is capable of executing multiple
programs at the same time, such as games, browser, MS Word, and other
services.
Cons of Multi-Tasking Operating System
 As a single processor is executing multiple processes at the same time
then there will be load on CPU and CPU may gets heat up.
 Computer system will be lagging if the processor is slow in Multi-
Tasking Operating System while executing multiple programs
simultaneously.

12. What is multiprocessing operating system?


 Multi-processing operating system consists of multiple CPUs. Each
CPU is connected to the main memory.
 The task to be performed is divided among all the processors.
 For faster execution and improved performance, each processor is
assigned a specific task.
 Once all the tasks of each processor are completed, they are compiled
together in order to produce a single output.
 The allocation of resources for each processor is handled by the
operating system. This process results in better utilization of the
available resources and improved performance.

13.What are the advantages and limitations of multiprocessing operating


system?

Advantages
 Failure of one processor does not affect the functioning of other
processors.
 It divides all the workload equally to the available processors.
 Makes use of available resources efficiently.
Disadvantages
 Symmetrical multiprocessing OS are more complex.
 They are costlier.
 Synchronization between multiple processors is difficult.

14.What is time sharing operating system?


Time sharing operating system allows the user to perform more than one
task at a time, each task getting the same amount of time to execute. A
short duration of time is chosen for each process. This time duration is
known as time slot, time slice or quantum.

Suppose three processes namely, A, B, C are running on the system. Now,


suppose that the quantum is 4 nanoseconds (ns). Now they will execute in
the following manner.

Process A will execute for 4 ns, as soon as it gets over, process B starts
executing for a duration of 4 ns. Further when B gets complete, process C
executes for 4 ns. This process continues till all the processes is very fast.
Hence the user feels that all the processes are running at the same time.

15.What are the advantages and limitations of Time-sharing operating


system?

Advantages
1. Each task gets an equal opportunity.
2. Fewer chances of duplication of software.
3. CPU idle time can be reduced.
Disadvantages
1. Reliability problem.
2. One must have to take of the security and integrity of user programs
and data.
3. Data communication problem.

16.Write a note on system program?

System programs are nothing but a special software which give us facility
to manage and control the computer’s hardware and resources.
Status Information: Information like date, time amount of available
memory, or disk space is asked by some users.

File Modification: For modifying the contents of files, we use this.

Programming-Language support: For common programming


languages, we use Compilers, Assemblers, Debuggers, and
interpreters which are already provided to users. It provides all support
to users.

Program Loading and Execution: When the program is ready after


Assembling and compilation, it must be loaded into memory for
execution. A loader is part of an operating system that is responsible
for loading programs and libraries. It is one of the essential stages for
starting a program.

Communications: connections among processes, users, and computer


systems are provided by programs. User can send e-mail, browsing on
web pages, remote login, the transformation of files from one user to
another.

17.Write a note on application program.

The term “application software” refers to software that performs specific


functions for a user. When a user interacts directly with a piece of
software, it is called application software. The sole purpose of application
software is to assist the user in doing specified tasks. Microsoft Word and
Excel, as well as popular web browsers like Firefox and Google Chrome,
are examples of application software. It also encompasses the category of
mobile apps, which includes apps like WhatsApp for communication and
games like Candy Crush Saga.

Here is some application software:

 Word Processing Software: Word Processing Software can be


explained as software that has the functionalities of editing, saving,
and creating documents with Word Processor Software like Microsoft
Word.
 Spreadsheet Software: Spreadsheet Software is a kind of software
that deals with the worksheet where it works on some automated
version to perform numeric functions. For Example, Microsoft Excel.
 Presentation Software: It is a type of application software that is used
to present some applications like newly launched functions, products,
etc. For Example, Microsoft PowerPoint.
 Educational Software: Due to the enhancement of the Internet, there are
so many educational software runs in the market. It consists of Language
learning Software, Classroom Management Software, etc.
 Graphics Software: Graphics Software is also used in large amounts.
There are so many applications where it is used. Some of the applications
include Canva, Adobe, Photoshop, etc.

18.Write a note on Utilities.

Utility Software is a type of software which is used to analyse and


maintain a computer. This software is focused on how OS works on that
basis it performs tasks to enable the smooth functioning of the computer.
Antivirus, backup software, file manager, and disk compression tool all
are utility software.

Here are some Examples of Utility software are given below


 Antivirus software: Antivirus software is designed to detect
and remove viruses, malware, and other malicious
software from a computer system.
 Backup and recovery software: Backup and recovery
software allows users to create copies of their data and restore
it in the event of data loss or system failure.
 Firewall: It can be used to filter between trusted and untrusted
networks and prevent programs from unauthorized access.

19.Differentiate between uniprogramming and multiprogramming.

Uniprogramming:

 The main memory has a smaller size in uniprogramming as only one


task sits there at a time.
 In uniprogramming the system runs smoothly as only one task in a
run at a time, it can function on a slow processor as well.
 Some examples of uniprogramming are:
The operating system in old mobile phones, batch processing in old
computers, etc.

Multiprogramming:
 The processor needs to be faster.
 In multiprogramming, the main memory needs more space.
 Some examples of multiprogramming are:
The operating systems that are used in modern computers like Windows 10,
etc.

20.Differentiate between multiprogramming and multitasking operating


system.

Multiprogramming:
 It includes the single CPU to execute the program.
 Concept of Context Switching is used.
 Multi-programming increases CPU utilization by organizing jobs .
 The idea is to reduce the CPU idle time for as long as possible.
 Execution of process takes more time.
Multi-tasking:
 It uses multiple tasks for the task allocation.
 Concept of Context Switching and Time Sharing is used.
 In multi-tasking also increases CPU utilization, it also increases
responsiveness.
 The idea is to further extend the CPU Utilization concept by
increasing responsiveness Time Sharing.
 Execution of process takes less time.
Chapter-7 Unix Operating System

1. What is Unix?

Unix is a family of multitasking, multiuser computer operating systems


that is truly the base of all Operating Systems like Ubuntu, Solaris,
POSIX, etc. It was developed in the 1970s by Ken Thompson, Dennis
Ritchie, and others in the AT&T Bell Laboratories. It was originally
meant for programmers developing software rather than non-
programmers.

2. What are the features of Unix?


Some of the key features of UNIX include:
1. Multiuser support: UNIX allows multiple users to simultaneously
access the same system and share resources.
2. Multitasking: UNIX is capable of running multiple processes at the
same time.
3. Security: UNIX has a robust security model that includes file
permissions, user accounts, and network security features.
4. Portability: UNIX can run on a wide variety of hardware platforms,
from small embedded systems to large mainframe computers.

3. Explain Unix system structure with neat diagram.

Today, UNIX is widely used in enterprise-level computing, scientific research,


and web servers. Many modern operating systems, including Linux and
macOS, are based on UNIX or its variants.
Figure – system structure
 Layer-1: Hardware: It consists of all hardware related
information.
 Layer-2: Kernel: It interacts with hardware and most of the tasks
like memory management, task scheduling, and management are
done by the kernel.
 Layer-3: Shell commands: Shell is the utility that processes your
requests. When you type in a command at the terminal, the shell
interprets the command and calls the program that you want. There
are various commands like cp, mv, cat, grep, id, wc, nroff, a.out and
more.
 Layer-4: Application Layer: It is the outermost layer that executes
the given external applications.

4. What is a Kernel?

Kernel is central component of an operating system that manages


operations of computer and hardware. It basically manages operations of
memory and CPU time. It is core component of an operating system.
Kernel acts as a bridge between applications and data processing
performed at hardware level using inter-process communication and
system calls.

5. What is a shell?

A shell provides an intermediary connection point between the user and


the kernel. It runs in the system's user space and executes the commands
issued by the user, whether through a keyboard, mouse, trackpad or other
device.
On some platforms, the shell is called a command interpreter because it
interprets the commands the user issues.

6. What are the two types of Unix commands?

The UNIX system is command-based i.e things happen because of the


commands that you key in.
They are grouped into two categories:
Internal Commands
External commands
Internal Commands:
Internal commands are something which is built into the shell.
For the shell built in commands, the execution speed is really high. It is
because no process needs to be loaded for executing it. For example,
when using the “cd” command, no process is created.
The current directory simply gets changed on executing it.
Example: cd, kill, pwd, echo, printf

External commands:
External commands are not built into the shell. These are executable and
are present in a separate file. When an external command, has to be
executed, a new process has to be loaded and the command gets
executed. For example, when you execute the “cat” command, which
usually is at /usr/bin, the executable /usr/bin/cat gets executed.
Example: cat, mkdir, rm, cp, rmdir, mv

7. Explain the following Unix Commands:

a) Printf:
“printf” command in Linux is used to display the given string,
number or any other format specifier on the terminal window. It
works the same way as “printf” works in programming languages
like C.
Syntax:
$printf [-v var] format [arguments]
Example:
Printf “programming in %s” ”java”
Output: programming in java

b) Cal: cal command is a calendar command in Linux which is used


to see the calendar of a specific month or a whole year.
Syntax:
cal [ [ month ] year]
The rectangular bracket means it is optional, so if used without an option, it
will display a calendar of the current month and year.
Ex: cal : Shows current month calendar on the terminal with the current date
highlighted.

c) Date: date command is used to display the system date and time.
date command is also used to set date and time of the system. By
default the date command displays the date in the time zone on
which unix operating system is configured.
Syntax: date[month][year]
Ex: $date
Output: Thu Mar 22 18:14:37 UTC 2020
d) tput: The tput command is used to control the movement of the
cursor on the screen. That is using tput command user can display
the output to specified row and column. It is also used to add
features such as blinking, boldface and underline to the message
displayed on the screen.
Syntax: tput [row column]
Ex: The following command display total number of rows
24(default).
$tput lines
Output:24
e) uname: prints the name, version and other details about the current
machine and the operating system.
Syntax:
Uname[option]…

Option:
-n It prints the hostname of the network node
-p It prints the type of the processor
-o It prints the name of the operating system
Ex: $uname
Output:Linux
Ex: $uname -o
Output: GNU/Linux
f) tty
There is a command called tty which displays information related
to the terminal.
Syntax: tty
Ex: $tty
Output: /dev/pts/0

g) who
The who command is used to get information about currently
logged-in users on the system.
Syntax
Who

Ex: $who
Output:
Ubuntu tty2 2019-03-28 17:56
Ubuntu tty5 2019-03-28 17:56
Ubuntu pts/0 2019-03-28 17:58

h) passwd
The passwd command changes passwords for user accounts. A
normal user may only change the password for his/her own
account, while the superuser may change the password for any
account.

Example:

Change your own password:

$ passwd

output:

$ passwd
Changing password for ubuntu.
(current) UNIX password:
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully

i) man

man command in Linux is used to display the user manual of any


command that we can run on the terminal. It provides a detailed
view of the command which includes NAME, SYNOPSIS,
DESCRIPTION, OPTIONS, EXIT STATUS, RETURN
VALUES, ERRORS, FILES, VERSIONS, EXAMPLES,
AUTHORS and SEE ALSO.

Syntax :
$ man [COMMAND NAME]
Example:
$ man printf
Output:

j) clear

clear is a standard Unix computer operating system command that


is used to clear the terminal screen.

Syntax:
clear

8. What is a microkernel?
A microkernel is a type of operating system kernel that is designed to
provide only the most basic services required for an operating system to
function, such as memory management and process scheduling.

9. Mention and explain the components of microkernel.

A microkernel is a minimum needed of software required to implement


an operating system correctly.

1. Inter-Process Communication
2. Memory Management
3. CPU Scheduling

Inter-Process Communication

Interprocess communication refers to how processes interact with one another.


A process has several threads. In the kernel space, threads of any process
interact with one another. Messages are sent and received across threads using
ports. At the kernel level, there are several ports like process port, exceptional
port, bootstrap port, and registered port. All of these ports interact with user-
space processes.

Memory Management

Memory management is the process of allocating space in main memory for


processes. However, there is also the creation of virtual memory for processes.
Virtual memory means that if a process has a bigger size than the main memory,
it is partitioned into portions and stored. After that, one by one, every part of the
process is stored in the main memory until the CPU executes it.

CPU Scheduling

CPU scheduling refers to which process the CPU will execute next. All
processes are queued and executed one at a time. Every process has a level of
priority, and the process with the highest priority is performed out first. CPU
scheduling aids in optimizing CPU utilization.

10. What are the advantages and limitations of microkernel?

Advantages of a microkernel architecture:

1. More secure operating system due to reduced attack surface


2. Better system stability, as crashes in user-level processes do not
affect the entire system
3. More modular and flexible, making it easier to customize the
operating system
4. Simplified development process, as services are developed and tested
as independent user-level processes

Disadvantages of a microkernel architecture:

1. Slower message passing between user-level processes can affect


performance, especially in high-performance applications
2. Increased complexity due to the modular design can make it more
difficult to develop and maintain the operating system
3. Limited performance optimization due to separation of kernel and
user-level processes
4. Higher memory usage compared to a monolithic kernel

11. What Is Booting?

Booting is basically the process of starting the computer. When the CPU is
first switched on it has nothing inside the Memory. In order to start the
Computer, load the Operating System into the Main Memory and then
Computer is ready to take commands from the User.

12. What is a Boot loader?

Boot Loader is a software program that is responsible for “actually


loading” the operating system once the Boot Manager has finished its
work. And by loading Operating System we mean “loading the kernel
of the Operating System”. The Boot Loader is typically a part of the
Operating System itself.

13. What are the types of Booting?

There are two types of booting in an operating system. They are:

Cold Booting: When the computer starts for the first time or is in a shut-
down state and switch on the power button to start the system, this type of
process to start the computer is called cold booting. During cold booting,
the system will read all the instructions from the ROM (BIOS) and the
Operating System will be automatically get loaded into the system.

Warm Booting: Warm or Hot Booting process is when computer


systems come to no response or hang state, and then the system is
allowed to restart during on condition. It is also referred to as rebooting.
Most commonly Ctrl+Alt+Del button is used to reboot the system. Else,
in some systems, the external reset button may be available to reboot the
system.

14. Explain booting process in operating system.

Step 1: The Startup: It is the first step that involves switching the power
ON. It supplies electricity to the main components like BIOS and
processor.

Step 2: BIOS: Power on self-test is an initial test performed by the BIOS.


Further, this test performs an initial check on the input/output devices,
computer’s main memory, disk drives, etc. Moreover, if any error occurs,
the system produces a beep sound.

Step 3: Loading of OS: In this step, the operating system is loaded into
the main memory. The operating system starts working and executes all
the initial files and instructions.

Step 4: System configuration: In this step, the drivers are loaded into the
main memory. Drivers are programs that help in the functioning of the
peripheral devices.

Step 5: Loading system utilities: System utilities are basic functioning


programs, for example, volume control, antivirus, etc. In this step, system
utilities are loaded into the memory.

Step 6: User Authentication: If any password has been set up in the


computer system, the system checks for user authentication. Once the
user enters the login ID and password correctly the system finally starts.

15. What is Dual Booting?

When two operating systems are installed on a computer system, it is


called dual booting. This can be any combination of operating systems,
for example, Windows and Linux, and Windows and Mac OS etc.

16. Explain directory related commands with example.

1) mv: Move files or rename files

 Syntax: mv [OPTION]source destination


 Example: Create empty files called ‘file1’ and ‘file2’
 $ mv file1 file2
2) mkdir: Make a directory
 Syntax: mkdir [OPTION] directory
 Example: Create a directory called dir1
 $ mkdir dir1
3) rmdir: Remove a directory
 Syntax: rmdir [OPTION] directory
 Example: Create empty files called ‘file1’ and ‘file2’
 $ rmdir dir1
4) cd: Change directory
 Syntax: cd [OPTION] directory
 Example: Change working directory to dir1
 $ cd dir1
5) pwd: Print the present working directory
 Syntax: pwd [OPTION]
 Example: Print ‘dir1’ if a current working directory is dir1
 $ pwd

17. Explain file related commands with example.

1) touch: Create a new file or update its timestamp.


 Syntax: touch [OPTION]…[FILE]
 Example: Create empty files called ‘file1’ and ‘file2’
 $ touch file1 file2
2) cat: Concatenate files and print to stdout.
 Syntax: cat [OPTION]…[FILE]
 Example: Create file1 with entered cotent
 $ cat > file1
 Hello
 ^D
3) cp: Copy files
 Syntax: cp [OPTION]source destination
 Example: Copies the contents from file1 to file2 and the contents
of file1 are retained
 $ cp file1 file2
4) mv: Move files or rename files
 Syntax: mv [OPTION]source destination
 Example: Create empty files called ‘file1’ and ‘file2’
 $ mv file1 file2
5) rm: Remove files and directories
 Syntax: rm [OPTION]…[FILE]
 Example: Delete file1
 $ rm file1
Chapter-8 Introduction to Database Management System

1. What is Data?
Data is a collection of facts, such as numbers, words, measurements,
observations or even just descriptions of things.

2. What is Database?

A database is an organized collection of data, so that it can be easily


accessed and managed. You can organize data into tables, rows, columns,
and index it to make it easier to find relevant information.

3. What is Database Management System?

A database management system (DBMS) is system software for creating


and managing databases. A DBMS makes it possible for end users to
create, protect, read, update and delete data in a database. The DBMS
essentially serves as an interface between databases and users or
application programs, ensuring that data is consistently organized and
remains easily accessible.

4. Why Database is important?

a) Database Organizes The Data


The database helps keep data organized systematically. It organizes and
catalogs information. Without a database, you’d have to manually search
for data in multiple different files and documents.

b) Database Stores Information Easily

The database helps manage information more effectively than paper-based


filing systems because they can store a greater volume of data.

c) Database Is Reliable

Databases store data consistently and reliably. This helps to prevent the data
from becoming corrupted.

d) Database Is Easy To Use

Databases are easy to use. They can be accessed from


any computer with an internet connection.
This allows you to quickly and easily get the information you need
when you need it.

e) Database Ensures Data Security


Your data is secure when it’s kept in a database. Only authorized individuals
can access the information, which prevents unauthorized users from gaining
access to your sensitive data.

f) Database Ensures Data Integrity

The database ensures data integrity by providing you with


accurate information, even if multiple users are working in the
system at once.

5. What is File system?


A file system is a method an operating system uses to store,
organize, and manage files and directories on a storage device.

6. Differentiate between File system and DBMS

File System:

 The file system is a way of arranging the files in a storage


medium within a computer.

 It doesn’t provide Inbuilt mechanism for backup and


recovery of data if it is lost.

 There is no efficient query processing in the file system.

 It is less complex as compared to DBMS.

 File systems provide less security in comparison to DBMS.

 It is less expensive than DBMS.

 Only one user can access data at a time.

 To access data in a file , user requires attributes such as file


name, file location.
DBMS

 DBMS is software for managing the database.

 It provides in house tools for backup and recovery of data


even if it is lost.

 Efficient query processing is there in DBMS.

 It has more complexity in handling as compared to the file


system.

 DBMS has more security mechanisms as compared to file


systems.

 It has a comparatively higher cost than a file system.

 Multiple users can access data at a time.

 No such attributes are required.


7. Write a note on database applicatons.

Universities:

It is an undeniable application of the database. Universities have so much data


which can be stored in the database, such as student information, teacher
information, non-teaching staff information, course information, section
information, grade report information, and many more. University information is
kept safe and secure in the database.

Banking:

It is one of the major applications of databases. Banks have a huge amount of data
as millions of people have accounts that need to be maintained properly.

Banking databases store a lot of information about account holders. It stores


customer details, asset details, banking transactions, balance sheets, credit card
and debit card details, loans, fixed deposits, and much more.

E-commerce Websites:

E-commerce websites are one of the prominent applications of the database.


Websites such as Flipkart, Myntra, Amazon, Nykaa, Snapdeal, Shopify, and
many more, are online shopping websites where people buy items online. These
websites have so much data.
These websites use databases to securely store and maintain customer details,
product details, dealer details, purchase details, bank & card details, transactions
details, invoice details, etc.

Medical:

There is a lot of important data collection in the medical field, so it is necessary


to use the database to store data related to the medical field, such as patient details,
medicine details, practitioner details, surgeon details, appointment details, doctor
schedule, patient discharge details, payment detail, invoices, and other medical
records.

Industries:

The database management system is the main priority of industries because they
need to store huge amounts of data. The industry database stores customer details,
sales records, product lists, transactions, etc.

Airline Reservation System:

It is one of the applications of database management systems that contain data


such as passenger name, passenger check-in, passenger departure, flight schedule,
number of flights, distance from source to destination, reservation information,
pilot details, accounting detail, route detail, etc.

8. Explain different types of database users.

Database Administrator (DBA) : Database Administrator (DBA) is


a person/team who defines the schema and also controls the 3 levels
of database. The DBA will then create a new account id and
password for the user if he/she need to access the database. DBA is
also responsible for providing security to the database and he allows
only the authorized users to access/modify the data base. DBA is
responsible for the problems such as security breaches and poor
system response time.
a. DBA also monitors the recovery and backup and provide
technical support.
b. The DBA has a DBA account in the DBMS which called a system
or superuser account.
c. DBA repairs damage caused due to hardware and/or software
failures.
d. DBA is the one having privileges to perform DCL (Data Control
Language) operations such as GRANT and REVOKE, to
allow/restrict a particular user from accessing the database.
Database Designers : Data Base Designers are the users who design
the structure of database which includes tables, indexes, views,
triggers, stored procedures and constraints which are usually enforced
before the database is created or populated with data.

End Users: The end users are those who actually access the database
for querying, updating and generating reports. There are various
categories of end users. They are:

 Native end users


 Sophisticated end users
 Stand alone users

Naive end users: Parametric End Users are the unsophisticated


who don’t have any DBMS knowledge but they frequently use
the database applications in their daily life to get the desired
results. For examples, Railway’s ticket booking users are naive
users.

Sophisticated end users:

Sophisticated users can be engineers, scientists, business


analyst, who are familiar with the database. They can develop
their own database applications according to their requirement.
They don’t write the program code but they interact the database
by writing SQL queries directly through the query processor.

Stand alone users: These are those users whose job is basically
to maintain personal databases by using a ready-made program
package that provides easy-to-use menu-based or graphics-
based interfaces, An example is the user of a tax package that
basically stores a variety of personal financial data for tax
purposes. These users become very proficient in using a specific
software package.

9. What are advantages and disadvantages of DBMS?

Data Integrity and Security: DBMS provides a centralized


approach to data management that ensures data integrity and security.
DBMS allows defining constraints and rules to ensure that data is
consistent and accurate.
 educed Data Redundancy: DBMS eliminates data redundancy by
storing data in a structured way. It allows sharing data across
different applications and users, reducing the need for duplicating
data.
 Improved Data Consistency: DBMS ensures data consistency by
enforcing data validation rules and constraints. This ensures that data
is accurate and consistent across different applications and users.
 Improved Data Access and Availability: DBMS provides efficient
data access and retrieval mechanisms that enable quick and easy data
access. It allows multiple users to access the data simultaneously,
ensuring data availability.
 Improved Data Sharing: DBMS provides a platform for sharing
data across different applications and users. It allows sharing data
between different departments and systems within an organization,
improving collaboration and decision-making.
 Improved Data Integration: DBMS allows integrating data from
different sources, providing a comprehensive view of the data. It
enables data integration from different systems and platforms,
improving the quality of data analysis.
 Improved Data Backup and Recovery: DBMS provides backup
and recovery mechanisms that ensure data is not lost in case of a
system failure. It allows restoring data to a specific point in time,
ensuring data consistency.

Disadvantages of DBMS

Complexity: For the proper requirement of DBMS, it is very


important to have a good knowledge of it by the developers, DBA,
designers, and also the end-users. This is because if any one of them
does not acquire proper and complete skills then this may lead to data
loss or database failure.

Cost of Staff Training –


Educated staff (database administrator, application programmers, data
entry operations) who maintains the database management system also
requires a good amount. We need the database system designers to be
hired along with application programmers.

Security: A DBMS can be vulnerable to security breaches if not


properly configured and managed. This can lead to data loss or theft.

Complex design :
Database design is complex, difficult and time consuming.

10.Differentiate between data and information.


Data:

Data means raw facts gathered about someone or something, which is


bare and random.

Unorganized

Does not depend on information.

It is just text and numbers.

Information:

Facts, concerning a particular event or subject, which are refined by


processing is called information.

Organized

Without data, information cannot be processed.

It is refined data.

11.What is SQL?

SQL stands for Structured Query Language and is a computer


language that we use to interact with a relational database. SQL is a
tool for organizing, managing, and retrieving archived data from a
computer database.

12.What are the data types in SQL?

SQL Data type is an attribute that specifies the type of data of any
object. Each column in a database table is required to have a name and
a data type.

Data type

Data type Description

Character(n)/char(n) Character string, Fixed length n


Varchar(n) Character string, Variable length,
Maximum length n
Boolean Stores true or false value
Integer/int Integer numerical
Numeric(p,s)/Number(p,s) Float numerical, precision p, scale s
Date Stores year, month, and day values
Time Stores hour, minute, and second
values

13.Explain DDL commands with example.

DDL (Data Definition Language)


DDL or Data Definition Language actually consists of the SQL commands that
can be used to define the database schema. It simply deals with descriptions of
the database schema and is used to create and modify the structure of database
objects in the database. DDL is a set of SQL commands used to create, modify,
and delete database structures but not data. These commands are normally not
used by a general user, who should be accessing the database via an application.
List of DDL commands:
 CREATE: This command is used to create the database or its objects
(like table, index, function, views, store procedure, and triggers).
 DROP: This command is used to delete objects from the database.
 ALTER: This is used to alter the structure of the database.
 TRUNCATE: This is used to remove all records from a table,
including all spaces allocated for the records are removed.
 COMMENT: This is used to add comments to the data dictionary.
 RENAME: This is used to rename an object existing in the database.

14.Explain DML commands with example.

DML(Data Manipulation Language)


The SQL commands that deal with the manipulation of data present in the
database belong to DML or Data Manipulation Language and this includes most
of the SQL statements. It is the component of the SQL statement that controls
access to data and to the database. Basically, DCL statements are grouped with
DML statements.
List of DML commands:
 INSERT: It is used to insert data into a table.
 UPDATE: It is used to update existing data within a table.
 DELETE: It is used to delete records from a database table.
 LOCK: Table control concurrency.
15.Explain DCL commands with example.

DCL (Data Control Language)


DCL includes commands such as GRANT and REVOKE which mainly deal
with the rights, permissions, and other controls of the database system.
List of DCL commands:
GRANT: This command gives users access privileges to the database.
Syntax:
GRANT SELECT, UPDATE ON MY_TABLE TO SOME_USER, ANOTHER_U
SER;
REVOKE: This command withdraws the user’s access privileges given by
using the GRANT command.
Syntax:
REVOKE SELECT, UPDATE ON MY_TABLE FROM USER1, USER2;

16.Explain TCL commands with example.

TCL (Transaction Control Language)


Transactions group a set of tasks into a single execution unit. Each transaction
begins with a specific task and ends when all the tasks in the group are
successfully completed. If any of the tasks fail, the transaction fails. Therefore,
a transaction has only two results: success or failure. You can explore more
about transactions here. Hence, the following TCL commands are used to
control the execution of a transaction:
BEGIN: Opens a Transaction.
COMMIT: Commits a Transaction.
Syntax:
COMMIT;
ROLLBACK: Rollbacks a transaction in case of any error occurs.
Syntax:
ROLLBACK;
SAVEPOINT: Sets a save point within a transaction.
Syntax:
SAVEPOINT SAVEPOINT_NAME;

17.Explain DQL commands with example.

DQL (Data Query Language)


DQL statements are used for performing queries on the data within schema
objects. The purpose of the DQL Command is to get some schema relation based
on the query passed to it. We can define DQL as follows it is a component of
SQL statement that allows getting data from the database and imposing order
upon it. It includes the SELECT statement. This command allows getting the
data out of the database to perform operations with it.
List of DQL:
 SELECT: It is used to retrieve data from the database.

18.Differentiate between delete and truncate.

DELETE is a DML(Data Manipulation Language) command and is


used when we specify the row (tuple) that we want to remove or delete
from the table or relation. The DELETE command can contain a
WHERE clause. If the WHERE clause is used with the DELETE
command, then it removes or deletes only those rows (tuples) that
satisfy the condition; otherwise, by default, it removes all the tuples
(rows) from the table. Remember that DELETE logs the row deletions.
Syntax:
DELETE FROM TableName
WHERE condition;
TRUNCATE is a DDL(Data Definition Language) command and is used to
delete all the rows or tuples from a table. Unlike the DELETE command, the
TRUNCATE command does not contain a WHERE clause. Unlike the DELETE
command, the TRUNCATE command is fast. We cannot roll back the data after
using the TRUNCATE command.
Syntax:
TRUNCATE TABLE TableName;

19.Write a note on SQL constraints.

Constraints are the rules that we can apply on the type of data in a table. That
is, we can specify the limit on the type of data that can be stored in a particular
column in a table using constraints.
The available constraints in SQL are:

 NOT NULL: This constraint tells that we cannot store a null value in
a column. That is, if a column is specified as NOT NULL then we
will not be able to store null in this particular column any more.
 UNIQUE: This constraint when specified with a column, tells that
all the values in the column must be unique. That is, the values in
any row of a column must not be repeated.
 PRIMARY KEY: A primary key is a field which can uniquely
identify each row in a table. And this constraint is used to specify a
field in a table as primary key.
 FOREIGN KEY: A Foreign key is a field which can uniquely
identify each row in a another table. And this constraint is used to
specify a field as Foreign key.
 CHECK: This constraint helps to validate the values of a column to
meet a particular condition. That is, it helps to ensure that the value
stored in a column meets a specific condition.
 DEFAULT: This constraint specifies a default value for the column
when no value is specified by the user.

20.Write a note on create command with constraints.

a) SQL NOT NULL on CREATE TABLE

The following SQL ensures that the "ID", "LastName", and "FirstName"
columns will NOT accept NULL values when the "Persons" table is created:

Example
CREATE TABLE Persons (
ID int NOT NULL,
LastName varchar(255) NOT NULL,
FirstName varchar(255) NOT NULL,
Age int
);

b) SQL UNIQUE Constraint on CREATE TABLE


The following SQL creates a UNIQUE constraint on the "ID" column
when the "Persons" table is created:
CREATE TABLE Persons (
ID int NOT NULL UNIQUE,
LastName varchar(255) NOT NULL,
FirstName varchar(255),
Age int
);
c) SQL PRIMARY KEY on CREATE TABLE
The following SQL creates a PRIMARY KEY on the "ID" column
when the "Persons" table is created:

MySQL:
CREATE TABLE Persons (
ID int NOT NULL,
LastName varchar(255) NOT NULL,
FirstName varchar(255),
Age int,
PRIMARY KEY (ID)
);
d) SQL FOREIGN KEY on CREATE TABLE
The following SQL creates a FOREIGN KEY on the "PersonID"
column when the "Orders" table is created:

MySQL:
CREATE TABLE Orders (
OrderID int NOT NULL,
OrderNumber int NOT NULL,
PersonID int,
PRIMARY KEY (OrderID),
FOREIGN KEY (PersonID) REFERENCES Persons(PersonID)
);
e) SQL CHECK on CREATE TABLE
The following SQL creates a CHECK constraint on the "Age" column
when the "Persons" table is created. The CHECK constraint ensures
that the age of a person must be 18, or older:

MySQL:
CREATE TABLE Persons (
ID int NOT NULL,
LastName varchar(255) NOT NULL,
FirstName varchar(255),
Age int,
CHECK (Age>=18)
);
f) SQL DEFAULT on CREATE TABLE
The following SQL sets a DEFAULT value for the "City" column
when the "Persons" table is created:

My SQL / SQL Server / Oracle / MS Access:


CREATE TABLE Persons (
ID int NOT NULL,
LastName varchar(255) NOT NULL,
FirstName varchar(255),
Age int,
City varchar(255) DEFAULT 'Sandnes'
);

21.Write a note on alter command with example.

a) SQL NOT NULL on ALTER TABLE


To create a NOT NULL constraint on the "Age" column when the
"Persons" table is already created, use the following SQL:

SQL Server / MS Access:


ALTER TABLE Persons
ALTER COLUMN Age int NOT NULL;

b) SQL UNIQUE Constraint on ALTER TABLE


To create a UNIQUE constraint on the "ID" column when the table is
already created, use the following SQL:

MySQL / SQL Server / Oracle / MS Access:


ALTER TABLE Persons
ADD UNIQUE (ID);
C) SQL PRIMARY KEY on ALTER TABLE
To create a PRIMARY KEY constraint on the "ID" column when the
table is already created, use the following SQL:

MySQL / SQL Server / Oracle / MS Access:


ALTER TABLE Persons
ADD PRIMARY KEY (ID);

D) SQL FOREIGN KEY on ALTER TABLE


To create a FOREIGN KEY constraint on the "PersonID" column when
the "Orders" table is already created, use the following SQL:
MySQL / SQL Server / Oracle / MS Access:
ALTER TABLE Orders
ADD FOREIGN KEY (PersonID) REFERENCES Persons(PersonID);

e) SQL CHECK on ALTER TABLE

To create a CHECK constraint on the "Age" column when the table is already
created, use the following SQL:

MySQL / SQL Server / Oracle / MS Access:


ALTER TABLE Persons
ADD CHECK (Age>=18);
g) SQL DEFAULT on ALTER TABLE
To create a DEFAULT constraint on the "City" column when the table
is already created, use the following SQL:

MySQL:
ALTER TABLE Persons
ALTER City SET DEFAULT 'Sandnes';

22.Write a note on drop command with constraints.

DROP CONSTRAINT
The DROP CONSTRAINT command is used to delete a UNIQUE,
PRIMARY KEY, FOREIGN KEY, or CHECK constraint.

DROP a UNIQUE Constraint


To drop a UNIQUE constraint, use the following SQL:
SQL Server / Oracle / MS Access:
ALTER TABLE Persons
DROP CONSTRAINT UC_Person;
MySQL:
ALTER TABLE Persons
DROP INDEX UC_Person;

DROP a PRIMARY KEY Constraint


To drop a PRIMARY KEY constraint, use the following SQL:
SQL Server / Oracle / MS Access:
ALTER TABLE Persons
DROP CONSTRAINT PK_Person;
MySQL:
ALTER TABLE Persons
DROP PRIMARY KEY;

DROP a FOREIGN KEY Constraint

To drop a FOREIGN KEY constraint, use the following SQL:


SQL Server / Oracle / MS Access:
ALTER TABLE Orders
DROP CONSTRAINT FK_PersonOrder;
MySQL:
ALTER TABLE Orders
DROP FOREIGN KEY FK_PersonOrder;

DROP a CHECK Constraint


To drop a CHECK constraint, use the following SQL:
SQL Server / Oracle / MS Access:
ALTER TABLE Persons
DROP CONSTRAINT CHK_PersonAge;
MySQL:
ALTER TABLE Persons
DROP CHECK CHK_PersonAge;
Chapter-9 Internet Basics

1. What is Internet?
Internet is a global network that connects billions of computers across the
world with each other and to the World Wide Web.

2. What are the features of Internet?

Major features of the Internet are listed below:

Easy to Use

The software that is used to access the Internet or web browser is designed
in such a way that is very simple and can be easily learned and used. Also,
it is easy to develop.

Flexibility

Flexibility in terms of transfer of data. Basically, the internet network


carries information in digital form in a majority of cases instead of voice
information in analog form.

Accessibility

Internet service is a worldwide service and access to all. People located in remote
or anywhere interior can also use the Internet. Therefore, information through the
internet flows across the networks in a standardised manner.

Interaction with Media and Flexibility of Communication

Businesses are expanding with the help of the Internet. There is a high degree of
interaction with the media due to internet service. Like, News, magazines,
publishing houses, etc. have extended their business with the help of Internet
service. Also, communication is flexible due to internet service. With the help of
text voice, video people can communicate easily.

Low Cost and Security

The maintenance and development costs of Internet service are comparatively


low. Also, Internet service helped the security system both at an individual and
national levels. For example CCTV cameras, etc.

3. Mention and Explain the applications of Internet.


Communication

Today, there are thousands of such Internet applications for


communication, through which you can communicate with someone else.

There are some popular communication internet applications, which are given
below.

 Email
 Skype
 Google Meet
 Zoom
 WhatsApp
 Facebook Messenger

Email

Through email, you can also send an email to someone in a few seconds
and can also receive email from anyone. You just need to have an internet
connection to send or receive emails.

Through email, you can send text messages, program files, spreadsheets,
photos, videos, etc to anyone. Email is mostly used by professional people.

Job Search

Due to covid 19, many people lost their jobs today or if they say, millions
of people around the world have become unemployed due to covid
epidemic, and it is very difficult to find jobs again.

Through these internet job applications, you can find jobs for yourself sitting at
home, these job portals have all kinds of jobs for all types of people, all you have
to do is use these job applications and just send your resume. We have given
below the names of some jobs providing internet applications.

 Naukri.com
 Monster.com
 Freshersworld.com
 Indeed.com
 Glassdoor
Online Shopping
Today there are many such applications on the Internet, through which you can
buy anything online. Such as - Mobile, Tablet PC, Computers, Watch, Smart
Watch, Television, Fan, Table Fan, LED Bulb, Glasses, Ring,
Jewellers, Camera, Home Appliances, clothes, etc.

Through these shopping applications, you can order any item of your need
sitting at home. We have given below the names of some shopping applications,
from which you can shop.
 Amazon
 FlipKart
 Paytm Mall
 ShopClues
 Myntra

Travel
Due to the Covid epidemic all over the world, people have stopped
traveling, and as the effect of the Covid epidemic is working, people are
now starting to leave their homes.
Today, there are many such Internet applications, so they make your journey even
easier. You can book travel tickets, hotels, taxis, etc. through these internet
applications.

Or you can now book the same trip through these applications

 MakeMyTrip.
 Cleartrip.
 Goibibo.
 Agoda.
 Booking.com.
 Yatra.

Research
Research means to do deep research about a subject or to know
everything about that subject. Doing research is no small task, it takes a
lot of time and effort to do research about anything.
Today there are many such internet applications that make your research
easier and you do not have to work harder too.
All you have to do is use these applications to complete your research.
 Mendeley
 Flipboard
 Researcher
 Google Keep
 Curiosity
 Paperity
 Slack
 DropBox

Online Payments
Today is the era of online payments, in today's digital age, now everyone is
paying any bill online instead of giving cash. Today online payments are in full
swing all over the world.

There are many benefits of online payment. For example - you do not need to
carry cash, there is no need to spare money in taking any item.

 Paytm
 PhonePe
 Google Pay
Social Networking
Social networking is also a good platform, through which you talk to people.
Today millions of people around the world are using social networking sites.
Through social networking sites, you can make connections with friends, family,
classmates, customers, and clients.

You must have an internet connection to use social networking sites because
without an internet connection you cannot use these social networking sites.

 Facebook
 Instagram
 Twitter
 LinkedIn
 YouTube

4. Explain various types of services provided by the Internet.

IRC(Internet Relay Chat): Subscribers can communicate in real-time


by connecting numerous computers in public spaces called channels.
 E-Mail: Used to send electronic mail via the internet. It is a paperless
method for sending text, images, documents, videos, etc from one
person to another via the internet.
 User Network (USENET): It hosts newsgroups and message boards
on certain topics, and it is mostly run by volunteers.
 Telnet: It’s used to connect to a remote computer that’s connected to
the internet.
Video Conferencing: Video conferencing systems allow two or more
people who are generally in different locations to connect live and
visually. Live video conferencing services are necessary for simulating
face-to-face talks over the internet.
It allows numerous people to connect and collaborate face to face over
large distances. Tools available for this purpose are Zoom,
FreeConference, Google Hangouts, Skype, etc.

5. List any two advantages of E-mail.

 E-mails provides faster and easy mean of communication. One can send
message to any person at any place of world by just clicking mouse.
o It is effective and cheap means of communication because single
message can be send to multiple people at same time.
o E-mails are very easy to filter. User according to his/her priority
can prioritize e-mail by specifying subject of e-mail.
o E-mail is not just only for textual message. One can send any kind
of multimedia within mail.
 To write an e-mail there is no need of any kind of paper, thus it is
environment friendly.

6. What is FTP?

File transfer protocol (FTP) is an Internet tool provided by TCP/IP.

It helps to transfer files from one computer to another by providing access to


directories or folders on remote computers and allows software, data, text file
to be transferred between different kinds of computers.
7. What is a Telnet?
TELNET stands for Teletype Network. It is a type of protocol that
enables one computer to connect to the local computer. It is used as a
standard TCP/IP protocol for virtual terminal service which is provided
by ISO. The computer which starts the connection is known as the local
computer.
The computer which is being connected to i.e. which accepts the
connection known as the remote computer.

8. What is a newsgroup?

A newsgroup is an Internet-based discussion around an individual, entity,


organization or topic. Newsgroups enable remotely connected users to
share, discuss and learn about their topic of interest by exchanging text
messages, images, videos and other forms of digital content.
Generally, newsgroups are of two types:
 Moderated Newsgroups: This type of newsgroup is designed to
discuss a designated person who decides which postings should be
allowed or removed. In this type of group, we can not post directly.
Unmoderated Newsgroups: In this type of newsgroup, everyone is free
to post and comment.

9. What is a physical Address?


Physical Address identifies a physical location of required data in a
memory. The user never directly deals with the physical address but can
access by its corresponding logical address. The user program generates
the logical address and thinks that the program is running in this logical
address but the program needs physical memory for its execution.

10. What is logical address?


Logical Address is generated by CPU while a program is running. The
logical address is virtual address as it does not exist physically, therefore,
it is also known as Virtual Address. This address is used as a reference to
access the physical memory location by CPU.

11. What is IPV4?

IP stands for Internet Protocol and v4 stands for Version Four (IPv4).
Ipv4 was the primary version brought into action for production within
the ARPANET in 1983.
IP version four addresses are 32-bit integers which will be expressed in
decimal notation.
Example- 192.0.2.126 could be an Ipv4 address.
 Ipv4 could be a 32-Bit IP Address.
 Ipv4 could be a numeric address, and its bits are separated by a dot.
An Ipv4 address consists of four numbers, each of which contains one to
three digits, with a single dot (.) separating each number or set of digits.
Each of the four numbers can range from 0 to 255.
12. What is IPV6?

IPV6 address is a 128 bits address.


It is composed of 8 fields each of which contains 2 octets and separated
by a colon (:)
Each of the 8 fields represented by a hexadecimal number system that
uses base of 16.
Hexadecimal number system uses 0-9 to represent values from zero to
nine and A-F to represent values from ten to fifteen.
Ex: 2001: 0000: 3238: DFEI: 0063: 0000: 0000: FEFB

13. Differentiate between IP address and MAC address.

MAC Address:
o MAC Address stands for Media Access Control Address.
o MAC Address is a six byte hexadecimal address.
o MAC Address is used to ensure the physical address of a computer.
o MAC Address helps in simply identifying the device.
o MAC Address of computer cannot be changed with time and
environment.

 It is a 48-bit address that contains 6 groups of 2 hexadecimal digits,


separated by either hyphens (-) or colons(.).
Example:
00:FF:FF:AB:BB:AA
or
00-FF-FF-AB-BB-AA
IP Address
o IP Address stands for Internet Protocol Address.
o IP Address is either a four-byte (IPv4) or a sixteen-byte (IPv6)
address.
o IP Address is the logical address of the computer.
o IP Address identifies the connection of the device on the network.
o IP Address modifies with the time and environment.
 IPv4 uses 32-bit addresses in dotted notations, whereas IPv6 uses 128-bit
addresses in hexadecimal notations.
Example:
IPv4 192.168.1.1
IPv6 FFFF:F200:3204:0B00
17. What is an ISP?
The term “internet service provider (ISP)” refers to a company that provides
access to the internet to both personal and business customers. ISPs make it
possible for their customers to surf the web, shop online, conduct business, and
connect with family and friends.
18. Write a note on Internet Service Providers.
The term “internet service provider (ISP)” refers to a company that provides
access to the internet to both personal and business customers. ISPs make it
possible for their customers to surf the web, shop online, conduct business, and
connect with family and friends.
Most popular ISPs:
Dial-up connection: A dial-up connection uses a standard phone line and analog
modem to access the Internet at data transfer rates (DTR) of up to 56 Kbps.

A dial-up connection is the least expensive way to access the Internet, but it also
slowest connection.

DSL: DSL has a lot going for it: it’s faster than dial-up; in a lot of cases it’s faster
than satellite (and no latency for gamers); and it’s infrastructure makes it more
available than either cable or fiber internet.

Both DSL and old-school dial-up internet use phone lines to connect you to the
internet; but dial-up works on a frequency that prevents you from being able to
be on the (landline) phone and the internet simultaneously.

Cable Internet: Cable internet service is delivered through copper coaxial


cables that carry radio frequency signals to and from a cable modem in your
home. These cables are the same ones used for cable television, so it’s widely
available. Providers commonly offer both cable TV and internet packages, and
you can still watch cable while using the internet.

Wireless broadband (WiBB): Wireless broadband (WiBB) a networking


technology designed to impart highspeed Internet and data service through
wireless networks. Wireless broadband may be delivered through wireless local
area networks (WLANs) or wide area networks (WWANs).
Similar to other wireless services, wireless broadband can be either fixed or
mobile.

Wi-Fi Internet:

 Wireless Connectivity: Wi-Fi allows devices to connect to a network


without the use of physical cables, providing greater mobility and
flexibility.
 High Speed: Wi-Fi networks can provide high-speed internet access,
allowing users to download and upload data quickly.
 Easy Setup: Wi-Fi networks are easy to set up and configure, requiring
minimal technical knowledge. Most modern devices come with Wi-Fi
connectivity built-in.

ISDN: Integrated services Digital Network

ISDN is a set of protocols that is based on high-speed fully digitized telephone


service. The main aim of ISDN is to provide a fully integrated digital service to
the users.

Ethernet: Ethernet is the most widely used LAN technology and is defined
under IEEE standards 802.3. The reason behind its wide usability is that
Ethernet is easy to understand, implement, and maintain, and allows low-cost
network implementation. Also, Ethernet offers flexibility in terms of the
topologies that are allowed.

19. What is DNS?


The Domain Name System (DNS) is the phonebook of the Internet. Humans
access information online through domain names, like nytimes.com or espn.com.
Web browsers interact through Internet Protocol (IP) addresses. DNS translates
domain names to IP addresses so browsers can load Internet resources.
20. Write a note on Domain Name System.

The Domain Name System (DNS) is the phonebook of the Internet. Humans
access information online through domain names, like nytimes.com or espn.com.
Web browsers interact through Internet Protocol (IP) addresses. DNS translates
domain names to IP addresses so browsers can load Internet resources.
Each device connected to the Internet has a unique IP address which other
machines use to find the device. DNS servers eliminate the need for humans to
memorize IP addresses such as 192.168.1.1 (in IPv4), or more complex newer
alphanumeric IP addresses such as 2400:cb00:2048:1::c629:d7a2 (in IPv6).

Some Generic Top-level Domain names:


.com -> Commercial Business
.edu -> Education
.gov -> U.S. government Agency
.int -> International entity
.mil -> U.S. military
.net -> Networking organization
.org -> Organization

Some country top-level domain names:


au -> Australia
in-> India
us -> United States
jp -> Japan
ca -> Canada
Chapter 10 Web Basics
1. What is client and server?
A client program runs on the local machine, requesting service from the
server. A client program is a finite program means that the service is
started by the user and terminates when the service is completed. For
instance, web browser.

A server is like a computer program, which is used to provide functionality to


other programs. It can be any computerized process called by a client to
distribute the work and share the resources.

It receives and responds to requests made over a network. Server receives the
request from the client for a web document, and it sends the requested
information to the client's computer.

2. Write a note on WWW.

The World Wide Web is abbreviated as WWW and is commonly


known as the web. The WWW was initiated by CERN (European library
for Nuclear Research) in 1989.
WWW can be defined as the collection of different websites around the
world, containing different information shared via local servers(or
computers).
3. What is a webpage?
A webpage is a document written in HTML and can be viewed on any
web browser. It is contained within the web server, which can be
accessed by entering the URL for that web page, and once it is loaded, it
appears on the user's web browser. Each webpage is linked with a unique
URL; hence two pages cannot have the same URL.
4. Differentiate between static and dynamic web page.

Static:
Content of Web pages can not be change at runtime.
No interaction with database possible.
It is faster to load as compared to dynamic website.
Cheaper Development costs.
No feature of Content Management.
HTML, CSS, Javascript is used for developing the website.
Same content is delivered everytime the page is loaded.

Dynamic:
Content of Web pages can be changed.
Interaction with database is possible
It is slower than static website.
More Development costs.
Feature of Content Management System.

Server side languages such as PHP, Node.js are used.

Content may change everytime the page is loaded.

5. What is a Website?

A website is a collection of many web pages, and web pages are digital
files that are written using HTML(HyperText Markup Language).

6. What is a web server? Give example.

Web server is a program which processes the network requests of the


users and serves them with files that create web pages. This exchange
takes place using Hypertext Transfer Protocol (HTTP).

7. What is a search engine? Give example.

A search engine is a software that brings to user relevant


information(which they search) from the vast library of data available
on World Wide Web. Users can search for multiple things including
queries, documents, images, videos, webpages, and other content on a
search engine.

8. What is a Web browser?

The web browser is an application software to explore www (World


Wide Web). It provides an interface between the server and the client
and it requests to the server for web documents and services.

9. Write a note on Web browsers.


The web browser is an application software to explore www (World
Wide Web). It provides an interface between the server and the client
and it requests to the server for web documents and services.

Example: Internet explorer, Google chrome, Mozilla firefox, Netscape


navigator.

Some important features of the web browsers are:

 Web browsers allow the user to open multiple information


resources at the same time, either in different browser windows or
in different tabs of the same window.
 Web browser handle text, images, videos and other types of
information of the world wide web.
 Web browsers support HTTP secure and offer quick and easy ways
to delete the web cache, download history, form and search history,
cookies, and browsing history.
 Web browser gives the facility to save a web page in a file on your
computer, and send the contents of a web page e-mail to others on
the internet.
 All web browser are fundamentally simple to use.

10. What is HTTP?

HTTP stands for Hyper Text Transfer Protocol


It offers set of rules and standards for transferring files such as text,
images, sound, video and other multimedia files over the World Wide
Web.

11. What are the features of HTTP?


Connectionless protocol: HTTP is a connectionless protocol. HTTP
client initiates a request and waits for a response from the server. When
the server receives the request, the server processes the request and sends
back the response to the HTTP client after which the client disconnects
the connection. The connection between client and server exist only
during the current request and response time only.
Media independent: HTTP protocol is a media independent as data can
be sent as long as both the client and server know how to handle the data
content. It is required for both the client and server to specify the content
type in MIME-type header.

Stateless: HTTP is a stateless protocol as both the client and server know
each other only during the current request. Due to this nature of the
protocol, both the client and server do not retain the information between
various requests of the web pages.

12. Mention the HTTP methods?


 GET: This method requests a representation of the specified
resource. It is used to retrieve data without modifying it. For
example, you can use GET to fetch a web page or an image from a
server.
 POST: It is used to send data to the server, such as creating a new
user account or uploading a file.
 PUT: It is used to update an existing resource or create a new one
if it does not exist.
 DELETE: This method deletes the specified resource. It is used to
remove a resource from the server, such as deleting a user account
or a file.

13. What is HTTP messages?

HTTP messages represents how data is exchanged between a server and a


client. It is composed of textual information encoded in ASCII, and span
over multiple lines.
There are two types of messages;
 Request: An HTTP request is made by a client to server. To make
the request the client uses components of a URL, which includes
the information needed to access the resource.
 Response: An HTTP response is made by a server to a client. It is
the server’s information as a result of the client’s request.

14. What is HTTPS?


Hypertext Transfer Protocol Secure is a protocol that is used to
communicate between the user browser and the website. It also helps in
the transfer of data. It is the secure variant of HTTP. To make the data
transfer more secure, it is encrypted. Encryption is required to ensure
security while transmitting sensitive information like passwords, contact
information, etc.

15. What are the features of HTTPS?


Secure Communication: HTTPS makes a secure connection by
establishing an encrypted link between the browser and the server or any
two systems.
Data Integrity: HTTPS provides data integrity by encrypting the data
and so, even if hackers manage to trap the data, they cannot read or
modify it.
Privacy and Security: HTTPS protects the privacy and security of
website users by preventing hackers to passively listen to communication
between the browser and the server.
Faster performance: HTTPS increases the speed of data transfer
compared to HTTP by encrypting and reducing the size of the data.

16. Differentiate between HTTP and HTTPS.

HTTP HTTPS

HTTP stands for HyperText Transfer HTTPS stands for HyperText


Protocol. Transfer Protocol Secure.

URL begins with “http://”. URL starts with “https://”.

HTTP Works at the Application


HTTPS works at Transport Layer.
Layer.

HTTP speed is faster than HTTPS. HTTPS speed is slower than HTTP.

17. What is URL? Explain with example.


URL is the abbreviation of Uniform Resource Locator. It is the resource
address on the internet. The URL (Uniform Resource Locator) is created
by Tim Berners-Lee and the Internet Engineering working group in 1994.
URL is the character string (address) which is used to access data from the
internet. The URL is the type of URI (Uniform Resource Identifier).
A URL contains the following information which is listed below:
 Protocol name
 A colon followed by double forward-slash (://)
 Hostname (domain name) or IP address
 A colon followed by port number (optional – unless specified
otherwise, “:80” is the default when using HTTP, and “:443” is the
default when using HTTPS)
 Path of the file

18. What is HTML5?


The markup language is used to define the text document within the tag
which defines the structure of web pages. HTML 5 is the fifth and
current version of HTML. It has improved the markup available for
documents and has introduced application programming interfaces
(API) and Document Object Model (DOM).

19. List the features of HTML5.


 HTML5 is supported by all modern browsers.
 HTML5 is more device friendly. It is easy to use.
 HTML5 can help creating attractive websites with CSS, javascript,
etc.
 HTML5 supports geolocation, which makes it possible to
determine the users locaton.
 The code becomes cleaner mainly due to replacing div tags with
semantic elements, which help better structure content of the web
page and improve readability.
 The new standards were specified for playing multimedia directly
in the browser without having to install additional plug-ins.
 Support for web storage introduced in HTML5 makes it possible to
store large amounts of application data locally, without affecting
your web application’s performance.

20. What is a HTML tag?


An HTML tag is a piece of markup language used to indicate the
beginning and end of an HTML element in an HTML document.
As part of an HTML element, HTML tags help web browsers convert
HTML documents into web pages. For example, the <p> tag is used to
organize text content into paragraph elements and the <img> tag is used
to embed image elements.

21. What is HTML attributes?


HTML attributes are special words which provide additional information
about the elements or attributes are the modifier of the HTML element.

22. Write a note on structure of HTML document?


An HTML page is also called an HTML document. Every HTML
document must contain certain standard HTML tags. The basic structure
of an HTML document is shown below:

<HTML >
<HEAD>
<TITLE> Title of the webpage</TITLE>
</HEAD>
<BODY>
Tags that define the content of a webpage are written here.
</BODY>
</HTML>

<HTML> -> It identifies the document as HTML document. The entire code to
design a webpage is written between the opening and closing HTML tags.
<HEAD> -> It is used to provide some additional information, including title,
scripts used and so on, about a webpage.
<TITLE> -> The title tag is used to specify the title of a webpage. The title
appears on the title bar or on the tab in the browser window.
<BODY> -> This tag defines the content of a webpage that would be visible in
the browser. All the tags that display text, images or links in a web page are
written between the opening and the closing<BODY> tags.
23. What is HTML heading?
The HTML heading tag is used to define the headings of a page. There are
six levels of headings defined by HTML. These 6 heading elements are h1, h2,
h3, h4, h5, and h6; with h1 being the highest level and h6 being the least.
 <h1> is used for the main heading. (Biggest in size)
 <h2> is used for subheadings, if there are further sections under the
subheadings then the <h3> elements are used.
 <h6> for the small heading (smallest one).

24. What is HTML text formatting?


HTML Text Formatting provides various tags for text formatting to
enhance the visual presentation of content on a webpage. You can make
your text bold, italic, etc. by using some HTML tags.

<b> Displays text in a bold format.


<i> Showcases italicized text.
<u> used for underlining text.
<sup> Formats text as superscript.
<sub> Creates subscript text.
<big> Renders text in a bigger font size.
<small> Renders text in a smaller font size.

25. What is <img> tag?


The HTML <img> tag is used to add images inside the
webpage/website. Nowadays website does not directly add images to a
web page, as the images are linked to web pages by using the <img> tag
which holds space for the image.

26. What is hyperlink?


The hyperlink contains the URL of the webpages. In a general way, a
hyperlink is referenced when a hypertext navigated. These hyperlinks
are hidden under the text, image, graphics, audio, video, and gets
highlighted once we hover the mouse over it.

27. What is a CSS?


CSS stands for Cascading Style Sheets and plays an important role in
providing the styles to the HTML elements, which helps to make web
pages presentable.

28. List the features of CSS.

Fast Page Loading: We don’t need to mention the attributes of the


HTML element every time if we use CSS. We need to specify one rule of
CSS for an element and use it for every occurrence of that element. So,
short code means high-speed download times.

Easy Maintenance: To create a global alteration, we need to alter the


style. Every element will get automatically updated within all web pages.

Superior HTML Styles: HTML contains few extended attribute’s array


than CSS, thus we can provide a much better view to our HTML page as
compared to HTML attributes.

Save Time: We can specify CSS once and reuse the same sheet within
various HTML pages. We can describe a style for every HTML tag and
apply this style to as a lot of web pages as we want.

Compatibility: The cascading style sheet permits content to be upgraded


for one or more device types. Distinct versions of the website could be
granted for various handheld devices like cell phones and PDAs, and for
printing.

Global Standards: Now, the attributes of HTML are being


recommended to apply CSS, and they are being deprecated. Thus it is
better to begin the use of CSS in every HTML page for making them
compatible for future browsers.

29. Give the syntax of CSS.


A CSS Syntax rule consists of a selector, property, and its value. The
selector points to the HTML element where the CSS style is to be
applied. The CSS property is separated by semicolons. It is a
combination of the selector name followed by the property: value pair
that is defined for the specific selector.
Syntax:
selector { Property: value; }
30. Mention the different levels of style sheets.
Inline style Sheets
Document level style sheets
External style sheets

31. Explain different level of stylesheets with example.

Inline style sheets: Inline style sheets are declared within individual
tags and affected those tags only. Inline style sheets are declared with
the style attribute.
Example:
<html>
<head>
<p style=”color:purple; font-size: 30px”> computer science</p>
</head>
</html>

Document level style sheets: A document level style sheet holds the
CSS code for the webpage in the head section of the particular file. This
makes it easy to apply styles like classes or id’s in order to reuse the
code.
Ex:
<html>
<head>
<style type=”text/css”>
H1{color:blue;}
H2{color:red;}
P{color:green;}
</style >
</head>
<body>
<h1> C programming</h1>
<h2> Operating system</h2>
<p> java programming </p>
</body>
</html>

External style sheets: An external style sheet is declared in an external


file with a .css extension. It is called by pages whose interface it will
affect. External style sheets are called using the <link> tag which should
be placed in the head section of an HTML document.

Ex: CSS file: exstyle.css


H1{color:blue}
H2{color:red}
P{color:green}

HTML file: exstyle.html

<html>
<head>
<link rel=”stylesheet” type=”text/css” href=”exstyle.css”>
</head>
<body>
<h1> c programming</h1>
<h2> operating system</h2>
<p> java programming </p>
</body>
</html>

You might also like