Unit 1
Unit 1
A computer can process data, pictures, sound and graphics. They can solve highly
complicated problems quickly and accurately. A computer as shown in Fig. performs
basically five major computer operations or functions irrespective of their size and make.
These are
1) it accepts data or instructions by way of input,
2) it stores data,
3) it can process data as required by the user,
4) it gives results in the form of output, and
5) it controls all operations inside a computer
1. Input: This is the process of entering data and programs in to the computer system. You
should know that
computer is an electronic machine like any other machine which takes as inputs raw data and
performs some
processing giving out processed data. Therefore, the input unit takes data from us to the
computer in an organized manner for processing.
2. Storage: The process of saving data and instructions permanently is known as storage.
Data has to be fed into
the system before the actual processing starts. It is because the processing speed of Central
Processing Unit (CPU)
is so fast that the data has to be provided to CPU with the same speed. Therefore the data is
first stored in the
storage unit for faster access and processing. This storage unit or the primary storage of the
computer system is
designed to do the above functionality. It provides space for storing data and instructions.
The storage unit performs the following major functions:
• All data and instructions are stored here before and after processing.
• Intermediate results of processing are also stored here.
3. Processing: The task of performing operations like arithmetic and logical operations is
called processing. The
Central Processing Unit (CPU) takes data and instructions from the storage unit and makes all
sorts of calculations
based on the instructions given and the type of data provided. It is then sent back to the
storage unit.
4. Output: This is the process of producing results from the data for getting useful
information. Similarly the output
produced by the computer after processing must also be kept somewhere inside the computer
before being given to
you in human readable form. Again the output is also stored inside the computer for further
processing.
5. Control: The manner how instructions are executed and the above operations are
performed. Controlling of all
operations like input, processing and output are performed by control unit. It takes care of
step by step processing of all operations inside the computer
Functional Units
In order to carry out the operations mentioned in the previous section the computer allocates
the task between its various
functional units. The computer system is divided into three separate units for its operation.
They are
Arithmetic Logical Unit (ALU)
Logical Unit :After you enter data through the input device it is stored in the primary storage
unit. The actual processing of the data and instruction are performed by Arithmetic Logical
Unit. The major operations performed by the ALU are addition, subtraction, multiplication,
division, logic and comparison. Data is transferred to ALU from storage unit when required.
After processing the output is returned back to storage unit for further processing or getting
stored.
Control Unit (CU)
The next component of computer is the Control Unit, which acts like the supervisor seeing
that things are done in proper fashion. Control Unit is responsible for coordinating various
operations using time signal. The control unit determines the sequence in which computer
programs and instructions are executed. Things like processing of programs stored in the
main memory, interpretation of the instructions and issuing of signals for other units of the
computer to execute them. It also acts as a switch board operator when several users access
the computer simultaneously. There by it coordinates the activities of computer’s peripheral
equipment as they perform the input and output.
Central Processing Unit (CPU)
The ALU and the CU of a computer system are jointly known as the central processing unit.
You may call CPU as the brain of any computer system. It is just like brain that takes all
major decisions, makes all sorts of calculations and directs different parts of the computer
functions by activating and controlling the operations
Types of computer:-
We can categorize computer in two ways: on the basis of data handling capabilities and size.
On the basis of data handling capabilities, the computer is of three types:
Analogue Computer
Digital Computer
Hybrid Computer
1) Analogue ComputerAnalogue computers are designed to process analogue data.
Analogue data is continuous data that changes continuously and cannot have discrete values.
We can say that analogue computers are used where we don't need exact values always
such as speed, temperature, pressure and current. Analogue computers directly accept the
data from the measuring device without first converting it into numbers and codes. They
measure the continuous changes in physical quantity and generally render output as a reading
on a dial or scale. Speedometer and mercury thermometer are examples of analogue
computers Eg:-Thermometer, AnalogClock, Speedometers
2) Digital Computer
Digital computer is designed to perform calculations and logical operations at high speed. It
accepts the raw data as input in the form of digits or binary numbers (0 and 1) and processes
it with programs stored in its memory to produce the output. All modern computers like
laptops, desktops including smartphones that we use at home or office are digital
computers.Eg:-Calculators,Digitalwatches
It allows you to store a large amount of information and to retrieve it easily whenever you
need it.You can easily add new features to digital systems more easily.Different applications
can be used in digital systems just by changing the program without making any changes in
hardware
3) Hybrid Computer
Hybrid computer has features of both analogue and digital computer. It is fast like an
analogue computer and has memory and accuracy like digital computers. It can process both
continuous and discrete data. It accepts analogue signals and convert them into digital form
before processing. So, it is widely used in specialized applications where both analogue and
digital data is processed. For example, a processor is used in petrol pumps that converts the
measurements of fuel flow into quantity and price. Similarly, they are used in airplanes,
hospitals, and scientific applications. Eg:-Hybrid computer is the computer used in hospital to
measure the heart beat of the patient Devices used in perolpump
Laptop Computers:-Laptop Computer are portable comp they are light weight computers
with a thin screen. They are also called as notebook. Computers of their small size. They can
operate on batteries and hence are very popular with travelers. The screen folds down on the
keyboard when not in use
Von Neumann machine may refer to: Von Neumann architecture, a conceptual model of
nearly all computer architecture. IAS machine, a computer designed in the 1940s based on
von Neumann's design. Self-replicating machine, a class of machines that can replicate
themselves.
Input DevicesInput device enables the user to send data, information, or control signals to a
computer. The Central Processing Unit
(CPU) of a computer receives the input and processes it to produce the output.
Some of the popular input devices are:
1.Keyboard
2.Mouse
3.Scanner
4.Joystick
5.Light Pen
6.Digitizer
7.Microphone
8.Magnetic Ink Character Recognition (MICR)
9.Optical Character Reader (OCR)
10.Digital Camera
1) Keyboard
The keyboard is a basic input device that is used to enter data into a computer or any other
electronic device by pressing keys. It has different sets of keys for letters, numbers,
characters, and functions. Keyboards are connected to a computer through USB or a
Bluetooth device for wireless communication.
Alphabets:-A to Z, a to z Special Key:-Shift, Spacebar,Ctrl,Alt,Etc
Numeric Key:-0 to 9 Function Key:-F1,F2,---F12
Keyboard is used to convert these above mention keys into digital form of computer
2) Mouse
The mouse is a hand-held input device which is used to move cursor or pointer across the
screen. It is designed to be used on a flat surface and generally has left and right button and a
scroll wheel between them. Laptop computers come with a touchpad that works as a mouse.
It lets you control the movement of cursor or pointer by moving your finger over the
touchpad. Some mouse comes with integrated features such as extra buttons to perform
different buttons.The mouse was invented by Douglas C. Engelbart in 1963. Early mouse had
a roller ball integrated as a movement sensor underneath the device. Modern mouse devices
come with optical technology that controls cursor movements by a visible or invisible light
beam. A mouse is connected to a computer through different ports depending on the type of
computer and type of a mouse.
3) Scanner
The scanner uses the pictures and pages of text as input. It scans the picture or a document.
The scanned picture or document then converted into a digital format or file and is displayed
on the screen as an output. It uses optical character recognition techniques to convert images
into digital ones. Some of the common types of scanners are as follows:
4) Webcam:
Any camera which is connected to a computer is called a webcam. The in-built camera
provided on a computer can also be considered a webcam. It is an input device as it can take
pictures, and can be used to record videos if required. The pictures and videos are stored in
the computer memory and can be displayed on the screen if required. Although it works
almost the same as the digital camera, it is different from a digital camera, as it is designed to
take compact digital photos that can be uploadedeasily on the webpages and shared with
others through the internet
5) JoystickA joystick is also a pointing input device like a mouse. It is made up of a stick
with a spherical base. The base is fitted in a socket that allows free movement of the stick.
The movement of stick controls the cursor or pointer on the screen.The frist joystick was
invented by C. B. Mirick at the U.S. Naval Research Laboratory. A joystick can be of
different types such as displacement joysticks, finger-operated joysticks, hand operated,
isometric joystick, and more. In joystick, the cursor keeps moving in the direction of the
joystick unless it is upright, whereas, in mouse, the cursor moves only when the mouse
moves
Output Devices:-
The output device displays the result of the processing of raw data that is entered in the
computer through an input device. There are a number of output devices that display output
in different ways such as text, images, hard copies, and audio or video.
Following are some of the important output devices used in a computer.
Monitor:-
CRT Monitor
LCD Monitor
LED Monitor
Plasma Monitor
Printer:-
Impact Printers
Character Printers
Dot Matrix printers
Daisy Wheel printers
Line printers
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.
Drum printers
Chain printers
Non-impact printers
Laser printers
Inkjet printers
Graphic Plotter
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
2) Printer:-
A printer produces hard copies of the processed data. It enables the user, to print images, text
or any other information onto the paper.Based on the printing mechanism, the printers are of
two types: Impact Printers and Non-impact Printers.
Impact Printers: They are of two types:
A Character Printers
i Dot Matrix printers
iiDaisy Wheel printers
B. Line printers
i Drum printers
ii Chain printers
Non-impact printers: They are of two types:
A. Laser printers
B .Inkjet printers
Impact Printer:-
The impact printer uses a hammer or print head to print the character or images onto the
paper. The hammer or print head strikes or presses an ink ribbon against the paper to print
characters and images.
Impact printers are further divided into two types.
A. Character Printers
B .Line printers
i) Dot Matrix Printer:-
Dot Matrix Printer is an impact printer. The characters and images printed by it are the
patterns of dots. These patterns are produced by striking the ink soaked ribbon against the
paper with a print head. The print head contains pins that produce a pattern of dots on the
paper to form the individual characters. The print head of a 24 pin dot matrix contains more
pins than a 9 pin dot matrix printer, so it produces more dots which results in better printing
of characters. To produce color output, the black ribbon can be changed with color stripes.
The speed of Dot Matrix printers is around 200-500 characters per second.
Non-Impact Printer:-
Non-impact printers don't print characters or images by striking a print head or hammer on
the ink ribbon placed against the paper. They print characters and images without direct
physical contact between the paper and the printing machinery. These printers can print a
complete page at a time, so they are also known as page printers. The common
types of non-impact printers are Laser printer and Inkjet printer
i) Laser Printer:-
A laser printer is a non-impact printer that uses a laser beam to print the characters. The laser
beam hits the drum, which is a photoreceptor and draws the image on the drum by altering
electrical charges on the drum. The drum then rolls in toner, and the charged image on the
drum picks the toner. The toner is then printed on the paper using heat and pressure. Once the
document is printed, the drum loses the electric charge,and the remaining toner is collected.
The laser printers use powdered toner for printing instead of liquid ink and produce quality
print objects with a resolution of 600 dots per inch (dpi) or more.
ii) Inkjet Printer:-
The inkjet printer is a non-impact printer that prints images and characters by spraying
fine,ionized drops of ink. The print head has tiny nozzles to spray the ink. The printer head
moves back and forth and sprays ionized drops of ink on the paper, which is fed through the
printer. These drops pass through an electric field that guides the ink onto the paper to print
correct images and characters.An inkjet printer has cartridges that contain ink. Modern inkjet
printers are color printers that have four cartridges containing different colors: Cyan,
Magenta, Yellow, and Black. It is capable of printing high-quality images with different
colors. It can produce print objects with a resolution of at least 300 dots per inch (dpi).
Computer Speakers:-
The computer speakers are the most common output devices used with a computer. The
speakers receive audio as an input from the computer or a sound card then this input may be
either in analog or digital form. Most computer speakers have internal amplifiers which can
increase the volume or the amplitude of the sound based on users requirement.
Plotter:-A plotter produces vector graphics drawings. Plotters draw lines on paper using a
pen. In the past, plotters were used in applications such as computer-aided design, as they
were able to produce line drawings much faster and of a higher quality than contemporary
conventional printers, and small desktop plotters were often used for business graphics.
Although they retained a niche for producing very large drawings for many years, plotters
have now largely been replaced by wide-format conventional printers
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.
Bit:-The bit is a unit of measurement in computer science. The Symbol”0” and “1” is referred
as “Bit". It is basic unit of data processing .One bit means one electronic pulse.
Byte:-A byte is a basic unit of measurement of information storage in computer science. Byte
is group of eight
bits i.e.10010011.Byte is a unit for counting memory size.
1024 Bytes=1Kilobyte(KB)
1024 Kilobyte=1megabyte(MB)
1024 Megabyte=1Gegabyte(GB)
1024 Gegabyte=1Terabyte(KB)
There are two types of memory:-
1) Primary memory 2) secondary memory
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.
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.
Types of RAM
Generally RAM can be divided into Three broad categories:
SRAM: Static RAM is much faster and more expensive than DRAM. It often functions as
cache memory. Informationin SRAM is volatile. It stores a bit of data using six transistor
memory cell.
DRAM: Dynamic RAM is slower than SRAM. It stores a bit of data using a transistor and
capacitor pair. As it is lessexpensive, most computers use DRAM. It is also a volatile
memory.
ROM:-ROM, which stands for read only memory, is a memory device or storage medium
that stores informationpermanently. It is also the primary memory unit of a computer along
with the random access memory (RAM). It iscalled read only memory as we can only read
the programs and data stored on it but cannot write on it. It isrestricted to reading words that
are permanently stored within the unit.
Types of ROM
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 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.
Secondary Momery :-
The secondary storage devices which are built into the computer or connected to the
computer are known as a secondary memory of the computer. It is also known as external
memory or auxiliary storage.The secondary memory is accessed indirectly via input/output
operations. It is non-volatile, so permanently stores the data even when the computer is
turned off or until this data is overwritten or deleted. The CPU can't directly access the
secondary memory. First, the secondary memory data is transferred to primary memory then
the CPU can access it.
Some of the secondary memory or storage devices are described below:
1) Hard Disk:
It is a rigid magnetic disc that is used to store data. It permanently stores data and is located
within a drive unit.The hard disk is also known as a hard drive. It is a rigid magnetic disc that
stores data permanently, as it is a nonvolatile storage device. The hard disk is located within a
drive unit on the computer's motherboard and comprises one or more platters packed in an
air-sealed casing. The data is written on the platters by moving a magnetic head
over the platters as they spin. The data stored on a computer's hard drive generally includes
the operating system, installed software, and the user's files and programs, including pictures,
music, videos, text documents, etc.
2)Pen drive:
Pen drive is a compact secondary storage device. It is also known as a USB flash drive,
thumb drive or a jump drive. It connects to a computer via a USB port. It is commonly used
to store and transfer data between computers.
For example, you can write a report using a computer and then copy or transfer it in the pen
drive. Later, you can connect this pen drive to a computer to see or edit your report. You can
also store your important documents and pictures, music, videos in the pen drive and keep it
at a safe place.Pen drive does not have movable parts; it comprises an integrated circuit
memory chip that stores the data. This chip is housed inside a plastic or aluminium casing.
The data storage capacity of the pen drive generally ranges from 2 GB to 128 GB.
Furthermore, it is a plug and play device as you don't need additional drives, software, or
hardware to use it.
Defination :-
1)data:-
Data can be defined as a representation of facts, concepts, or instructions in a formalized
manner, which should besuitable for communication, interpretation, or processing by human
or electronic machine.
Data is represented with the help of characters such as alphabets (A-Z, a-z), digits (0-9) or
special characters (+,-
,/,*,<,>,= etc.)
2) Information
Information is organized or classified data, which has some meaningful values for the
receiver. Information is the processed data on which decisions and actions are based
Algorithm:-
An algorithm is a process or a set of rules required to perform calculations or some other
problem-solving operations especially by a computer. The formal definition of an algorithm
is that it contains the finite set of instructions which are being carried in a specific order to
perform the specific task. It is not the complete program or code; it is just a solution (logic) of
a problem, which can be represented either as an informal description using a Flowchart or
Pseudocode.
Program :-
A computer program is a set of instructions and as a term it can be used as a verb as well as a
noun. In terms of a verb, it is used as a process of creating a software program by using
programming language.
Software :-
Software, which is abbreviated as SW or S/W, is a set of programs that enables the hardware
to perform a specific task. All the programs that run the computer are software. The software
can be of three types: system software, application software, and programming software.
1)System software :-
The system software is the main software that runs the computer. When you turn on the
computer, it activates the hardware and controls and coordinates their functioning. The
application programs are also controlled by system software. An operating system is an
example of system software.
2) Application Software:
Application software is a set of programs designed to perform a specific task. It does not
control the working of a computer as it is designed for end-users. A computer can run without
application software. Application software can be easily installed or uninstalled as required. It
can be a single program or a collection of small programs. Microsoft Office Suite, Adobe
Photoshop, and any other software like payroll software or income tax software are
application software.
Firmware :-
Firmware is a software program or set of instructions programmed on a hardware device. It
provides the necessary instructions for how the device communicates with the other computer
hardware.
Interpreter:-
An interpreter is a program that reads and executes code. This includes source code, pre-
compiled code, and scripts. Common interpreters include Perl, Python, and Ruby interpreters,
which execute Perl, Python, and Ruby code respectively.
Complier :-
A compiler is a program that translates a source program written in some high-level
programming language (such as Java) into machine code for some computer architecture
(such as the Intel Pentium architecture). The generated machine code can be later executed
many times against different data each time
Programming Language :-
As we know, to communicate with a person, we need a specific language, similarly to
communicate with
computers, programmers also need a language is called Programming language. A
programming language is a computer language that is used by programmers (developers) to
communicate with computers. It is a set of instructions written in any specific language ( C,
C++, Java, Python) to perform a specific task.A programming language is mainly used to
develop desktop applications, websites, and mobile applications.
High level language :-
High-level programming language (HLL) is designed for developing user-friendly software
programs and websites. This programming language requires a compiler or interpreter to
translate the program into machine language (execute the program).The main advantage of a
high-level language is that it is easy to read, write, and maintain.High-level programming
language includes Python, Java, JavaScript, PHP, C#, C++, Objective C, Cobol, Perl, Pascal,
LISP, FORTRAN, and Swift programming language.
Middle-level programming language
Middle-level programming language lies between the low-level programming language and
high-level programming language. It is also known as the intermediate programming
language and pseudo-language.A middle-level programming language's advantages are that it
supports the features of high-level programming, it is a user-friendly language, and closely
related to machine language and human language.
Example: C, C++, language
Low-level programming language
Low-level language is machine-dependent (0s and 1s) programming language. The processor
runs low- level programs directly without the need of a compiler or interpreter, so the
programs written in low-level language can be run very fast.Low-level language is further
divided into two parts -
i. Machine Language
Machine language is a type of low-level programming language. It is also called as machine
code or object code. Machine language is easier to read because it is normally displayed in
binary or hexadecimal form (base 16) form. It does not require a translator to convert the
programs because computers directly understand the machine language programs.
The advantage of machine language is that it helps the programmer to execute the programs
faster than the high-level programming language.
ii. Assembly Language
Assembly language (ASM) is also a type of low-level programming language that is designed
for specific processors. It represents the set of instructions in a symbolic and human-
understandable form. It uses an assembler to convert the assembly language to machine
language