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

Unit I PDF

This document provides an introduction to computers, including their basic components and functions. It discusses what a computer is, its main parts like the central processing unit and memory, and how it works by receiving input, processing data, and producing output. The document also outlines the features of computers, their applications in various fields, and how turning one on initiates the boot process. It concludes by defining digital computers and describing the key functional components that enable input, processing, and output.

Uploaded by

Vithika Zoya
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)
139 views

Unit I PDF

This document provides an introduction to computers, including their basic components and functions. It discusses what a computer is, its main parts like the central processing unit and memory, and how it works by receiving input, processing data, and producing output. The document also outlines the features of computers, their applications in various fields, and how turning one on initiates the boot process. It concludes by defining digital computers and describing the key functional components that enable input, processing, and output.

Uploaded by

Vithika Zoya
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/ 102

Computer Education-I UNIT-I

Brief introduction about Computer, its features, applications,


and working and Types

What is Computer?
An Electronic device which is used to generate the output as per as the users input in fast, efficient
and effective manner. It performs sequence of operations, operating under the control of instructions
stored in its own memory. All these instructions will govern the machine what operation is to be
performed next. The more dignified and sorted the input will be then the machine will behave in
more intelligent way.
The most important unit that the machine relies on is, Central Processing Unit as it manages
the flow of data in all other parts of the system and sometimes called the brain of the computer.

Basic Computer system

Course Coordinator: Ms. Sarla More Page 1


Computer Education-I UNIT-I

Basic operation of Computer system

A machine in all comprises of multiple number of peripheral devices i.e. all the external devices that
are connected to the computer to perform specific operation or functionality. Input devices such as
Keyboard, Mouse and output devices such as Monitor, Printer.

Features of Computer:
Computers had been emerged as one of the biggest innovations in regards with technology. So, it
should comprise of all the features which boosts the speed in terms of calculations and processing
• Multiprocessing
• multiprogramming
• Multitasking / time sharing
• Compatibility
• Accurate
• Reliability
• Portability
• Versatility

Applications of Computer:
Any Computing device which reduces the human effort and performs complex calculations in no
time should definitely be possessing wide range of applications. In present time, not even a single
field can be thought of where computer is not been used.

Course Coordinator: Ms. Sarla More Page 2


Computer Education-I UNIT-I
Some of basic application areas are:
• Education
• Entertainment Industry
• Health care
• Business purpose
• Personal usage

How Computer Works:


Motherboard is the most essential part of the computer as it holds CPU and many primary
components together required for processing. A computer receives data through an input unit based
on the instructions it is given and once it gets any form of input from the user and then stores all the
data on to RAM,
Random Access Memory is a computer component where data used by the operating system and
software applications are being stored so that the CPU can process them quickly. Everything stored
on RAM is lost if the computer is shut off. There is a maximum limit of RAM you will need for the
computer to function properly.
Now, CPU will be fetching the data from the RAM and process it with the specified instructions and
giving signals out to other components through BUS and when the data is ready, it will be sent back
through an output device which can be a monitor, speaker, printer, ports, etc.

Impact on New Technology:


The innovation of this powerful computing device has its own impact on the technical world. All the
new technologies that are in the market place at present time are being developed on the
compatibility factor with respect to the computers. It also has tremendous impact on the
communication process as the level of communication has gone to some other levels all around the
globe.

Pro and Cons :


Course Coordinator: Ms. Sarla More Page 3
Computer Education-I UNIT-I

(i) Pro :
• Speed, Accuracy perform Complex calculations
• Large Amount of data can be stored and accessed attacks
• Online Learning, Research
• Increases in productivity
• In Business usage
(ii) Cons :
• Health issues if excessively used, thinking ability decreases
• A large amount of data is always affectionate to virus and hacking
• Lack of group activities regarding social activities
• Invites Online cyber crime
• Data Violation

What happens when we turn on computer?


A computer without a program running is just an inert hunk of electronics. The first thing a computer
has to do when it is turned on is to start up a special program called an operating system. The
operating system’s job is to help other computer programs to work by handling the messy details of
controlling the computer’s hardware.

An overview of the boot process

Course Coordinator: Ms. Sarla More Page 4


Computer Education-I UNIT-I
The boot process is something that happens every time you turn your computer on. You don’t really
see it, because it happens so fast. You press the power button come back a few minutes later and
Windows XP, or Windows Vista, or whatever Operating System you use is all loaded.

Functional Components of a Computer


Computer: A computer is a combination of hardware and software resources which integrate
together and provides various functionalities to the user. Hardware are the physical components of a
computer like the processor, memory devices, monitor, keyboard etc. while software is the set of
programs or instructions that are required by the hardware resources to function properly.
There are a few basic components that aids the working-cycle of a computer i.e. the Input- Process-
Output Cycle and these are called as the functional components of a computer. It needs certain input,
processes that input and produces the desired output. The input unit takes the input, the central
processing unit does the processing of data and the output unit produces the output. The memory
unit holds the data and instructions during the processing.

Digital Computer: A digital computer can be defined as a programmable machine which reads the
binary data passed as instructions, processes this binary data, and displays a calculated digital output.
Therefore, Digital computers are those that work on the digital data.

Details of Functional Components of a Digital Computer

Course Coordinator: Ms. Sarla More Page 5


Computer Education-I UNIT-I
• Input Unit: The input unit consists of input devices that are attached to the computer. These
devices take input and convert it into binary language that the computer understands. Some of
common input devices are keyboard, mouse, joystick, scanner etc.

• Central Processing Unit (CPU): Once the information is entered into the computer by the
input device, the processor processes it. The CPU is called the brain of the computer because it
is the control center of the computer. It first fetches instructions from memory and then
interprets them so as to know what is to be done. If required, data is fetched from memory or
input device. Thereafter CPU executes or performs the required computation and then either
stores the output or displays on the output device. The CPU has three main components which
are responsible for different functions – Arithmetic Logic Unit (ALU), Control Unit (CU) and
Memory registers

• Arithmetic and Logic Unit (ALU): The ALU, as its name suggests performs mathematical
calculations and takes logical decisions. Arithmetic calculations include addition, subtraction,
multiplication and division. Logical decisions involve comparison of two data items to see
which one is larger or smaller or equal.

• Control Unit: The Control unit coordinates and controls the data flow in and out of CPU and
also controls all the operations of ALU, memory registers and also input/output units. It is also
responsible for carrying out all the instructions stored in the program. It decodes the fetched
instruction, interprets it and sends control signals to input/output devices until the required
operation is done properly by ALU and memory.

• Memory Registers: A register is a temporary unit of memory in the CPU. These are used to
store the data which is directly used by the processor. Registers can be of different sizes(16 bit,
32 bit, 64 bit and so on) and each register inside the CPU has a specific function like storing
data, storing an instruction, storing address of a location in memory etc. The user registers can
be used by an assembly language programmer for storing operands, intermediate results etc.
Accumulator (ACC) is the main register in the ALU and contains one of the operands of an
operation to be performed in the ALU.

Course Coordinator: Ms. Sarla More Page 6


Computer Education-I UNIT-I
• Memory : Memory attached to the CPU is used for storage of data and instructions and is
called internal memory The internal memory is divided into many storage locations, each of
which can store data or instructions. Each memory location is of the same size and has an
address. With the help of the address, the computer can read any memory location easily
without having to search the entire memory. When a program is executed, its data is copied to
the internal memory and is stored in the memory till the end of the execution. The internal
memory is also called the Primary memory or Main memory. This memory is also called as
RAM, i.e. Random Access Memory. The time of access of data is independent of its location
in memory, therefore this memory is also called Random Access memory (RAM). Read this
for different types of RAMs
• Output Unit: The output unit consists of output devices that are attached with the computer. It
converts the binary data coming from CPU to human understandable form. The common
output devices are monitor, printer, plotter etc.

Characteristics of Computer System


A computer system is a basic and functional computer which includes all the hardware and
software which are required to make it functional for the user. It is an electronic device which
accepts the data as input process the data in pre-determined way and then communicates the result as
output on the screen.
CPU which stands for Central Processing Unit is the brain of the computer. It is an electronic circuit
within a computer that executes instructions that make up a computer program. Various blocks of
CPU are-
• It carries out the operations of arithmetic and logical expressions.
• Timing and Control Unit controls the entire operation being performed on the computer
system.
• Register is a very small amount of very fast memory that is built in the CPU in order to store
the current data and instructions which are being performed by the CPU.
• Memory unit is the storage unit of the computer system which is used to store the program
statement and data.
• Input and Output unit sends and receives to data to display it to user.

Course Coordinator: Ms. Sarla More Page 7


Computer Education-I UNIT-I

Characteristics of Computer System


1. Size of Data Bus –
It defines the number of bits that can be transferred through the data bus. It is also known as
the width of data bus. Data bus is bidirectional because micro-processor can read data from
memory or write data to memory.
2. Size of Address Bus –
The size of address bus determines the capacity of CPU or micro-processor to identify
different memory locations.
Chip Size- 2(raised power R) * N

Address Bus- 2(raised power R)

Address bus is unidirectional because the micro-processor is addressing a specific memory


location. No outside devices cannot write into micro-processors.
3. Word-length –
It is the amount of data that can be processed by CPU and micro-processor at a time. It
depends on the data bus, register, ALU etc. For example, 8-bit processor can process 8 bit data
at a time. A processor with larger word length can process data at a time with fastest speed as
compared to processor with shorter word length.
4. Capability –
It depends upon the number of instructions a micro-processor have and the flexibility provided
by each instruction.
5. Instruction Set –
It is the total number of instructions that a micro-processor can understand.
6. Band-Width –
It is the number of bits processed in a single instructions.
7. Data Types –
There are various types of data formats that can be handled by CPU or micro-processor such as
binary, BCD, ASCII, Sign and Unsigned numbers.
8. Input-Output Addressing capability –
It depends upon the input-output addresses provided by input-output instruction.

Course Coordinator: Ms. Sarla More Page 8


Computer Education-I UNIT-I
9. Clock Speed –
The clock speed finds out the number of operations per second, the processor can perform. The
CPU required a fix number of clock cycles to execute each instruction. The faster the clock,
then CPU executes more instructions per second. It is expressed in MHz or GHz.
1 MHz= 1 million cycles per second
1 GHz= 1 billion cycles per second

Classification of Computers
The computer systems can be classified on the following basis:
1. On the basis of size.
2. On the basis of functionality.
3. On the basis of data handling.

Classification on the basis of size


1. Super computers: The super computers are the highest performing system. A supercomputer
is a computer with a high level of performance compared to a general-purpose computer. The
actual Performance of a supercomputer is measured in FLOPS instead of MIPS. All of the
world’s fastest 500 supercomputers run Linux-based operating systems. Additional research is
being conducted in China, the US, the EU, Taiwan and Japan to build even faster, higher
performing and more technologically superior supercomputers. Supercomputers actually play
an important role in the field of computation, and are used for intensive computation tasks in
various fields, including quantum mechanics, weather forecasting, climate research, oil and gas
exploration, molecular modeling, and physical simulations and also Throughout the history,
supercomputers have been essential in the field of the cryptanalysis.
eg: PARAM, jaguar, roadrunner.

2. Mainframe computers : These are commonly called as big iron, they are usually used by big
organizations for bulk data processing such as statics, census data processing, transaction
processing and are widely used as the severs as these systems has a higher processing
capability as compared to the other classes of computers, most of these mainframe

Course Coordinator: Ms. Sarla More Page 9


Computer Education-I UNIT-I
architectures were established in 1960s, the research and development worked continuously
over the years and the mainframes of today are far more better than the earlier ones, in size,
capacity and efficiency. Eg: IBM z Series, System z9 and System z10 servers.

3. Mini computers : These computers came into the market in mid 1960s and were sold at a
much cheaper price than the main frames, they were actually designed for control,
instrumentation, human interaction, and communication switching as distinct from calculation
and record keeping, later they became very popular for personal uses with evolution.
In the 60s to describe the smaller computers that became possible with the use of transistors
and core memory technologies, minimal instructions sets and less expensive peripherals such
as the ubiquitous Teletype Model 33 ASR.They usually took up one or a few inch rack
cabinets, compared with the large mainframes that could fill a room, there was a new term
“MINICOMPUTERS” coined Eg: Personal Laptop, PC etc.

4. Micro computers: A microcomputer is a small, relatively inexpensive computer with a


microprocessor as its CPU. It includes a microprocessor, memory, and minimal I/O circuitry
mounted on a single printed circuit board. The previous to these computers, mainframes and
minicomputers, were comparatively much larger, hard to maintain and more expensive. They
actually formed the foundation for present day microcomputers and smart gadgets that we use
in day to day life. Eg: Tablets, Smartwatches.

Classification on the basis of functionality

1. Servers: Servers are nothing but dedicated computers which are set-up to offer some services
to the clients. They are named depending on the type of service they offered. Eg: security
server, database server.
2. Workstation: Those are the computers designed to primarily to be used by single user at a
time. They run multi-user operating systems. They are the ones which we use for our day to
day personal / commercial work.
3. Information Appliances: They are the portable devices which are designed to perform a
limited set of tasks like basic calculations, playing multimedia, browsing internet etc. They are

Course Coordinator: Ms. Sarla More Page 10


Computer Education-I UNIT-I
generally referred as the mobile devices. They have very limited memory and flexibility and
generally run on “as-is” basis.
4. Embedded computers: They are the computing devices which are used in other machines to
serve limited set of requirements. They follow instructions from the non-volatile memory and
they are not required to execute reboot or reset. The processing units used in such device work
to those basic requirements only and are different from the ones that are used in personal
computers- better known as workstations.

Classification on the basis of data handling


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. Anything 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

Course Coordinator: Ms. Sarla More Page 11


Computer Education-I UNIT-I

The application of Computers in various fields:


1. Business

A computer has high speed of calculation, diligence, accuracy, reliability, or versatility which has
made it an integrated part in all business organizations.
Computer is used in business organizations for −
• Payroll calculations
• Budgeting
• Sales analysis
• Financial forecasting
• Managing employee database
• Maintenance of stocks, etc.

2. Banking

Today, banking is almost totally dependent on computers.


Banks provide the following facilities −
• Online accounting facility, which includes checking current balance, making deposits and
overdrafts, checking interest charges, shares, and trustee records.
• ATM machines which are completely automated are making it even easier for customers to
deal with banks.

Course Coordinator: Ms. Sarla More Page 12


Computer Education-I UNIT-I

3. Insurance

Insurance companies are keeping all records up-to-date with the help of computers. Insurance
companies, finance houses, and stock broking firms are widely using computers for their concerns.
Insurance companies are maintaining a database of all clients with information showing −

• Procedure to continue with policies


• Starting date of the policies
• Next due installment of a policy
• Maturity date
• Interests due
• Survival benefits
• Bonus

4. Education

The computer helps in providing a lot of facilities in the education system.


• The computer provides a tool in the education system known as CBE (Computer Based
Education).
• CBE involves control, delivery, and evaluation of learning.

Course Coordinator: Ms. Sarla More Page 13


Computer Education-I UNIT-I
• Computer education is rapidly increasing the graph of number of computer students.
• There are a number of methods in which educational institutions can use a computer to
educate the students.
• It is used to prepare a database about performance of a student and analysis is carried out on
this basis.

5. Marketing
In marketing, uses of the computer are following −

• Advertising − With computers, advertising professionals create art and graphics, write and
revise copy, and print and disseminate ads with the goal of selling more products.
• Home Shopping − Home shopping has been made possible through the use of computerized
catalogues that provide access to product information and permit direct entry of orders to be
filled by the customers.

6. Healthcare
Computers have become an important part in hospitals, labs, and dispensaries. They are being used
in hospitals to keep the record of patients and medicines. It is also used in scanning and diagnosing
different diseases. ECG, EEG, ultrasounds and CT scans, etc. are also done by computerized
machines.
Following are some major fields of health care in which computers are used.

Course Coordinator: Ms. Sarla More Page 14


Computer Education-I UNIT-I
• Diagnostic System − Computers are used to collect data and identify the cause of illness.
• Lab-diagnostic System − All tests can be done and the reports are prepared by computer.
• Patient Monitoring System − These are used to check the patient's signs for abnormality
such as in Cardiac Arrest, ECG, etc.
• Pharma Information System − Computer is used to check drug labels, expiry dates,
harmful side effects, etc.
• Surgery − Nowadays, computers are also used in performing surgery.

7. Engineering Design
Computers are widely used for engineering purpose.
One of the major areas is CAD (Computer Aided Design) that provides creation and modification
of images. Some of the fields are −

• Structural Engineering − requires stress and strain analysis for design of ships, buildings,
budgets, airplanes, etc.
• Industrial Engineering − Computers deal with design, implementation, and improvement
of integrated systems of people, materials, and equipment.
• Architectural Engineering − Computers help in planning towns, designing buildings,
determining a range of buildings on a site using both 2D and 3D drawings.

8. Military

Course Coordinator: Ms. Sarla More Page 15


Computer Education-I UNIT-I
Computers are largely used in defense. Modern tanks, missiles, weapons, etc. Military also employs
computerized control systems. Some military areas where a computer has been used are −
• Missile Control
• Military Communication
• Military Operation and Planning
• Smart Weapons

9. Communication
Communication is a way to convey a message, an idea, a picture, or speech that is received and
understood clearly and correctly by the person for whom it is meant. Some main areas in this
category are −

• E-mail
• Chatting
• Usenet
• FTP
• Telnet
• Video-conferencing

10. Government
Computers play an important role in government services. Some major fields in this category are −

Course Coordinator: Ms. Sarla More Page 16


Computer Education-I UNIT-I
• Budgets
• Sales tax department
• Income tax department
• Computation of male/female ratio
• Computerization of voters lists
• Computerization of PAN card
• Weather forecasting

Data, Information and knowledge


What is Data?
Data is a collection of facts, such as numbers, words, measurements, observations or just
descriptions of things.
According to the Oxford “Data is distinct pieces of information, usually formatted in a special
way”.
Data is measured, collected and reported, and analyzed, whereupon it is often visualized using
graphs, images or other analysis tools. Raw data (“unprocessed data”) may be a collection of
numbers or characters before it’s been “cleaned” and corrected by researchers. It must be corrected
so that we can remove outliers, instrument or data entry errors. Data processing commonly occurs by
stages, and therefore the “processed data” from one stage could also be considered the “raw data” of
subsequent stage. Field data is data that’s collected in an uncontrolled “in situation” environment.
Experimental data is the data that is generated within the observation of scientific investigations.
Data can be generated by:
• Humans
• Machines
• Human-Machine combines.
It can often generate anywhere where any information is generated and stored in structured or
unstructured formats.

Course Coordinator: Ms. Sarla More Page 17


Computer Education-I UNIT-I
Why data is important?
• Data helps in make better decisions.
• Data helps in solve problems by finding the reason for underperformance.
• Data helps one to evaluate the performance.
• Data helps one improve processes.
• Data helps one understand consumers and the market.
Types of Data:
Generally data can be classified into two parts:
1. Categorical Data:
In categorical data we see the data which have a defined category, for example:
• Marital Status
• Political Party
• Eye color
2. Numerical Data:
Numerical data can further be classified into two categories:
• Discrete Data:
Discrete data contains the data which have discrete numerical values for example
Number of Children, Defects per Hour etc.
• Continuous Data:
Continuous data contains the data which have continuous numerical values for example
Weight, Voltage etc.

At advanced level, we can further classify the data into four parts:
1. Nominal Scale:
A nominal scale classifies data into several distinct categories in which no ranking criteria is
implied. For example Gender, Marital Status.
2. Ordinary Scale:
An ordinal scale classifies data into distinct categories during which ranking is implied For
example:
• Faculty rank : Professor, Associate Professor, Assistant Professor
• Students grade : A, B, C, D. E. F

Course Coordinator: Ms. Sarla More Page 18


Computer Education-I UNIT-I
3. Interval scale:
An interval scale may be an ordered scale during which the difference between measurements
is a meaningful quantity but the measurements don’t have a true zero point. For example:
• Temperature in Fahrenheit and Celsius.
• Years
4. Ratio scale:
A ratio scale may be an ordered scale during which the difference between the measurements is
a meaningful quantity and therefore the measurements have a true zero point. Hence, we can
perform arithmetic operations on real scale data. For example : Weight, Age, Salary etc.

Difference between Information and Data

Information:
Information is delineate because the structured, organized and processed data, conferred inside
context, that makes it relevant and helpful to the one who desires it. Data suggests that raw facts and
figures regarding individuals, places, or the other issue, that is expressed within the type of numbers
letters or symbols.
Information is that the knowledge that is remodeled and classified into an intelligible type, which
may be utilized in the method of deciding. In short, once knowledge end up to be purposeful when
conversion, it’s referred to as info. it’s one thing that informs, in essence, it provides a solution to a
specific question. It may be obtained from numerous sources like newspaper, internet, television,
people, books etc.

Data:
Data is a raw and unorganized fact that required to be processed to make it meaningful. It can be
consider as a facts and statistics collected together for reference or analysis.
Data are individual units of information. In analytical processes, data are represented by variables.
Data is always interpreted, by a human or machine, to derive meaning. So, data is meaningless. Data
contains numbers, statements, and characters in a raw form.

Course Coordinator: Ms. Sarla More Page 19


Computer Education-I UNIT-I

Difference between Information and Data


S.NO DATA INFORMATION

Data are the variables which help to Information's are the meaningful of
1 develop ideas/conclusions. data.

Information is refined form of actual


2 Data are text and numerical values. data.

3 Data doesn’t rely on Information. While Information relies on Data.

Bits and Bytes are the measuring unit Information is measured in meaningful
4 of data. units like time, quantity, etc.

Data can be easily structured as the Information can also be structured as


following: the following:
1.Tabular data 1.Language
2.Graph 2.Ideas
5 3.Data tree 3.Thoughts

Data does not have any specific Information carries a meaning that has
6 purpose been assigned by interpreting data.

7 It is low-level knowledge. It is the second level of knowledge.

Data does not directly helps in decision Information directly helps in decision
8 making. making.

Course Coordinator: Ms. Sarla More Page 20


Computer Education-I UNIT-I

Difference between Information and Knowledge

Information:
Information is delineate because the structured, organized and processed data, conferred inside
context, that makes it relevant and helpful to the one who desires it. Data suggests that raw facts and
figures regarding individuals, places, or the other issue, that is expressed within the type of numbers
letters or symbols.
Information is that the knowledge that is remodeled and classified into an intelligible type,
which may be utilized in the method of deciding. In short, once knowledge end up to be purposeful
when conversion, it’s referred to as info. it’s one thing that informs, in essence, it provides a solution
to a specific question. It may be obtained from numerous sources like newspaper, internet,
television, people, books etc.

Knowledge:
Knowledge refers to the familiarity and awareness of a person, place, events, thoughts, issues, things
or anything that is gathered through learning, knowing or discovering. it’s the state of knowing one
thing with cognizance through the understanding of ideas, study and skill. Knowledge pointed at the
assured theoretical or sensible understanding of associate entity
together with the potential of exploitation it for a selected purpose. Combination of information,
expertise and intuition ends up in knowledge that has the potential to draw inferences and develop
insights supported our expertise and so it will assist in higher cognitive process and taking actions.

Course Coordinator: Ms. Sarla More Page 21


Computer Education-I UNIT-I

Difference between Information and Knowledge

INFORMATION KNOWLEDGE

Information offers rises to the In contrast to, knowledge that inflicting the
1. concept of facts and data. understanding of the matter or subject.

Information is a combination of While it is a combination of experience,


2. context and data. perception and information.

3. Not all information is knowledge. Whereas all knowledge is information.

4. Information can be reflected. While it cannot be reflected or replicated.

Information alone isn’t enough to The expectation is feasible if one retains


5. form expectations. the desired information.

The transfer of information is


simple or straightforward over While the transfer of knowledge is hard in
numerous ways like newspaper, comparison of information as it requires
6. internet, television, people etc. learning.

Information brings understanding of Whereas knowledge point to the


7. facts and figures. understanding of the subject.

Course Coordinator: Ms. Sarla More Page 22


Computer Education-I UNIT-I

Computer Hardware, Software’s, Application Software,


System Software, Computer Memory, Basic block
diagram of Computer, Input/output Devices
Basic block diagram of Computer

Computer system consists of three parts that are central processing unit (CPU), Input Devices,
and Output Devices. The Central Processing Unit (CPU) is divided into two parts again: arithmetic
logic unit (ALU) and the control unit (CU). The set of instruction is in the form of raw data.

A large amount of data is stored in the computer memory with the help of primary and secondary
storage devices. The CPU is like the heart/brain of the computer. The user does not get the desired
output, without the necessary option taken by the CPU.

The Central processing unit (CPU) is responsible for the processing of all the instructions which are
given by the user to the computer system.

The data is entered through input devices such as the keyboard, mouse, etc. This set of instruction is
processed by the CPU after getting the input by the user, and then the computer system produces the
output.

The computer can show the output with the help of output devices to the user, such as monitor,
printer, etc.
• CPU (Central Processing Unit)
• Storage Unit
• ALU (Arithmetic Logic Unit)
• Control Unit

Course Coordinator: Ms. Sarla More Page 23


Computer Education-I UNIT-I

Central Processing Unit (CPU)


The computer system is nothing without the Central processing Unit so, it is also known as the brain
or heat of computer. The CPU is an electronic hardware device which can perform different types of
operations such as arithmetic and logical operation.
The CPU contains two parts: the arithmetic logic unit and control unit. We have discussed briefly the
arithmetic unit, logical unit, and control unit which are given below:

Course Coordinator: Ms. Sarla More Page 24


Computer Education-I UNIT-I

Arithmetic and Logical Unit


The arithmetic and logical unit is the combinational digital electronic circuit that can perform
arithmetic operations on integer binary numbers. It presents the arithmetic and logical operation. The
outputs of ALU will change asynchronously in response to the input. The basic arithmetic and
bitwise logic functions are supported by ALU.
The arithmetical logical unit is the combinational digital electronic circuit. It can perform
arithmetic and bitwise operations on integer binary numbers. The ALU is the fundamental building
block of many types of computing circuits. The ALU (Arithmetic Logical Unit) has the status of
inputs, outputs, or both which convey the information about the previous operation or the current
operation. The ALU has three parallel data buses consist of two input operand (A and B) and the
resulting output. Every data bus is the group of signals that transfer one binary integer number.
The single CPU (control processing unit), FPU (floating-point unit), and GPU (graphics processing
unit) contain multiple ALU’s (logical arithmetic units). The ALU has a variety of inputs and outputs
which are electrical conductors.

Course Coordinator: Ms. Sarla More Page 25


Computer Education-I UNIT-I

Control Unit
The control unit (CU) controls all the activities or operations which are performed inside the
computer system. It receives instructions or information directly from the main memory of the
computer. When the control unit receives an instruction set or information, it converts the instruction
set to control signals then; these signals are sent to the central processor for further processing. The
control unit understands which operation to execute, accurately, and in which order.

Course Coordinator: Ms. Sarla More Page 26


Computer Education-I UNIT-I

Storage Unit
The information or set of guidelines are stored in the storage unit of the computer system. The
storage unit provides the space to store the data or instruction of processed data. The information or
data is saved or hold in computer memory or storage device. The data storage is the core function
and fundamental of the computer components.

Components of Computer System


The hardware and software exist on the computer. The information which is stored through the
device is known as computer software. The hardware components of the computer system are related
to electronic and mechanical parts, and the software component is related to data and computer
programs. Many elements are connected to the main circuit board of the computer system called a
“motherboard.”
• Processor.
• Main Memory.
• Secondary Memory.
• Input Devices.
• Output Devices.
These are mainly five components of the computer system. The computer hardware, computer
software, and liveware exist in the element of the computer system.

Course Coordinator: Ms. Sarla More Page 27


Computer Education-I UNIT-I

Processor
The processor is an electric circuitry within the computer system. The Central processing unit is the
central processor or main processor of the computer system. The processor carries out the
instructions of the computer program with the help of basic arithmetic and logic, input/output
operations.
The Central Processing Unit is known as the central processor or main processor. The CPU is an
electronic circuitry within the computer which can control the input/output operations and carries out
the instructions of the computer program by the basic arithmetic and logical unit.

The CPU can control the instructions and data flow. The CPU contains internal memory units which
are known as registers. The registers contain data, instructions, counters, and addresses. Some
computers have two or more processors. The Central processing unit has two components which
are given below:

Course Coordinator: Ms. Sarla More Page 28


Computer Education-I UNIT-I

Main Memory
The Random Access Memory is the main memory of the computer system, which is known as RAM.
The main memory can store the operating system software, application software, and other
information. The Ram is one of the fastest memory, and it allows the data to be readable and
writeable.

Secondary memory
We can store the data and programs on a long-term basis in the secondary memory. The hard disks
and the optical disks are the common secondary devices. It is slow and cheap memory as compare to
primary memory. This memory is not connected to the processor directly.

It has a large capacity to store the data. The hard disk has a capacity of 500 gigabytes. The data and
programs on the hard disk are organized into files, and the file is the collection of data on the disk.
The secondary storage is direct access by the CPU; that’s why it is different from the primary
storage.

The hard disk is about 100 times the capacity of the main memory. The main difference between
primary and secondary storage is speed and capacity. There are several large blocks of data which
are copied from the hard disk into the main memory.

Input Devices
The user provides the set of instruction or information to the computer system with the help of input
devices such as the keyboard, mouse, scanner, etc. The data representation to the computer system is
in the form of binary language after that the processor processes the converted data. The input unit
implements the data which is instructed by the user to the system.

We can enter the data from the outside world into the primary storage as the input through input
devices. The input devices are the medium of communication between the outside world and the
computer system. There are some important features of input devices which are given below:

1. The input devices receive or accept the data or instruction from the user, who exist in the
outside world.

Course Coordinator: Ms. Sarla More Page 29


Computer Education-I UNIT-I
2. These devices convert the data or instruction into the machine-readable form for further
processing.
3. The input device performs like the connection between the outside world and our computer
system.
4. The keyboard and mouse are common examples of input devices.
5. When the whole procedure is finished, we get the desired output from the output devices
such as monitor, printer, etc.
There are several types of input devices, such as
• Keyboard
• Mouse
• Joystick
• Trackball
• Touch screen
• Light pen
• Digital Camera
• Scanner
• Digitizer Tablet
• Bar code Reader
• OMR
• OCR
• MICR
• ATM etc

Output Devices
The output devices produce or generate the desired result according to our input, such as a printer,
monitor, etc. These devices convert the data into a human-readable form from binary code.

The computer system is linked or connected to the outside world with the help of output devices.
The primary examples of output devices are a printer, projector, etc. These devices have various
features which are given below:

Course Coordinator: Ms. Sarla More Page 30


Computer Education-I UNIT-I
1. These devices receive or accept the data in the binary form.
2. The output devices convert the binary code into the human-readable form.
3. These devices produce the converted result and show to the user.
Output device is of several types
• Monitor
• Printer
• Plotter
• Projector
• Sound Speaker

Difference between Hardware and Software

Computer Hardware:
Hardware refers to the physical components of a computer. Computer Hardware is any part of the
computer that we can touch these parts. These are the primary electronic devices used to build up the
computer. Examples of hardware in a computer are the Processor, Memory Devices, Monitor,
Printer, Keyboard, Mouse, and the Central Processing Unit.
Hardware refers to the physical elements of a computer. This is also sometime called the
machinery or the equipment of the computer. Examples of hardware in a computer are the keyboard,
the monitor, the mouse and the central processing unit. However, most of a computer's hardware
cannot be seen; in other words, it is not an external element of the computer, but rather an internal
one, surrounded by the computer's casing (tower). A computer's hardware is comprised of many
different parts, but perhaps the most important of these is the motherboard. The motherboard is made
up of even more parts that power and control the computer.
In contrast to software, hardware is a physical entity. Hardware and software are
interconnected, without software, the hardware of a computer would have no function. However,
without the creation of hardware to perform tasks directed by software via the central processing
unit, software would be useless.
Hardware is limited to specifically designed tasks that are, taken independently, very
simple. Software implements algorithms (problem solutions) that allow the computer to complete
much more complex tasks.

Course Coordinator: Ms. Sarla More Page 31


Computer Education-I UNIT-I

Computer Software:
Software is a collection of instructions, procedures, documentation that performs different tasks on a
computer system. we can say also Computer Software is a programming code executed on a
computer processor. The code can be machine-level code or the code written for an operating
system. Examples of software are Ms Word, Excel, Power Point, Google Chrome, Photoshop,
MySQL etc.

Software, commonly known as programs or apps, consists of all the instructions that tell the
hardware how to perform a task. These instructions come from a software developer in the form that
will be accepted by the platform (operating system + CPU) that they are based on. For example, a
program that is designed for the Windows operating system will only work for that specific
operating system. Compatibility of software will vary as the design of the software and the operating
system differ. Software that is designed for Windows XP may experience a compatibility issue when
running under Windows 2000 or NT.

Software is capable of performing many tasks, as opposed to hardware which can only perform
mechanical tasks that they are designed for. Software provides the means for accomplishing many
different tasks with the same basic hardware. Practical computer systems divide software systems
into two major classes:

• System software: Helps run the computer hardware and computer system itself. System
software includes operating systems, device drivers, diagnostic tools and more. System
software is almost always pre-installed on your computer.
• Application software: Allows users to accomplish one or more tasks. It includes word
processing, web browsing and almost any other task for which you might install software.
(Some application software is pre-installed on most computer systems.)

Software is generally created (written) in a high-level programming language, one that is (more or
less) readable by people. These high-level instructions are converted into "machine language"
instructions, represented in binary code, before the hardware can "run the code". When you install
software, it is generally already in this machine language, binary, form.

Course Coordinator: Ms. Sarla More Page 32


Computer Education-I UNIT-I

Difference between Hardware and Software:

HARDWARE SOFTWARE

Hardware is a physical parts computer that Software is a set of instruction that tells a
causes processing of data. computer exactly what to do.

It is manufactured. It is developed and engineered.

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

As Hardware are physical electronic We can see and also use the software but
devices, we can see and touch hardware. can’t actually touch them.

It has four main categories: input device, It is mainly divided into System software,
output devices, storage, and internal Programming software and Application
components. software.

Hardware is not affected by computer


viruses. Software is affected by computer viruses.

It cannot be transferred from one place to


another electrically through network. But, it can be transferred.

If hardware is damaged, it is replaced with If software is damaged, its backup copy


new one. can be reinstalled.

Ex: Keyboard, Mouse, Monitor, Printer, Ex: Ms Word, Excel, Power Point,
CPU, Hard disk, RAM, ROM etc. Photoshop, MySQL etc.

Difference between System Software and Application Software


System Software:
System Software is the type of software which is the interface between
application software and system. Low level languages are used to write the system

Course Coordinator: Ms. Sarla More Page 33


Computer Education-I UNIT-I

software. System Software maintains the system resources and give the path for
application software to run. An important thing is that without system software,
system cannot run. It is general purpose software.

Application Software:
Application Software is he type of software which runs as per user request. It runs on the
platform which is providing by system software. High level languages are used to write the
application software. It's specific purpose software.
The main difference between System Software and Application Software is that without system
software, system cannot run on the other hand without application software, system always runs.

S.NO SYSTEM SOFTWARE APPLICATION SOFTWARE

System Software maintain the system


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

Low level languages are used to write While high level languages are used to
2. the system software. write the application software.

3. Its a general purpose software. While its a specific purpose software.

Without system software, system can’t While without application software system
4. run. always runs.

System software runs when system is


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

Example of system software are Example of application software are


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

System Software programming is Application software programming is


7. complex than application software. simpler as comparison to system software.

Course Coordinator: Ms. Sarla More Page 34


Computer Education-I UNIT-I

Computer - Input Devices


Following are some of the important input devices which are used in a computer −
• Keyboard

• Mouse

• Joy Stick

• Light pen

• Track Ball

• Scanner

• Graphic Tablet

• Microphone

• Magnetic Ink Card Reader(MICR)

• Optical Character Reader(OCR)

• Bar Code Reader

• Optical Mark Reader(OMR)

Keyboard

Keyboard is the most common and very popular input device which helps to input data to the
computer. The layout of the keyboard is like that of traditional typewriter, although there are some
additional keys provided for performing additional functions.

Keyboards are of two sizes 84 keys or 101/102 keys, but now keyboards with 104 keys or 108 keys
are also available for Windows and Internet.

The keys on the keyboard are as follows −

Course Coordinator: Ms. Sarla More Page 35


Computer Education-I UNIT-I

S.No Keys & Description

Typing Keys
1 These keys include the letter keys (A-Z) and digit keys (09) which generally give the same
layout as that of typewriters.

Numeric Keypad
2 It is used to enter the numeric data or cursor movement. Generally, it consists of a set of 17
keys that are laid out in the same configuration used by most adding machines and
calculators.

Function Keys
3 The twelve function keys are present on the keyboard which are arranged in a row at the top
of the keyboard. Each function key has a unique meaning and is used for some specific
purpose.

Control keys
4 These keys provide cursor and screen control. It includes four directional arrow keys.
Control keys also include Home, End, Insert, Delete, Page Up, Page Down, Control(Ctrl),
Alternate(Alt), Escape(Esc).

Special Purpose Keys


5 Keyboard also contains some special purpose keys such as Enter, Shift, Caps Lock, Num
Lock, Space bar, Tab, and Print Screen.

Mouse
Mouse is the most popular pointing device. It is a very famous cursor-control device having a small
palm size box with a round ball at its base, which senses the movement of the mouse and sends
corresponding signals to the CPU when the mouse buttons are pressed.
Generally, it has two buttons called the left and the right button and a wheel is present between the
buttons. A mouse can be used to control the position of the cursor on the screen, but it cannot be
used to enter text into the computer.

Course Coordinator: Ms. Sarla More Page 36


Computer Education-I UNIT-I

Advantages
• Easy to use
• Not very expensive

• Moves the cursor faster than the arrow keys of the keyboard.

Joystick

Joystick is also a pointing device, which is used to move the cursor position on a monitor screen. It
is a stick having a spherical ball at its both lower and upper ends. The lower spherical ball moves in
a socket. The joystick can be moved in all four directions.

The function of the joystick is similar to that of a mouse. It is mainly used in Computer Aided
Designing (CAD) and playing computer games.

Light Pen

Light pen is a pointing device similar to a pen. It is used to select a displayed menu item or draw
pictures on the monitor screen. It consists of a photocell and an optical system placed in a small
tube.

Course Coordinator: Ms. Sarla More Page 37


Computer Education-I UNIT-I

When the tip of a light pen is moved over the monitor screen and the pen button is pressed, its
photocell sensing element detects the screen location and sends the corresponding signal to CPU.

Track Ball
Track ball is an input device that is mostly used in notebook or laptop computer, instead of a
mouse. This is a ball which is half inserted and by moving fingers on the ball, the pointer can be
moved.

Since the whole device is not moved, a track ball requires less space than a mouse. A track ball
comes in various shapes like a ball, a button, or a square.

Scanner
Scanner is an input device, which works more like a photocopy machine. It is used when some
information is available on paper and it is to be transferred to the hard disk of the computer for
further manipulation.

Course Coordinator: Ms. Sarla More Page 38


Computer Education-I UNIT-I
Scanner captures images from the source which are then converted into a digital form that can be
stored on the disk. These images can be edited before they are printed.

Digitizer

Digitizer is an input device which converts analog information into digital form. Digitizer can
convert a signal from the television or camera into a series of numbers that could be stored in a
computer. They can be used by the computer to create a picture of whatever the camera had been
pointed at.

Digitizer is also known as Tablet or Graphics Tablet as it converts graphics and pictorial data into
binary inputs. A graphic tablet as digitizer is used for fine works of drawing and image
manipulation applications.

Microphone

Microphone is an input device to input sound that is then stored in a digital form.

The microphone is used for various applications such as adding sound to a multimedia presentation
or for mixing music.

Course Coordinator: Ms. Sarla More Page 39


Computer Education-I UNIT-I
Magnetic Ink Card Reader (MICR)
MICR input device is generally used in banks as there are large number of cheques to be processed
every day. The bank's code number and cheque number are printed on the cheques with a special
type of ink that contains particles of magnetic material that are machine readable.

This reading process is called Magnetic Ink Character Recognition (MICR). The main advantages
of MICR is that it is fast and less error prone.

Optical Character Reader (OCR)


OCR is an input device used to read a printed text.

OCR scans the text optically, character by character, converts them into a machine readable code,
and stores the text on the system memory.

Bar Code Readers

Bar Code Reader is a device used for reading bar coded data (data in the form of light and dark
lines). Bar coded data is generally used in labelling goods, numbering the books, etc. It may be a
handheld scanner or may be embedded in a stationary scanner.

Course Coordinator: Ms. Sarla More Page 40


Computer Education-I UNIT-I

Bar Code Reader scans a bar code image, converts it into an alphanumeric value, which is then fed
to the computer that the bar code reader is connected to.

Optical Mark Reader (OMR)


OMR is a special type of optical scanner used to recognize the type of mark made by pen or pencil.
It is used where one out of a few alternatives is to be selected and marked.

It is specially used for checking the answer sheets of examinations having multiple choice
questions.

Computer - Output Devices


Following are some of the important output devices used in a computer.
• Monitors
• Graphic Plotter

• Printer

Monitors

Monitors, commonly called as Visual Display Unit (VDU), are the main output device of a
computer. It forms images from tiny dots, called pixels that are arranged in a rectangular form. The
sharpness of the image depends upon the number of pixels.

Course Coordinator: Ms. Sarla More Page 41


Computer Education-I UNIT-I
There are two kinds of viewing screen used for monitors.

• Cathode-Ray Tube (CRT)


• Flat-Panel Display

Cathode-Ray Tube (CRT) Monitor

The CRT display is made up of small picture elements called pixels. The smaller the pixels, the
better the image clarity or resolution. It takes more than one illuminated pixel to form a whole
character, such as the letter ‘e’ in the word help.

A finite number of characters can be displayed on a screen at once. The screen can be divided into a
series of character boxes - fixed location on the screen where a standard character can be placed.
Most screens are capable of displaying 80 characters of data horizontally and 25 lines vertically.

There are some disadvantages of CRT −

• Large in Size
• High power consumption

Flat-Panel Display Monitor

The flat-panel display refers to a class of video devices that have reduced volume, weight and
power requirement in comparison to the CRT. You can hang them on walls or wear them on your
wrists. Current uses of flat-panel displays include calculators, video games, monitors, laptop
computer, and graphics display.

Course Coordinator: Ms. Sarla More Page 42


Computer Education-I UNIT-I

The flat-panel display is divided into two categories −

• Emissive Displays − Emissive displays are devices that convert electrical energy into light.
For example, plasma panel and LED (Light-Emitting Diodes).

• Non-Emissive Displays − Non-emissive displays use optical effects to convert sunlight or


light from some other source into graphics patterns. For example, LCD (Liquid-Crystal
Device).

Printers
Printer is an output device, which is used to print information on paper.

There are two types of printers −


• Impact Printers

• Non-Impact Printers

Impact Printers
Impact printers print the characters by striking them on the ribbon, which is then pressed on the
paper.

Characteristics of Impact Printers are the following −

• Very low consumable costs


• Very noisy

• Useful for bulk printing due to low cost

• There is physical contact with the paper to produce an image

Course Coordinator: Ms. Sarla More Page 43


Computer Education-I UNIT-I
These printers are of two types −
• Character printers
• Line printers
Character Printers
Character printers are the printers which print one character at a time.
These are further divided into two types:
• Dot Matrix Printer (DMP)
• Daisy Wheel

Dot Matrix Printer

In the market, one of the most popular printers is Dot Matrix Printer. These printers are popular
because of their ease of printing and economical price. Each character printed is in the form of
pattern of dots and head consists of a Matrix of Pins of size (5*7, 7*9, 9*7 or 9*9) which come out
to form a character which is why it is called Dot Matrix Printer.

Advantages
• Inexpensive
• Widely Used
• Other language characters can be printed

Disadvantages
• Slow Speed
• Poor Quality

Course Coordinator: Ms. Sarla More Page 44


Computer Education-I UNIT-I
Daisy Wheel

Head is lying on a wheel and pins corresponding to characters are like petals of Daisy (flower)
which is why it is called Daisy Wheel Printer. These printers are generally used for word-
processing in offices that require a few letters to be sent here and there with very nice quality.

Advantages
• More reliable than DMP
• Better quality
• Fonts of character can be easily changed
Disadvantages
• Slower than DMP
• Noisy
• More expensive than DMP

Line Printers

Line printers are the printers which print one line at a time.

These are of two types −


• Drum Printer
• Chain Printer

Course Coordinator: Ms. Sarla More Page 45


Computer Education-I UNIT-I
Drum Printer
This printer is like a drum in shape hence it is called drum printer. The surface of the drum is
divided into a number of tracks. Total tracks are equal to the size of the paper, i.e. for a paper width
of 132 characters, drum will have 132 tracks. A character set is embossed on the track. Different
character sets available in the market are 48 character set, 64 and 96 characters set. One rotation of
drum prints one line. Drum printers are fast in speed and can print 300 to 2000 lines per minute.
Advantages
• Very high speed
Disadvantages
• Very expensive
• Characters fonts cannot be changed
Chain Printer
In this printer, a chain of character sets is used; hence it is called Chain Printer. A standard
character set may have 48, 64, or 96 characters.
Advantages
• Character fonts can easily be changed.
• Different languages can be used with the same printer.
Disadvantages
• Noisy

Non-impact Printers
Non-impact printers print the characters without using the ribbon. These printers print a complete
page at a time, thus they are also called as Page Printers.
These printers are of two types −
• Laser Printers

• Inkjet Printers

Characteristics of Non-impact Printers


• Faster than impact printers
• They are not noisy
• High quality
• Supports many fonts and different character size

Course Coordinator: Ms. Sarla More Page 46


Computer Education-I UNIT-I
Laser Printers

These are non-impact page printers. They use laser lights to produce the dots needed to form the
characters to be printed on a page.

Advantages

• Very high speed

• Very high quality output

• Good graphics quality

• Supports many fonts and different character size

Disadvantages

• Expensive

• Cannot be used to produce multiple copies of a document in a single printing

Inkjet Printers

Inkjet printers are non-impact character printers based on a relatively new technology. They print
characters by spraying small drops of ink onto paper. Inkjet printers produce high quality output
with presentable features.

Course Coordinator: Ms. Sarla More Page 47


Computer Education-I UNIT-I

They make less noise because no hammering is done and these have many styles of printing modes
available. Color printing is also possible. Some models of Inkjet printers can produce multiple
copies of printing also.

Advantages
• High quality printing
• More reliable

Disadvantages
• Expensive as the cost per page is high

• Slow as compared to laser printer

Computer - Memory
A memory is just like a human brain. It is used to store data and instructions. Computer memory is
the storage space in the computer, where data is to be processed and instructions required for
processing are stored. The memory is divided into large number of small parts called cells.
Each location or cell has a unique address, which varies from zero to memory size minus one. For
example, if the computer has 64k words, then this memory unit has 64 * 1024 = 65536 memory
locations. The address of these locations varies from 0 to 65535.
Memory is primarily of three types −
• Cache Memory
• Primary Memory/Main Memory
• Secondary Memory

Course Coordinator: Ms. Sarla More Page 48


Computer Education-I UNIT-I

Cache Memory
Cache memory is a very high speed semiconductor memory which can speed up the CPU. It acts as
a buffer between the CPU and the main memory. It is used to hold those parts of data and program
which are most frequently used by the CPU. The parts of data and programs are transferred from
the disk to cache memory by the operating system, from where the CPU can access them.

Advantages: The advantages of cache memory are as follows −


• Cache memory is faster than main memory.
• It consumes less access time as compared to main memory.

• It stores the program that can be executed within a short period of time.

• It stores data for temporary use.

Disadvantages: The disadvantages of cache memory are as follows −


• Cache memory has limited capacity.
• It is very expensive.

Primary Memory (Main Memory)


Primary memory holds only those data and instructions on which the computer is currently
working. It has a limited capacity and data is lost when power is switched off. It is generally made
up of semiconductor device. These memories are not as fast as registers. The data and instruction
required to be processed resides in the main memory. It is divided into two subcategories RAM and
ROM.

Course Coordinator: Ms. Sarla More Page 49


Computer Education-I UNIT-I

Characteristics of Main Memory


• These are semiconductor memories.
• It is known as the main memory.
• Usually volatile memory.
• Data is lost in case power is switched off.
• It is the working memory of the computer.
• Faster than secondary memories.
• A computer cannot run without the primary memory.

Secondary Memory
This type of memory is also known as external memory or non-volatile. It is slower than the main
memory. These are used for storing data/information permanently. CPU directly does not access
these memories, instead they are accessed via input-output routines. The contents of secondary
memories are first transferred to the main memory, and then the CPU can access it. For example,
disk, CD-ROM, DVD, etc.

Course Coordinator: Ms. Sarla More Page 50


Computer Education-I UNIT-I
Characteristics of Secondary Memory
• These are magnetic and optical memories.

• It is known as the backup memory.

• It is a non-volatile memory.

• Data is permanently stored even if power is switched off.

• It is used for storage of data in a computer.

• Computer may run without the secondary memory.

• Slower than primary memories.

Random Access Memory


RAM (Random Access Memory) is the internal memory of the CPU for storing data, program, and
program result. It is a read/write memory which stores data until the machine is working. As soon
as the machine is switched off, data is erased.

Access time in RAM is independent of the address, that is, each storage location inside the memory
is as easy to reach as other locations and takes the same amount of time. Data in the RAM can be
accessed randomly but it is very expensive.
RAM is volatile, i.e. data stored in it is lost when we switch off the computer or if there is a power
failure. Hence, a backup Uninterruptible Power Supply (UPS) is often used with computers. RAM
is small, both in terms of its physical size and in the amount of data it can hold.
RAM is of two types −
• Static RAM (SRAM)
• Dynamic RAM (DRAM)

Course Coordinator: Ms. Sarla More Page 51


Computer Education-I UNIT-I

Static RAM (SRAM)

The word static indicates that the memory retains its contents as long as power is being supplied.
However, data is lost when the power gets down due to volatile nature. SRAM chips use a matrix of
6-transistors and no capacitors. Transistors do not require power to prevent leakage, so SRAM need
not be refreshed on a regular basis.

There is extra space in the matrix, hence SRAM uses more chips than DRAM for the same amount
of storage space, making the manufacturing costs higher. SRAM is thus used as cache memory and
has very fast access.
Characteristic of Static RAM
• Long life
• No need to refresh
• Faster
• Used as cache memory
• Large size
• Expensive
• High power consumption

Dynamic RAM (DRAM)


DRAM, unlike SRAM, must be continually refreshed in order to maintain the data. This is done by
placing the memory on a refresh circuit that rewrites the data several hundred times per second.
DRAM is used for most system memory as it is cheap and small. All DRAMs are made up of
memory cells, which are composed of one capacitor and one transistor.
Characteristics of Dynamic RAM
• Short data lifetime
• Needs to be refreshed continuously

• Slower as compared to SRAM


• Used as RAM
• Smaller in size
• Less expensive
• Less power consumption

Course Coordinator: Ms. Sarla More Page 52


Computer Education-I UNIT-I

Read Only Memory


ROM stands for Read Only Memory. The memory from which we can only read but cannot write
on it. This type of memory is non-volatile. The information is stored permanently in such memories
during manufacture. A ROM stores such instructions that are required to start a computer. This
operation is referred to as bootstrap. ROM chips are not only used in the computer but also in other
electronic items like washing machine and microwave oven.

Let us now discuss the various types of ROMs and their characteristics.
MROM (Masked ROM)

The very first ROMs were hard-wired devices that contained a pre-programmed set of data or
instructions. These kind of ROMs are known as masked ROMs, which are inexpensive.

PROM (Programmable Read Only Memory)

PROM is read-only memory that can be modified only once by a user. The user buys a blank
PROM and enters the desired contents using a PROM program. Inside the PROM chip, there are
small fuses which are burnt open during programming. It can be programmed only once and is not
erasable.

EPROM (Erasable and Programmable Read Only Memory)

EPROM can be erased by exposing it to ultra-violet light for a duration of up to 40 minutes.


Usually, an EPROM eraser achieves this function. During programming, an electrical charge is
trapped in an insulated gate region. The charge is retained for more than 10 years because the
charge has no leakage path. For erasing this charge, ultra-violet light is passed through a quartz

Course Coordinator: Ms. Sarla More Page 53


Computer Education-I UNIT-I
crystal window (lid). This exposure to ultra-violet light dissipates the charge. During normal use,
the quartz lid is sealed with a sticker.

EEPROM (Electrically Erasable and Programmable Read Only Memory)


EEPROM is programmed and erased electrically. It can be erased and reprogrammed about ten
thousand times. Both erasing and programming take about 4 to 10 ms (millisecond). In EEPROM,
any location can be selectively erased and programmed. EEPROMs can be erased one byte at a
time, rather than erasing the entire chip. Hence, the process of reprogramming is flexible but slow.
Advantages of ROM
The advantages of ROM are as follows −
• Non-volatile in nature
• Cannot be accidentally changed
• Cheaper than RAMs
• Easy to test
• More reliable than RAMs
• Static and do not require refreshing
• Contents are always known and can be verified

Motherboard
The motherboard serves as a single platform to connect all of the parts of a computer together. It
connects the CPU, memory, hard drives, optical drives, video card, sound card, and other ports and
expansion cards directly or via cables. It can be considered as the backbone of a computer.
Features of Motherboard
A motherboard comes with following features −
• Motherboard varies greatly in supporting various types of components.
• Motherboard supports a single type of CPU and few types of memories.
• Video cards, hard disks, sound cards have to be compatible with the motherboard to function
properly.
• Motherboards, cases, and power supplies must be compatible to work properly together.

Course Coordinator: Ms. Sarla More Page 54


Computer Education-I UNIT-I

Following are the popular manufacturers of the motherboard.


• Intel
• ASUS

• AOpen

• ABIT

• Biostar

• Gigabyte

• MSI

Description of Motherboard
The motherboard is mounted inside the case and is securely attached via small screws through pre-
drilled holes. Motherboard contains ports to connect all of the internal components. It provides a
single socket for CPU, whereas for memory, normally one or more slots are available.
Motherboards provide ports to attach the floppy drive, hard drive, and optical drives via ribbon
cables. Motherboard carries fans and a special port designed for power supply.

There is a peripheral card slot in front of the motherboard using which video cards, sound cards,
and other expansion cards can be connected to the motherboard.

On the left side, motherboards carry a number of ports to connect the monitor, printer, mouse,
keyboard, speaker, and network cables. Motherboards also provide USB ports, which allow
compatible devices to be connected in plug-in/plug-out fashion. For example, pen drive, digital
cameras, etc.

Course Coordinator: Ms. Sarla More Page 55


Computer Education-I UNIT-I

Computer - Memory Units


Memory unit is the amount of data that can be stored in the storage unit. This storage capacity is
expressed in terms of Bytes.

The following table explains the main memory storage units −

S.No. Unit & Description

1 Bit (Binary Digit)


A binary digit is logical 0 and 1 representing a passive or an active state of a component
in an electric circuit.

2 Nibble
A group of 4 bits is called nibble.

3 Byte
A group of 8 bits is called byte. A byte is the smallest unit, which can represent a data
item or a character.

4 Word
A computer word, like a byte, is a group of fixed number of bits processed as a unit,
which varies from computer to computer but is fixed for each computer.
The length of a computer word is called word-size or word length. It may be as small as 8
bits or may be as long as 96 bits. A computer stores the information in the form of
computer words.

The following table lists some higher storage units −

S.No. Unit & Description

1 Kilobyte (KB), 1 KB = 1024 Bytes

2 Megabyte (MB), 1 MB = 1024 KB

3 GigaByte (GB), 1 GB = 1024 MB

4 TeraByte (TB), 1 TB = 1024 GB

5 PetaByte (PB), 1 PB = 1024 TB

Course Coordinator: Ms. Sarla More Page 56


Computer Education-I UNIT-I

Computer - Ports
A port is a physical docking point using which an external device can be connected to the computer.
It can also be programmatic docking point through which information flows from a program to the
computer or over the Internet.

Characteristics of Ports

A port has the following characteristics −

• External devices are connected to a computer using cables and ports.

• Ports are slots on the motherboard into which a cable of external device is plugged in.

• Examples of external devices attached via ports are the mouse, keyboard, monitor,
microphone, speakers, etc.

Course Coordinator: Ms. Sarla More Page 57


Computer Education-I UNIT-I
Let us now discuss a few important types of ports −
Serial Port
• Used for external modems and older computer mouse
• Two versions: 9 pin, 25 pin model
• Data travels at 115 kilobits per second
Parallel Port
• Used for scanners and printers
• Also called printer port
• 25 pin model
• IEEE 1284-compliant Centronics port
PS/2 Port
• Used for old computer keyboard and mouse
• Also called mouse port
• Most of the old computers provide two PS/2 port, each for the mouse and keyboard
• IEEE 1284-compliant Centronics port
Universal Serial Bus (or USB) Port
• It can connect all kinds of external USB devices such as external hard disk, printer, scanner,
mouse, keyboard, etc.
• It was introduced in 1997.
• Most of the computers provide two USB ports as minimum.
• Data travels at 12 megabits per seconds.
• USB compliant devices can get power from a USB port.
VGA Port
• Connects monitor to a computer's video card.
• It has 15 holes.
• Similar to the serial port connector. However, serial port connector has pins, VGA port has
holes.
Power Connector
• Three-pronged plug.
• Connects to the computer's power cable that plugs into a power bar or wall socket.

Course Coordinator: Ms. Sarla More Page 58


Computer Education-I UNIT-I
Firewire Port
• Transfers large amount of data at very fast speed.

• Connects camcorders and video equipment to the computer.

• Data travels at 400 to 800 megabits per seconds.

• Invented by Apple.

• It has three variants: 4-Pin FireWire 400 connector, 6-Pin FireWire 400 connector, and 9-Pin
FireWire 800 connector.

Modem Port
• Connects a PC's modem to the telephone network.

Ethernet Port
• Connects to a network and high speed Internet.

• Connects the network cable to a computer.

• This port resides on an Ethernet Card.

• Data travels at 10 megabits to 1000 megabits per seconds depending upon the network
bandwidth.

Game Port
• Connect a joystick to a PC

• Now replaced by USB


Digital Video Interface, DVI port
• Connects Flat panel LCD monitor to the computer's high-end video graphic cards.

• Very popular among video card manufacturers.


Sockets
• Sockets connect the microphone and speakers to the sound card of the computer.

Course Coordinator: Ms. Sarla More Page 59


Computer Education-I UNIT-I

Computer - Hardware
Hardware represents the physical and tangible components of a computer, i.e. the components that
can be seen and touched.
Examples of Hardware are the following −
• Input devices − keyboard, mouse, etc.
• Output devices − printer, monitor, etc.
• Secondary storage devices − Hard disk, CD, DVD, etc.
• Internal components − CPU, motherboard, RAM, etc.

Relationship between Hardware and Software

• Hardware and software are mutually dependent on each other. Both of them must work
together to make a computer produce a useful output.

• Software cannot be utilized without supporting hardware.

• Hardware without a set of programs to operate upon cannot be utilized and is useless.

• To get a particular job done on the computer, relevant software should be loaded into the
hardware.

• Hardware is a one-time expense.

Course Coordinator: Ms. Sarla More Page 60


Computer Education-I UNIT-I
• Software development is very expensive and is a continuing expense.

• Different software applications can be loaded on hardware to run different jobs.

• Software acts as an interface between the user and the hardware.

• If the hardware is the 'heart' of a computer system, then the software is its 'soul'. Both are
complementary to each other.

Computer - Software
Software is a set of programs, which is designed to perform a well-defined function. A program is a
sequence of instructions written to solve a particular problem.
There are two types of software −
• System Software
• Application Software

System Software

The system software is a collection of programs designed to operate, control, and extend the
processing capabilities of the computer itself. System software is generally prepared by the
computer manufacturers. These software products comprise of programs written in low-level
languages, which interact with the hardware at a very basic level. System software serves as the
interface between the hardware and the end users.

Some examples of system software are Operating System, Compilers, Interpreter, Assemblers, etc.

Course Coordinator: Ms. Sarla More Page 61


Computer Education-I UNIT-I
Here is a list of some of the most prominent features of system software −

• Close to the system


• Fast in speed

• Difficult to design

• Difficult to understand

• Less interactive

• Smaller in size

• Difficult to manipulate

• Generally written in low-level language

Application Software

Application software products are designed to satisfy a particular need of a particular environment.
All software applications prepared in the computer lab can come under the category of Application
software.

Application software may consist of a single program, such as Microsoft's notepad for writing and
editing a simple text. It may also consist of a collection of programs, often called a software
package, which work together to accomplish a task, such as a spreadsheet package.

Examples of Application software are the following −

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

Course Coordinator: Ms. Sarla More Page 62


Computer Education-I UNIT-I

Features of application software are as follows −

• Close to the user


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

Course Coordinator: Ms. Sarla More Page 63


Computer Education-I UNIT-I

OPERATING SYSTEM
An operating system acts as an intermediary between the user of a computer and computer hardware.
The purpose of an operating system is to provide an environment in which a user can execute
programs in a convenient and efficient manner.

An operating system is software that manages the computer hardware. The hardware must provide
appropriate mechanisms to ensure the correct operation of the computer system and to prevent user
programs from interfering with the proper operation of the system.

Definition:
• An operating system is a program that controls the execution of application programs and acts
as an interface between the user of a computer and the computer hardware.
• A more common definition is that the operating system is the one program running at all times
on the computer (usually called the kernel), with all else being application programs.
• An operating system is concerned with the allocation of resources and services, such as
memory, processors, devices, and information. The operating system correspondingly includes
programs to manage these resources, such as a traffic controller, a scheduler, memory
management module, I/O programs, and a file system.

Goal of Operating system –


1. Convenience: An OS makes a computer more convenient to use.
2. Efficiency: An OS allows the computer system resources to be used in an efficient manner.

Course Coordinator: Ms. Sarla More Page 64


Computer Education-I UNIT-I

Objectives of Operating System


The objectives of the operating system are −

• To make the computer system convenient to use in an efficient manner.

• To hide the details of the hardware resources from the users.

• To provide users a convenient interface to use the computer system.

• To act as an intermediary between the hardware and its users, making it easier for the users
to access and use other resources.

• To manage the resources of a computer system.


• To keep track of who is using which resource, granting resource requests, and mediating
conflicting requests from different programs and users.

• To provide efficient and fair sharing of resources among users and programs.

Functions of operating System


Here is a list of some of the most prominent Functions of Operating Systems −

• Memory Management − Keeps track of the primary memory, i.e. what part of it is in use by
whom, what part is not in use, etc. and allocates the memory when a process or program
requests it.

• Process Management

• Processor Management − Allocates the processor (CPU) to a process and deallocates the
processor when it is no longer required.

• Device (I/O) Management − Keeps track of all the devices. This is also called I/O
controller that decides which process gets the device, when, and for how much time.

• File Management − Allocates and de-allocates the resources and decides who gets the
resources.

• Security − Prevents unauthorized access to programs and data by means of passwords and
other similar techniques.

Course Coordinator: Ms. Sarla More Page 65


Computer Education-I UNIT-I
• Job Accounting − Keeps track of time and resources used by various jobs and/or users.

• Control over System Performance − Records delays between the request for a service and
from the system.

• Interaction with the Operators − Interaction may take place via the console of the
computer in the form of instructions. The Operating System acknowledges the same, does
the corresponding action, and informs the operation by a display screen.

• Error-detecting Aids − Production of dumps, traces, error messages, and other debugging
and error-detecting methods.

• Coordination between Other Software and Users − Coordination and assignment of


compilers, interpreters, assemblers, and other software to the various users of the computer
systems.

Operating system as User Interface –


1. User
2. System and application programs
3. Operating system
4. Hardware

Conceptual view of a computer system

Course Coordinator: Ms. Sarla More Page 66


Computer Education-I UNIT-I
Every general-purpose computer consists of the hardware, operating system, system programs, and
application programs. The hardware consists of memory, CPU, ALU, and I/O devices, peripheral
device, and storage device. System program consists of compilers, loaders, editors, OS, etc. The
application program consists of business programs, database programs.
Every computer must have an operating system to run other programs. The operating system
coordinates the use of the hardware among the various system programs and application programs
for various users. It simply provides an environment within which other programs can do useful
work.
The operating system is a set of special programs that run on a computer system that allows it to
work properly. It performs basic tasks such as recognizing input from the keyboard, keeping track of
files and directories on the disk, sending output to the display screen and controlling peripheral
devices.
OS is designed to serve two basic purposes:
1. It controls the allocation and use of the computing System’s resources among the various user
and tasks.
2. It provides an interface between the computer hardware and the programmer that simplifies
and makes feasible for coding, creation, debugging of application programs.

The Operating system must support the following tasks. The tasks are:
1. Provides the facilities to create, modification of programs and data files using an editor.
2. Access to the compiler for translating the user program from high level language to machine
language.
3. Provide a loader program to move the compiled program code to the computer’s memory for
execution.
4. Provide routines that handle the details of I/O programming.

I/O System Management –


The module that keeps track of the status of devices is called the I/O traffic controller. Each I/O
device has a device handler that resides in a separate process associated with that device.
The I/O subsystem consists of
• A memory Management component that includes buffering caching and spooling.

Course Coordinator: Ms. Sarla More Page 67


Computer Education-I UNIT-I
• A general device driver interface.
• Drivers for specific hardware devices.

Assembler –
The input to an assembler is an assembly language program. The output is an object program plus
information that enables the loader to prepare the object program for execution. At one time, the
computer programmer had at his disposal a basic machine that interpreted, through hardware, certain
fundamental instructions. He would program this computer by writing a series of ones and Zeros
(Machine language), place them into the memory of the machine.

Compiler –
The High-level languages- examples are FORTRAN, COBOL, ALGOL and PL/I are processed by
compilers and interpreters. A compiler is a program that accepts a source program in a “high-level
language “and produces a corresponding object program. An interpreter is a program that appears to
execute a source program as if it was machine language. The same name (FORTRAN, COBOL, etc.)
is often used to designate both a compiler and its associated language.

Loader –
A Loader is a routine that loads an object program and prepares it for execution. There are various
loading schemes: absolute, relocating and direct-linking. In general, the loader must load, relocate
and link the object program. The loader is a program that places programs into memory and prepares
them for execution. In a simple loading scheme, the assembler outputs the machine language
translation of a program on a secondary device and a loader places it in the core. The loader places
into memory the machine language version of the user’s program and transfers control to it. Since
the loader program is much smaller than the assembler, those make more core available to the user’s
program.

Course Coordinator: Ms. Sarla More Page 68


Computer Education-I UNIT-I

Types of Operating System


• Batch Operating System- Sequence of jobs in a program on a computer without manual
interventions.
• Multiprogramming os
• Time sharing/Multi tasking operating System- allows many users to share the computer
resources.(Max utilization of the resources).
• Distributed operating System- Manages a group of different computers and makes appear to be
a single computer.
• Network operating system- computers running in different operating system can participate in
common network (It is used for security purpose).
• Real time operating system – meant applications to fix the deadlines.

Examples of Operating System are –


• MS DoS (CUI based)
• Windows (GUI based, PC)
• GNU/Linux (Personal, Workstations, ISP, File and print server, Three-tier client/Server)
• macOS (Macintosh), used for Apple’s personal computers and work stations (MacBook,
iMac).
• Android (Google’s Operating System for smartphones/tablets/smartwatches)
• iOS (Apple’s OS for iPhone, iPad and iPod Touch)

Important functions of an operating System:


1. Security –
The operating system uses password protection to protect user data and similar other
techniques. it also prevents unauthorized access to programs and user data.
2. Control over system performance –
Monitors overall system health to help improve performance. records the response time
between service requests and system response to have a complete view of the system health.
This can help improve performance by providing important information needed to troubleshoot
problems.

Course Coordinator: Ms. Sarla More Page 69


Computer Education-I UNIT-I
3. Job accounting –
Operating system Keeps track of time and resources used by various tasks and users, this
information can be used to track resource usage for a particular user or group of user.
4. Error detecting aids –
Operating system constantly monitors the system to detect errors and avoid the malfunctioning
of computer system.
5. Coordination between other software and users –
Operating systems also coordinate and assign interpreters, compilers, assemblers and other
software to the various users of the computer systems.
6. Memory Management –
The operating system manages the Primary Memory or Main Memory. Main memory is made
up of a large array of bytes or words where each byte or word is assigned a certain address.
Main memory is a fast storage and it can be accessed directly by the CPU. For a program to be
executed, it should be first loaded in the main memory. An Operating System performs the
following activities for memory management:
It keeps tracks of primary memory, i.e., which bytes of memory are used by which user
program. The memory addresses that have already been allocated and the memory addresses of
the memory that has not yet been used. In multi programming, the OS decides the order in
which process are granted access to memory, and for how long. It Allocates the memory to a
process when the process requests it and deallocates the memory when the process has
terminated or is performing an I/O operation.
7. Processor 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 tracks of the status of processes. The program which perform this task is known as
traffic controller. Allocates the CPU that is processor to a process. De-allocates processor when
a process is no more required.
8. Device Management –
An OS manages device communication via their respective drivers. It performs the following

Course Coordinator: Ms. Sarla More Page 70


Computer Education-I UNIT-I
activities for device management. Keeps tracks of all devices connected to system. designates a
program responsible for every device known as the Input/Output controller. Decides which
process gets access to a certain device and for how long. Allocates devices in an effective and
efficient way. Deallocates devices when they are no longer required.
9. 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 and status of every file and more… These facilities are collectively known as
the file system.
Moreover, Operating System also provides certain services to the computer system in one
form or the other.

The Operating System provides certain services to the users which can be listed in the following
manner:
1. Program Execution: The Operating System is responsible for execution of all types of programs
whether it be user programs or system programs. The Operating System utilises various
resources available for the efficient running of all types of functionalities.
2. Handling Input/Output Operations: The Operating System is responsible for handling all sort
of inputs, i.e, from keyboard, mouse, desktop, etc. The Operating System does all interfacing in
the most appropriate manner regrading all kind of Inputs and Outputs.
For example, there is difference in nature of all types of peripheral devices such as mouse or
keyboard, then Operating System is responsible for handling data between them.
3. Manipulation of File System: The Operating System is responsible for making of decisions
regarding the storage of all types of data or files, i.e, floppy disk/hard disk/pen drive, etc. The
Operating System decides as how should the data should be manipulated and stored.
4. Error Detection and Handling: The Operating System is responsible for detection of any types
of error or bugs that can occur while any task. The well secured OS sometimes also acts as
countermeasure for preventing any sort of breach to the Computer System from any external
source and probably handling them.

Course Coordinator: Ms. Sarla More Page 71


Computer Education-I UNIT-I
5. Resource Allocation: The Operating System ensures the proper use of all the resources
available by deciding which resource to be used by whom for how much time. All the decisions
are taken by the Operating System.
6.Accounting: The Operating System tracks an account of all the functionalities taking place in
the computer system at a time. All the details such as the types of errors occurred are recorded
by the Operating System.
7.Information and Resource Protection: The Operating System is responsible for using all the
information and resources available on the machine in the most protected way. The Operating
System must foil an attempt from any external resource to hamper any sort of data or
information.

Course Coordinator: Ms. Sarla More Page 72


Computer Education-I UNIT-I

COMPUTER NETWORK
For a specific purpose if things are connected together, are referred as a NETWORK. A network
can be of many types, like a telephone network, television network, computer network or even a
people network.

Similarly, a COMPUTER NETWORK is also a kind of setup, where it connects two or more
devices to share a range of services and information in the form of e-mails and
messages, databases, documents, web-sites, audios and videos, Telephone calls and video
conferences etc among them.

A PROTOCOL is nothing but set of defined rules, which has to be followed by every connected
devices across a network to communicate and share information among them. To facilitates End to
End communication, a number of protocols worked together to form a Protocol Suites or Stacks.
Some basic Protocols are:
• IP : Internet Protocol
• FTP : File Transfer Protocol
• SMTP : Simple Mail Transfer Protocol
• HTTP : Hyper Text Transfer Protocol
The Network reference models were developed to allow products from different manufacturers to
interoperate on a network. A network reference model serves as a blueprint, detailing standards for
how protocol communication should occur. The most widely recognized reference models are,
the Open Systems Interconnect ( OSI ) Model and Department of Defense ( DoD, also known
as TCP/IP ) model.

Network Types are often categorized by their size and functionality. According to the size, the
network can be commonly categorized into three types.
• LANs (Local Area Networks)
• MANs (Metropolitan Area Networks)
• WANs (Wide Area Networks)

Course Coordinator: Ms. Sarla More Page 73


Computer Education-I UNIT-I
An Internetwork is a general term describing multiple networks connected together. The Internet is
the largest and most well-known internetwork.
Some networks are categorized by their function, as opposed to their size. For example:

• SAN (Storage Area Network): A SAN provides systems with high-speed, lossless access to
high-capacity storage devices.
• VPN (Virtual Private Network): A VPN allows for information to be securely sent across a
public or unsecure network, such as the Internet. Common uses of a VPN are to connect branch
offices or remote users to a main office.

In a network, any connected device is called as host. A host can serve as following ways:
• A host can acts as a Client, when he is requesting information.
• A host can acts as a Server, when he provides information.
• A host can also request and provide information, is called Peer.

An interconnection of multiple devices, also known as hosts, that are connected using multiple paths
for the purpose of sending/receiving data or media. Computer networks can also include multiple
devices/mediums which help in the communication between two different devices; these are known
as Network devices and include things such as routers, switches, hubs, and bridges.

Network Topology
The layout arrangement of different devices in a network known as network topology. Common
examples include: Bus, Star, Mesh, Ring, and Daisy chain.

Course Coordinator: Ms. Sarla More Page 74


Computer Education-I UNIT-I

A computer network is a system in which multiple computers are connected to each other to share
information and resources.

Characteristics of a Computer Network


• Share resources from one computer to another.

• Create files and store them in one computer, access those files from the other computer(s)
connected over the network.

• Connect a printer, scanner, or a fax machine to one computer within the network and let
other computers of the network use the machines available over the network.

Following is the list of hardware's required to set up a computer network.

• Network Cables

• Distributors

• Routers

Course Coordinator: Ms. Sarla More Page 75


Computer Education-I UNIT-I
• Internal Network Cards

• External Network Cards

Network Cables

Network cables are used to connect computers. The most commonly used cable is Category 5 cable
RJ-45.

Distributors

A computer can be connected to another one via a serial port but if we need to connect many
computers to produce a network, this serial connection will not work.

The solution is to use a central body to which other computers, printers, scanners, etc. can be
connected and then this body will manage or distribute network traffic.

Router

A router is a type of device which acts as the central point among computers and other devices
those are a part of the network. It is equipped with holes called ports. Computers and other devices

Course Coordinator: Ms. Sarla More Page 76


Computer Education-I UNIT-I
are connected to a router using network cables. Now-a-days router comes in wireless modes using
which computers can be connected without any physical cable.

Network Card

Network card is a necessary component of a computer without which a computer cannot be


connected over a network. It is also known as the network adapter or Network Interface Card
(NIC). Most branded computers have network card pre-installed. Network cards are of two types:
Internal and External Network Cards.

Internal Network Cards

Motherboard has a slot for internal network card where it is to be inserted. Internal network cards
are of two types in which the first type uses Peripheral Component Interconnect (PCI) connection,
while the second type uses Instruction Set Architecture (ISA). Network cables are required to
provide network access.

External Network Cards


External network cards are of two types: Wireless and USB based. Wireless network card needs to
be inserted into the motherboard; however no network cable is required to connect to the network.

Course Coordinator: Ms. Sarla More Page 77


Computer Education-I UNIT-I

Universal Serial Bus (USB)

USB card is easy to use and connects via USB port. Computers automatically detect USB card and
can install the drivers required to support the USB network card automatically.

UNIQUE IDENTIFIERS OF NETWORK


Host name: Each device in the network is associated with a unique device name known as
Hostname. Type “hostname” in the command prompt (Administrator Mode) and press ‘Enter’, this
displays the hostname of your machine.

Course Coordinator: Ms. Sarla More Page 78


Computer Education-I UNIT-I

IP Address (Internet Protocol address):


Also known as the Logical Address, the IP Address is the network address of the system across the
network. To identify each device in the world-wide-web, the Internet Assigned Numbers Authority
(IANA) assigns an IPV4 (Version 4) address as a unique identifier to each device on the Internet.
The length of an IPv4 address is 32-bits, hence, we have 232 IP addresses available. The length of an
IPv6 address is 128-bits. Type “ipconfig” in the command prompt and press ‘Enter’, this gives us the
IP address of the device.

MAC Address (Media Access Control address):


Also known as physical address, the MAC Address is the unique identifier of each host and is
associated with its NIC (Network Interface Card). A MAC address is assigned to the NIC at the
time of manufacturing. The length of the MAC address is: 12-nibble/ 6 bytes/ 48 bits Type
“ipconfig/all” in the command prompt and press ‘Enter’, this gives us the MAC address.

Port: A port can be referred to as a logical channel through which data can be sent/received to an
application. Any host may have multiple applications running, and each of these applications is
identified using the port number on which they are running. A port number is a 16-bit integer,
hence, we have 216 ports available which are categorized as shown below:

PORT TYPES RANGE

Well known Ports 0 – 1023

Registered Ports 1024 – 49151

Course Coordinator: Ms. Sarla More Page 79


Computer Education-I UNIT-I

Ephemeral Ports 49152 – 65535


Number of ports: 65,536 and Range: 0 – 65535
Type “netstat -a” in the command prompt and press ‘Enter’, this lists all the ports being used.

Socket:
The unique combination of IP address and Port number together are termed as Socket.

Other related concepts


DNS Server: DNS stands for Domain Name system. DNS is basically a server which translates
web addresses or URLs (ex: www.google.com) into their corresponding IP addresses. We don’t have
to remember all the IP addresses of each and every website. The command ‘nslookup’ gives you
the IP address of the domain you are looking for. This also provides the information of our DNS
Server.

ARP:
ARP stands for Address Resolution Protocol. It is used to convert an IP address to its
Course Coordinator: Ms. Sarla More Page 80
Computer Education-I UNIT-I
corresponding physical address (i.e., MAC Address). ARP is used by the Data Link Layer to
identify the MAC address of the Receiver’s machine.

RARP:
RARP stands for Reverse Address Resolution Protocol. As the name suggests, it provides the IP
address of the device given a physical address as input. But RARP has become obsolete since the
time DHCP has come into the picture.

Advantages and Disadvantages of Computer Networking


Computer network is defined as a set of interconnected autonomous systems that facilitate
distributed processing of information. It results in better performance with high speed of processing.

Advantages of Network:
These are main advantages of Computer Networks:
1. Central Storage of Data –
Files can be stored on a central node (the file server) that can be shared and made available to
each and every user in an organization.
2. Anyone can connect to a computer network –
There is a negligible range of abilities required to connect to a modern computer network. The
effortlessness of joining makes it workable for even youthful kids to start exploiting the data.
3. Faster Problem solving –
Since an extensive procedure is disintegrated into a few littler procedures and each is taken care
of by all the associated gadgets, an explicit issue can be settled in lesser time.
4. Reliability –
Reliability implies backing up of information. Due to some reason equipment crash, and so on,
the information gets undermined or inaccessible on one PC; another duplicate of similar
information is accessible on another workstation for future use, which prompts smooth working
and further handling without interruption.
5. It is highly flexible –
This innovation is known to be truly adaptable, as it offers clients the chance to investigate

Course Coordinator: Ms. Sarla More Page 81


Computer Education-I UNIT-I
everything about fundamental things, for example, programming without influencing their
usefulness.
6. Security through Authorization –
Security and protection of information is additionally settled through system. As just the system
clients are approved to get to specific records or applications, no other individual can crack the
protection or security of information.
7. It boosts storage capacity –
Since you will share data, records and assets to other individuals, you need to guarantee all
information and substances are legitimately put away in the framework. With this systems
administration innovation, you can do the majority of this with no issue, while having all the
space you requirement for capacity.

Disadvantages of Network:
These are main disadvantages of Computer Networks:
1. It lacks robustness –
If a PC system’s principle server separates, the whole framework would end up futile. Also, if it
has a bridging device or a central linking server that fails, the entire network would also come
to a standstill. To manage these issues, gigantic systems ought to have a ground-breaking PC to
fill in as document server to influence setting to up and keeping up the system less demanding.
2. It lacks independence –
PC organizing includes a procedure that is worked utilizing PCs, so individuals will depend a
greater amount of PC work, rather than applying an exertion for their jobs that needs to be done.
Beside this, they will be subject to the primary document server, which implies that, in the
event that it separates, the framework would end up futile, making clients inactive.
3. Virus and Malware –
On the off chance that even one PC on a system gets contaminated with an infection, there is a
possibility for alternate frameworks to get tainted as well. Infections can spread on a system
effectively, in view of the between availability of different gadgets.
4. Cost of network –
The expense of executing the system including cabling and equipment can be expensive.

Course Coordinator: Ms. Sarla More Page 82


Computer Education-I UNIT-I

PROGRAMMING BASIC CONCEPTS


Computer programming is the act of writing computer programs, which are a sequence of
instructions written using a Computer Programming Language to perform a specified task by the
computer.

There are hundreds of programming languages, which can be used to write computer
programs and following are a few of them −

C Python C++ CoffeeScript VisualFoxPro Babel Racket

C# R Ruby Logo Lua Smalltalk Scheme

COBOL ADA Java Matlab F F# Shimula

Fortran BASIC Altair BASIC Dart Datalog dbase Clojure

True DarkBASIC
Visual BASIC GW BASIC Haskell dylan Julia
BASIC

QBASIC PureBASIC PASCAL ksh metro Mumps Assembly

Turbo Perl
GO ALGOL Nim OCaml pick
Pascal

LISP SCALA Swift TCL D CPL PHP

Rust Prolog Reia Curry ActionScript Erlang Java Script

Characteristics of a programming Language –


• A programming language must be simple, easy to learn and use, have good readability and
human recognizable.
• Abstraction is a must-have Characteristics for a programming language in which ability to
define the complex structure and then its degree of usability comes.
• A portable programming language is always preferred.
• Programming language’s efficiency must be high so that it can be easily converted into a
machine code and executed consumes little space in memory.
• A programming language should be well structured and documented so that it is suitable for
application development.

Course Coordinator: Ms. Sarla More Page 83


Computer Education-I UNIT-I
• Necessary tools for development, debugging, testing, maintenance of a program must be
provided by a programming language.
• A programming language should provide single environment known as Integrated
Development Environment (IDE).
• A programming language must be consistent in terms of syntax and semantics.

Uses of Computer Programs


Today computer programs are being used in almost every field, household, agriculture, medical,
entertainment, defense, communication, etc. Listed below are a few applications of computer
programs −
• MS Word, MS Excel, Adobe Photoshop, Internet Explorer, Chrome, etc., are examples
of computer programs.
• Computer programs are being used to develop graphics and special effects in movie
making.
• Computer programs are being used to perform Ultrasounds, X-Rays, and other medical
examinations.
• Computer programs are being used in our mobile phones for SMS, Chat, and voice
communication.
Algorithm
From programming point of view, an algorithm is a step-by-step procedure to resolve any problem.
An algorithm is an effective method expressed as a finite set of well-defined instructions. Thus, a
computer programmer lists down all the steps required to resolve a problem before writing the
actual code. Following is a simple example of an algorithm to find out the largest number from a
given list of numbers −
1. Get a list of numbers L1, L2, L3......LN
2. Assume L1 is the largest, Largest = L1
3. Take next number Li from the list and do the following
4. If Largest is less than Li
5. Largest = Li
6. If Li is last number from the list then
7. Print value stored in Largest and come out
8. Else repeat same process starting from step 3

Course Coordinator: Ms. Sarla More Page 84


Computer Education-I UNIT-I
The above algorithm has been written in a way to help beginners understand the concept. You will
come across more standardized ways of writing computer algorithms as you move on to advanced
levels of computer programming.
We assume you are well aware of English Language, which is a well-known Human Interface
Language. English has a predefined grammar, which needs to be followed to write English
statements in a correct way. Likewise, most of the Human Interface Languages (Hindi, English,
Spanish, French, etc.) are made of several elements like verbs, nouns, adjectives, adverbs,
propositions, and conjunctions, etc.
Similar to Human Interface Languages, Computer Programming Languages are also made of
several elements. The basics of those elements and make you comfortable to use them in various
programming languages. These basic elements include −
• Programming Environment
• Basic Syntax
• Data Types
• Variables
• Keywords
• Basic Operators
• Decision Making
• Loops
• Numbers
• Characters
• Arrays
• Strings
• Functions
• File I/O
Data Types
A data type is a means of classifying the type of data that a variable or object can hold in computer
programming. Data types are an important factor in all computer programming languages,
including C#, C++, JavaScript, and Visual Basic. When programmers develop computer software—
whether that’s desktop or web-based—data types must be assigned and applied correctly in order to
guarantee proper outcomes and an error-free program.

Course Coordinator: Ms. Sarla More Page 85


Computer Education-I UNIT-I
In programming, a data type is a categorization that specifies what kind of operation can be
applied to it without resulting in an error. The data type determines which operations can be safely
executed to develop, transpose, and apply the variable to another computation.

Common Data Types


• Integer – a whole number that can have a positive, negative, or zero value. It cannot be a
fraction, nor can it include decimal places. It is commonly used in programming, especially
for increasing values. Addition, subtraction, and multiplication of two integers results in an
integer. However, division of two integers may result in either an integer or a decimal. The
resulting decimal can be rounded off or truncated in order to produce an integer.
• Character – any number, letter, space, or symbol that can be entered in a computer. Every
character occupies one byte of space.
• String – used to represent text. It is composed of a set of characters that can include spaces
and numbers. Strings are enclosed in quotation marks to identify the data as strings, and not
as variable names, nor as numbers.
• Floating Point Number – a number that contains decimals. Numbers that contain fractions
are also considered floating-point numbers.
• Array – a kind of a list that contains a group of elements which can be of the same data type
as an integer or string. It is used to organize data for easier sorting and searching of related
sets of values.
• Varchar – as the name implies, a varchar is a variable character, on account of the fact that
the memory storage has variable length. Each character occupies one byte of space, plus 2
bytes additional for length information.
Note: Use Character for data entries with fixed lengths, like phone numbers, but use Varchar for data
entries with variable lengths, like address.
• Boolean – used for creating true or false statements. To compare values the following
operators are being used: AND, OR, XOR, and NOT.
• Date, Time and Timestamp – these data types are used to work with data containing dates
and times.

Course Coordinator: Ms. Sarla More Page 86


Computer Education-I UNIT-I

We can use the sizeof() operator to check the size of a variable. See the following C program for the
usage of the various data types:
#include <stdio.h>
Int x=5;
Void main()
{
int a = 1;
char b ='G';
double c = 3.14;
printf("Hello World!\n", a);

//printing the variables defined above along with their sizes


printf("Hello! I am a character. My value is %c and "
"my size is %lu byte.\n", sizeof(b));
printf("Hello! I am an integer. My value is %d and "
"my size is %lu bytes.\n", sizeof(a));
//can use sizeof(a) above as well
printf("Hello! I am a double floating point variable."
" My value is %lf and my size is %lu bytes.\n", sizeof(c));
//can use sizeof(c) above as well
printf("Bye! See you soon. :)\n");

return 0;
}

Output:
Course Coordinator: Ms. Sarla More Page 87
Computer Education-I UNIT-I
Hello World!
Hello! I am a character. My value is G and my size is 1 byte.
Hello! I am an integer. My value is 1 and my size is 4 bytes.
Hello! I am a double floating point variable. My value is 3.140000 and my
size i
s 8 bytes.
Bye! See you soon. :)

Variables
Variables: Names provided for computer memory locations used for storing values within a
computer program. First, you have to create variables with appropriate names and then store values
in those 2 variables. Following this, there is retrieval and usage of stored values from these variables.
Another name for creating variables is declaring variables. Depending upon which programming
language is used, there are different ways of creating variables inside the program.

Characteristics of Variables
A variable can hold only a certain single type of value. For instance, if the variable has been
defined as an int or char type, it can only store integers or characters.
C programming language requires variable creation while Python does not. So, the rules of the game
are different depending upon which computer programming language is being used.
1. Programming languages such as Python, Perl, and PHP do not require specification of the data
type at the time of variable creation.
2. Any name or label can be given to a variable.
3. Very few programming languages permit starting the variable names with a digit
Once created variables come about, you can store values in those variables. The use of stored
values in the variables is the purpose of the entire exercise. In C programming, different data
types can be printed using different percentages and characters.

Variables are used to store information to be referenced and manipulated in a computer


program. They also provide a way of labeling data with a descriptive name, so our progra ms
can be understood more clearly by the reader and ourselves. It is helpful to think of variables as

Course Coordinator: Ms. Sarla More Page 88


Computer Education-I UNIT-I
containers that hold information. Their sole purpose is to label and store data in memory. This
data can then be used throughout your program.

Functions
Functions are self-contained modules of code that accomplish a particular task. Once a
function is written, it can be called and used repeatedly. They operate like a black box: data goes in,
the function operates on it, and processed data comes out. Functions let you reuse code rather than
constantly rewrite it, and allow you to think about your program as a series of sub-steps. Functions
are also known as routines or subroutines.
Functions allow modularizing a program. The program can be divided into many parts
(where each part does a specific set of tasks). Each part can then be implemented as a function. This
approach makes the program development easy and easy to manage. Also, the parts that are designed
to do specific work can be specialized so that they can be used in more than one program. This is
commonly known as software reusability.
The function definition comprises the sequence of statements that will be executed each time
the function is invoked. The general format of a function definition is the following:
return-value-type function-name (parameter-list with their types)
{
local variable declarations
statements
return result
}
The most common function that everybody uses is the main function. Each C++ program requires a
main function which is called by the system on execution of the program. Each function has to
declare its own local variables and contains a set of statements that do a specific task

Constants
Constant is a any value that cannot be changed during program execution. In C, any number,
single character, or character string is known as a constant. A constant is an entity that doesn’t
change whereas a variable is an entity that may change. For example, the number 50 represents a

Course Coordinator: Ms. Sarla More Page 89


Computer Education-I UNIT-I
constant integer value. The character string "Programming in C is fun.\n" is an example of a constant
character string. C constants can be divided into two major categories:
• Primary Constants
• Secondary Constants

Operator
This is a symbol use to perform some operation on variables, operands or with the constant.
Some operator required 2 operand to perform operation or some required single operation. Several
operators are there those are, arithmetic operator, assignment, increment, decrement, logical,
conditional, comma, size of, bitwise and others.

1. Arithmetic Operator
This operator used for numeric calculation. These are of either Unary arithmetic operator,
Binary arithmetic operator. Where Unary arithmetic operator required 25 *Under revision only one
operand such as +,-, ++, --,!, tiled. And these operators are addition, subtraction, multiplication,
division. Binary arithmetic operator on other hand required two operand and its operators are
+(addition), -(subtraction), *(multiplication), /(division), %(modulus). But modulus cannot applied
with floating point operand as well as there are no exponent operator in c. Unary (+) and Unary (-) is
different from addition and subtraction. When the operands are integer then it is called integer
arithmetic and the result is always integer. When both the operand are floating point then it is called
floating arithmetic and when operand is of integer and floating point then it is called mix type or
mixed mode arithmetic . And the result is in float type.

2. Assignment Operator
A value can be stored in a variable with the use of assignment operator. The assignment
operator (=) is used in assignment statement and assignment expression. Operand on the left hand
side should be variable and the operand on the right hand side should be variable or constant or any
expression. When variable on the left hand side is occur on the right hand side then we can avoid by
writing the compound statement. For example,
int x= y;
int Sum=x+y+z;

Course Coordinator: Ms. Sarla More Page 90


Computer Education-I UNIT-I
3. Increment and Decrement
The Unary operator ++, --, is used as increment and decrement which acts upon single
operand. Increment operator increases the value of variable by one .Similarly decrement operator
decrease the value of the variable by one. And these operator can only used with the variable, but
cann't use with expression and constant as ++6 or ++(x+y+z).
It again categories into prefix post fix. In the prefix the value of the variable is incremented
1st, and then the new value is used, where as in postfix the operator is written after the operand (such
as m++, m--). EXAMPLE
let y=12;
z= ++y;
y= y+1;
Similarly in the postfix increment and decrement operator is used in the operation. And then
increment and decrement is performed. EXAMPLE
let x= 5;
y= x++;
y=x;
x= x+1;

4. Relational Operator
It is use to compared value of two expressions depending on their relation. Expression that
contain relational operator is called relational expression. Here the value is assign according to true
or false value.
a. (a>=b) || (b>20)
b. (b>a) && (e>b)
c. 0(b!=7)

5. Conditional Operator

It sometimes called as ternary operator. Since it required three expressions as operand and it
is represented as (? , :).

SYNTAX

exp1 ? exp2 : exp3

Course Coordinator: Ms. Sarla More Page 91


Computer Education-I UNIT-I
Here exp1 is first evaluated. It is true then value return will be exp2 . If false then exp3. EXAMPLE

void main()

int a=10, b=2

int s = (a>b) ? a : b;

printf(“value is:%d”);

Output: Value is:10

6. Comma Operator
Comma operator is use to permit different expression to be appear in a situation where only
one expression would be used. All the expression are separator by comma and are evaluated from
left to right. EXAMPLE
int i, j, k, l;
for(i=1,j=2;i<=5;j<=10;i++;j++)

7. Sizeof Operator
Size of operator is a Unary operator, which gives size of operand in terms of byte that
occupied in the memory. An operand may be variable, constant or data type qualifier. Generally it is
used make portable program(program that can be run on different machine) . It determines the length
of entities, arrays and structures when their size are not known to the programmer. It is also use to
allocate size of memory dynamically during execution of the program. EXAMPLE
main( )
{
int sum;
float f;
printf( "%d%d" ,size of(f), size of (sum));
printf("%d%d", size of(235 L), size of(A));
}

Course Coordinator: Ms. Sarla More Page 92


Computer Education-I UNIT-I
8. Bitwise Operator
Bitwise operator permit programmer to access and manipulate of data at bit level. Various
bitwise operator enlisted are
one's complement (~)
bitwise AND (&)
bitwise OR (|)
bitwise XOR (^)
left shift (<<)
right shift (>>)
These operators can operate on integer and character value but not on float and double. In
bitwise operator the function showbits ( ) is used to display the binary representation of any integer
or character value. In one's complement all 0 changes to 1 and all 1 changes to 0. In the bitwise OR
its value would obtaining by 0 to 2 bits. As the bitwise OR operator is used to set on a particular bit
in a number. Bitwise AND the logical AND. It operate on 2operands and operands are compared on
bit by bit basic. And hence both the operands are of same type.
Logical or Boolean Operator used with one or more operand and return either value zero (for
false) or one (for true). The operand may be constant, variables or expressions. And the expression
that combines two or more expressions is termed as logical expression. C has three logical operators:
Operator Meaning

&& AND

|| OR

! NOT

Where logical NOT is a unary operator and other two are binary operator. Logical AND gives result
true if both the conditions are true, otherwise result is false. And logial OR gives result false if both
the condition false, otherwise result is true.

Course Coordinator: Ms. Sarla More Page 93


Computer Education-I UNIT-I

Precedence and associatively of operators


Operators Description Precedence level Associativity
() function call 1 left to right
[] array subscript
arrow operator
. dot operator
+ Unary plus 2 right to left
- Unary minus
++ Increment
-- Decrement
! Logical not
~ 1's complement
* Indirection
& Address
sizeof Size in byte
* Multiplication 3 left to right
/ Division
% Modulus
+ Addition 4 left to right
- Subtraction
<< Left shift 5 left to right
>> Right shift
<= Less than equal to 6 left to right
>= Greater than equal
to
< Less than
> Greater than
== Equal to 7
!= Not equal to left to right

Course Coordinator: Ms. Sarla More Page 94


Computer Education-I UNIT-I
& Bitwise AND 8 left to right
^ Bitwise XOR 9 left to right
| Bitwise OR 10 left to right
&& Logical AND 11
|| Logical OR 12
?: Conditional 13
operator
=, assignment 14 right to left
*=, operator
/=,
%=
&=,
^=,
<<=
>>=
, Comma operator 15

Control Structures in Programming Languages


Control Structures are just a way to specify flow of control in programs. Any algorithm or
program can be clearer and understood if they use self-contained modules called as logic or control
structures. It basically analyzes and chooses in which direction a program flows based on certain
parameters or conditions. There are three basic types of logic, or flow of control, known as:
1. Sequence logic, or sequential flow
2. Selection logic, or conditional flow
3. Iteration logic, or repetitive flow

1. Sequential Logic (Sequential Flow)


Sequential logic as the name suggests follows a serial or sequential flow in which flow depends
on series of instructions given to the computer. Unless new instructions are given, the modules

Course Coordinator: Ms. Sarla More Page 95


Computer Education-I UNIT-I
are executed in the obvious sequence. The sequences may be given, by means of numbered
steps explicitly. Also, implicitly follows the order in which modules are written. Most of the
processing, even some complex problems, will generally follow this elementary flow pattern.

Sequential Control flow


2. Selection Logic (Conditional Flow)
Selection Logic simply involves a number of conditions or parameters which decides one out of
several written modules. The structures which use these type of logic are known as Conditional
Structures. These structures can be of three types:
• if
• if/else
• switch

• Single AlternativeThis structure has the form:


If (condition) then:
[Module A]
[End of If structure]
• Double AlternativeThis structure has the form:
If (Condition), then:
[Module A]
Else:
[Module B]
[End if structure]
• Multiple AlternativesThis structure has the form:

Course Coordinator: Ms. Sarla More Page 96


Computer Education-I UNIT-I
If (condition A), then:
[Module A]
Else if (condition B), then:
[Module B]
..
..
Else if (condition N), then:
[Module N]
[End If structure]

In this way, the flow of the program depends on the set of conditions that are written. This can be
more understood by the following flow charts:

Double Alternative Control Flow

3. Iteration Logic (Repetitive Flow)


The Iteration logic employs a loop which involves a repeat statement followed by a module
known as the body of a loop.
• while

Course Coordinator: Ms. Sarla More Page 97


Computer Education-I UNIT-I
• do/while
• for
The two types of these structures are:
• Repeat-For Structure
This structure has the form:
Repeat for i = A to N by I:
[Module]
[End of loop]
Here, A is the initial value, N is the end value and I is the increment. The loop ends when A>B.
K increases or decreases according to the positive and negative value of I respectively.

Repeat-For Flow

• Repeat-While Structure
It also uses a condition to control the loop. This structure has the form:
Repeat while condition:
[Module]
[End of Loop]

Course Coordinator: Ms. Sarla More Page 98


Computer Education-I UNIT-I

Repeat While Flow

In this, there requires a statement that initializes the condition controlling the loop, and there must
also be a statement inside the module that will change this condition leading to the end of the loop.

Structured Programming Approach,


As the word suggests, can be defined as a programming approach in which the program is made as a
single structure. It means that the code will execute the instruction by instruction one after the other.
It doesn’t support the possibility of jumping from one instruction to some other with the help of any
statement like GOTO, etc. Therefore, the instructions in this approach will be executed in a serial
and structured manner. The languages that support Structured programming approach are:
• C
• C++
• Java
• C…...etc

Course Coordinator: Ms. Sarla More Page 99


Computer Education-I UNIT-I
On the contrary, in the Assembly languages like Microprocessor 8085, etc, the statements do not get
executed in a structured manner. It allows jump statements like GOTO. So the program flow might
be random.
The structured program mainly consists of three types of elements:
• Selection Statements
• Sequence Statements
• Iteration Statements
The structured program consists of well structured and separated modules. But the entry and
exit in a structured program is a single-time event. It means that the program uses single-entry and
single-exit elements. Therefore a structured program is well maintained, neat and clean program.
This is the reason why the Structured Programming Approach is well accepted in the programming
world.

Advantages of Structured Programming Approach:


1. Easier to read and understand
2. User Friendly
3. Easier to Maintain
4. Mainly problem based instead of being machine based
5. Development is easier as it requires less effort and time
6. Easier to Debug
7. Machine-Independent, mostly.

Disadvantages of Structured Programming Approach:


1. Since it is Machine-Independent, So it takes time to convert into machine code.
2. The converted machine code is not the same as for assembly language.
3. The program depends upon changeable factors like data-types. Therefore it needs to be
updated with the need on the go.
4. Usually the development in this approach takes longer time as it is language-dependent.
Whereas in the case of assembly language, the development takes lesser time as it is fixed for
the machine.

Course Coordinator: Ms. Sarla More Page 100


Computer Education-I UNIT-I

Procedural Programming:
Procedural Programming can be defined as a programming model which is derived from
structured programming, based upon the concept of calling procedure. Procedures, also known as
routines, subroutines or functions, simply consist of a series of computational steps to be carried out.
During a program’s execution, any given procedure might be called at any point, including by other
procedures or itself.
Languages used in Procedural Programming:
FORTRAN, ALGOL, COBOL,
BASIC, Pascal and C.

Object Oriented Programming:


Object oriented programming can be defined as a programming model which is based upon the
concept of objects. Objects contain data in the form of attributes and code in the form of methods. In
object oriented programming, computer programs are designed using the concept of objects that
interact with real world. Object oriented programming languages are various but the most popular
ones are class-based, meaning that objects are instances of classes, which also determine their types.
Languages used in Object Oriented Programming:
Java, C++, C#, Python,
PHP, JavaScript, Ruby, Perl,
Objective-C, Dart, Swift, Scala.

Difference between Procedural Programming and Object Oriented


Programming:

PROCEDURAL ORIENTED PROGRAMMING OBJECT ORIENTED PROGRAMMING

In procedural programming, program is In object oriented programming, program is


divided into small parts called functions. divided into small parts called objects.

Procedural programming follows top down Object oriented programming follows bottom
approach. up approach.

There is no access specifier in procedural Object oriented programming have access

Course Coordinator: Ms. Sarla More Page 101


Computer Education-I UNIT-I

PROCEDURAL ORIENTED PROGRAMMING OBJECT ORIENTED PROGRAMMING

programming. specifiers like private, public, protected etc.

Adding new data and function is not easy. Adding new data and function is easy.

Procedural programming does not have any Object oriented programming provides data
proper way for hiding data so it is less secure. hiding so it is more secure.

In procedural programming, overloading is not Overloading is possible in object oriented


possible. programming.

In procedural programming, function is more In object oriented programming, data is more


important than data. important than function.

Procedural programming is based on unreal Object oriented programming is based


world. on real world.

Examples: C, FORTRAN, Pascal, Basic etc. Examples: C++, Java, Python, C# etc.

Procedural Structural Object Oriented

1.Simple, easy implementation 1. Programs are 1. Improved software development


of compilers and interpreters more easily and productivity due to modularity,
more quickly extensibility and reusability.
2. The ability to re-use the same written
code at different places in the 2. Software Maintenance is
program without copying it. 2. Programs are improved
reliable as fewer 3. Reusability helps in faster
3. An easier way to keep track of organizational and development of programs, as the
program flow. logical errors occur language comes worth rich library
during the initial of objects
4. The ability to be strongly stages of program
modular or structured. development. 4. Lower cost of Development

5. Needs only less memory. 5. Higher quality of software can


be ensured

Course Coordinator: Ms. Sarla More Page 102

You might also like