Unit I PDF
Unit I PDF
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.
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.
(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
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.
• 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.
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.
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
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.
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
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
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 −
4. Education
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.
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
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 −
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
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.
Data are the variables which help to Information's are the meaningful of
1 develop ideas/conclusions. data.
Bits and Bytes are the measuring unit Information is measured in meaningful
4 of data. units like time, quantity, etc.
Data does not have any specific Information carries a meaning that has
6 purpose been assigned by interpreting data.
Data does not directly helps in decision Information directly helps in decision
8 making. making.
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.
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.
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
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.
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.
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:
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.
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:
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.
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.
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.
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.
Ex: Keyboard, Mouse, Monitor, Printer, Ex: Ms Word, Excel, Power Point,
CPU, Hard disk, RAM, ROM etc. Photoshop, MySQL etc.
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.
Low level languages are used to write While high level languages are used to
2. the system software. write the application software.
Without system software, system can’t While without application software system
4. run. always runs.
• Mouse
• Joy Stick
• Light pen
• Track Ball
• Scanner
• Graphic Tablet
• Microphone
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.
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).
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.
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.
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.
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.
This reading process is called Magnetic Ink Character Recognition (MICR). The main advantages
of MICR is that it is fast and less error prone.
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 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.
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.
It is specially used for checking the answer sheets of examinations having multiple choice
questions.
• 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.
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.
• Large in Size
• High power consumption
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.
• Emissive Displays − Emissive displays are devices that convert electrical energy into light.
For example, plasma panel and LED (Light-Emitting Diodes).
Printers
Printer is an output device, which is used to print information on paper.
• Non-Impact Printers
Impact Printers
Impact printers print the characters by striking them on the ribbon, which is then pressed on the
paper.
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
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.
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
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
Disadvantages
• Expensive
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.
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
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
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.
• It stores the program that can be executed within a short period of time.
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.
• It is a non-volatile memory.
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)
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
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 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.
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.
• 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.
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.
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
• 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.
• 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.
• Data travels at 10 megabits to 1000 megabits per seconds depending upon the network
bandwidth.
Game Port
• Connect a joystick to a PC
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.
• Hardware and software are mutually dependent on each other. Both of them must work
together to make a computer produce a useful output.
• 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.
• 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.
• Difficult to design
• Difficult to understand
• Less interactive
• Smaller in size
• Difficult to manipulate
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.
• Payroll Software
• Student Record Software
• Inventory Management Software
• Income Tax Software
• Railways Reservation Software
• Microsoft Office Suite Software
• Microsoft Word
• Microsoft Excel
• Microsoft PowerPoint
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.
• To act as an intermediary between the hardware and its users, making it easier for the users
to access and use other resources.
• To provide efficient and fair sharing of resources among users and programs.
• 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.
• 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.
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.
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.
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.
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)
• 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.
A computer network is a system in which multiple computers are connected to each other to share
information and resources.
• 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.
• Network Cables
• Distributors
• Routers
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
Network Card
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.
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.
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:
Socket:
The unique combination of IP address and Port number together are termed as Socket.
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 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
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.
There are hundreds of programming languages, which can be used to write computer
programs and following are a few of them −
True DarkBASIC
Visual BASIC GW BASIC Haskell dylan Julia
BASIC
Turbo Perl
GO ALGOL Nim OCaml pick
Pascal
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);
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.
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
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;
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
void main()
int s = (a>b) ? a : b;
printf(“value is:%d”);
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));
}
&& 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.
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:
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]
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.
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.
Procedural programming follows top down Object oriented programming follows bottom
approach. up approach.
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.
Examples: C, FORTRAN, Pascal, Basic etc. Examples: C++, Java, Python, C# etc.