You are on page 1of 35

A Computer is

A programmable machine which can execute or run a pre-


recorded list of instructions which follow certain rules (a
program).

• Modern computers are electronic and digital. The actual


machinery -- wires, transistors , and circuits -- is called
hardware; the instructions and data are called software.

Prepared by : Er. Sakar Introduction to C


Niroula
All computer perform the following basic operations for
converting raw input data into useful information and
presenting it to the user.
Five basic operations performed by computer are
1. Inputting

2. Storing

3. Processing

4. Outputting

5. controlling

Prepared by : Er. Sakar Introduction to C


Niroula
Prepared by : Er. Sakar Introduction to C
Niroula
A computer consists of five
functionally independent main
parts

Prepared by : Er. Sakar Introduction to C


Niroula
Components of a Computer System
• Computer hardware provides the physical mechanisms to
process, store, and input /output data. Includes CPU,
memory, I/O devices

• Software provides instructions to tell the hardware what


tasks to perform. It includes system (eg Windows XP) and
application (eg Excel) software

Prepared by : Er. Sakar Introduction to C


Niroula
What are the major Hardware components
of the computer ?

• central processing unit


• primary memory
• secondary storage
• input devices
• output devices
• communications devices
• I/O cards
• System Bus
Prepared by : Er. Sakar Introduction to C
Niroula
Block Diagram of a Computer

CPU Main Memory

IO Modules

Prepared by : Er. Sakar IODIntroductionIOD


to C IOD
Niroula
Block Diagram for a Simple
Computer
Computer Hardware

Prepared by : Er. Sakar Introduction to C


Niroula
Hardware- the CPU

• CPU performs actual processing of data, according to


instructions from programs.

• Data and programs are stored in primary and secondary


memory, and moved to and from CPU as required.

• Signals representing data and instructions travel between


system components along electronic pathways, called buses.

Prepared by : Er. Sakar Introduction to C


Niroula
Central Processing Unit ( CPU)

Acting as the brain of the computer’

Prepared by : Er. Sakar Introduction to C


Niroula
Central Processing Unit

• The control unit and ALU of the computer are together known
as the Central Processing Unit (CPU).

• The CPU is like brain performs the following functions:


• It performs all calculations.
• It takes all decisions.
• It controls all units of the computer.

• A PC may have CPU-IC such as Intel 8088, 80286, 80386,


80486, Celeron, Pentium, Pentium Pro, Pentium II, Pentium
III, Pentium IV, Dual Core, and AMD etc .

Prepared by : Er. Sakar Introduction to C


Niroula
• CPU consists of 3 main parts:

– ALU - where arithmetic and logical operations


performed

– Control Unit - controls data movement and execution


of instructions

– Registers - small high speed storage areas

Prepared by : Er. Sakar Introduction to C


Niroula
Components of a computer system

Prepared by : Er. Sakar Introduction to C


Niroula
Arithmetic Logical Unit

• All calculations are performed in the Arithmetic Logic Unit


(ALU) of the computer.
• It also does comparison and takes decision.
• The ALU can perform basic operations such as addition,
subtraction, multiplication, division, etc and does logic
operations like, >, <, =, ‘etc.
• Whenever calculations are required, the control unit transfers
the data from storage unit to ALU, once the computations are
done, the results are transferred to the storage unit by the
control unit and then it is send to the output unit for displaying
results.

Prepared by : Er. Sakar Introduction to C


Niroula
Control Unit

• It controls all other units in the computer.


• The control unit instructs the input unit, where to store the data
after receiving it from the user.
• It controls the flow of data and instructions from the storage
unit to ALU.
• It also controls the flow of results from the ALU to the storage
unit.
• The control unit is generally referred as the central nervous
system of the computer that control and synchronizes its
working.

Prepared by : Er. Sakar Introduction to C


Niroula
Registers
• It is a special temporary storage location within the CPU.
Registers quickly, accept, store and transfer data and
instructions that are being used immediately (main memory
hold data that will be used shortly, secondary storage holds
data that will be used later).

• To execute an instruction, the control unit of the CPU


retrieves it from main memory and places it onto a register.

• The instruction cycle refers to the retrieval of the instruction


from main memory and its subsequence at decoding.

• The process of alerting the circuits in CPU to perform the


specified operation. The time it takes to go through the
instruction cycle is referred to as I-time.
Prepared by : Er. Sakar Introduction to C
Niroula
Memory
• Memory - Purpose of memory is data storage.
• The storage unit of the computer holds data and instructions
that are entered through the input unit, before they are
processed.
• It preserves the intermediate and final results before these
are sent to the output devices.
• It also saves the data for the later use.

Prepared by : Er. Sakar Introduction to C


Niroula
Primary Storage:- to hold data and instructions during
processing . Eg:- RAM. Relatively limited capacity and
volatile
• This memory is generally used to hold the program being
currently executed in the computer, the data being received
from the input unit, the intermediate and final results of the
program.
• The primary memory is temporary in nature. The data is lost
upon user request.
• In order to store the data permanently, the data has to be
transferred to the secondary memory.
• The cost of the primary storage is more compared to the
secondary storage.
Prepared by : Er. Sakar Introduction to C
Niroula
2. Secondary Storage:
•It stores several programs, documents, data bases etc.
•The programs that you run on the computer are first
transferred to the primary memory before it is actually
run.
•Whenever the results are saved, again they get stored
in the secondary memory.
•The secondary memory is slower and cheaper than the
primary memory.
•Some of the commonly used secondary memory
devices are Hard disk, CD, etc.,

Prepared by : Er. Sakar Introduction to C


Niroula
Hardware- memory

• Digital computers deal with data in binary form - all data is


represented using just two digits - 1 or 0. Letters and other
symbols are assigned unique binary codes.

• Primary memory consists of a set of locations defined by


sequentially numbered addresses. Each location contains a
binary number that can be interpreted as data or an
instruction.

Prepared by : Er. Sakar Introduction to C


Niroula
Hardware - memory
• Memory is commonly measured in multiples of bits and
bytes.
1 bit = 1 binary digit (0 or 1).

1. 1 byte = 8 bits

2. 1KB = 1024 bytes = 210

3. 1MB = 1024 KB= 220

4. 1GB = 1024 MB = 230

5.Prepared
1TB = 1024 GB = 240
by : Er. Sakar Introduction to C
Niroula
Hardware - memory

• Secondary storage consists of non-volatile high-capacity


devices to store programs and data not currently required by
CPU.

• Hard and floppy disks, and tapes store data as magnetized


spots.

• CD’s and DVD’s store data as pits or surface marks


detectable by laser light.

Prepared by : Er. Sakar Introduction to C


Niroula
3 Hardware – I/O

• Input Devices collect & translate raw data into form useable
by computer. e.g keyboard accepts letters and numbers and
converts them to a binary code such as Unicode.

• Output devices produce results in useable form for user (or


another device). e.g. monitor converts binary codes to
characters and images, whilst modem converts digital data
to analog form for transmission over telephone lines.

Prepared by : Er. Sakar Introduction to C


Niroula
INPUT UNIT
• Computers need to receive data and instruction in order
to solve any problem. Therefore we need to input the
data and instructions into the computers. The input unit
consists of one or more input devices.
• Keyboard is the one of the most commonly used input
device. Other commonly used input devices are the
mouse, floppy disk drive, magnetic tape, etc.
• All the input devices perform the following functions.
• Accept the data and instructions from the outside
world.
• Convert it to a form that the computer can understand.
• Supply the converted data to the computer system for
further processing.

Prepared by : Er. Sakar Introduction to C


Niroula
Output Unit

The output unit of a computer provides the information


and results of a computation to outside world.
• Printers, Visual Display Unit (VDU) are the commonly
used output devices.
Other commonly used output devices are
 floppy disk drive,
 hard disk drive,
 magnetic tape drive.

Prepared by : Er. Sakar Introduction to C


Niroula
Hardware – I/O Peripherals

1 Input Devices
• Mouse
• Keyboard

2 Output Devices
• Monitor (VDU)
• Printer

3 Secondary Storage Devices


• Hard Disk
• CD / DVD / Floppy
Prepared by : Er. Sakar Introduction to C
Niroula
I/O Hardware

Prepared by : Er. Sakar Introduction to C


Niroula
4 Hardware - I/O Modules

• Interface between System Bus and other Peripherals


• example
– Sound cards
– Video cards
– Network cards
– PCI cards

Prepared by : Er. Sakar Introduction to C


Niroula
Buses
• The term Bus refers to an electrical pathway through
which bits are transmitted between the various computer
components.
• Depending on the design of the system, several types of
buses may be present.
• The most important one is the data bus, which carries the
data through out the central processing unit.
• The wider data bus, the more data it can carry at one time
and thus the greater the processing speed of the computer.

Prepared by : Er. Sakar Introduction to C


Niroula
5 Hardware - System Bus

• series of electronic path ways and connecting other


components of the computer.

Prepared by : Er. Sakar Introduction to C


Niroula
Structure - Top Level

Peripherals Computer

Central Main
Processing Memory
Unit

Computer
Systems
Interconnection

Input
Output
Communication
lines
Prepared by : Er. Sakar Introduction to C
Niroula
Structure - The CPU

CPU

Computer Arithmetic
Registers and
I/O Login Unit
System CPU
Bus
Internal CPU
Memory Interconnection

Control
Unit

Prepared by : Er. Sakar Introduction to C


Niroula
Types of computers

• Personal Computer
– Microprocessor
• Mini computer
• Main frame
• Super computer

Prepared by : Er. Sakar Introduction to C


Niroula
Types of computers
• supercomputer: An extremely fast computer that can
perform hundreds of millions of instructions per second.
• mainframe : A powerful multi-user computer capable
of supporting many hundreds or thousands of users
simultaneously.
• Work stations minicomputer : A multi-user computer
capable of supporting from 10 to hundreds of users
simultaneously.
• Microcomputers personal computer : A small, single-
user computer based on a microprocessor.
– Desktop PC pic
– Notebook pc (laptop)
– PDAs palmtops
• Microcontrollers embedded computers

Prepared by : Er. Sakar Introduction to C


Niroula

You might also like