Você está na página 1de 45

COMPUTER ORGANIZATION

Lecture 1

Components of a Digital Computer


A computer system is the integration of

physical entities called hardware and nonphysical entities called software.


The hardware components include input
devices, processor, storage devices and
output devices.
The software items are programs and
operating systems so that the computer can
process data.

Computer Top Level View


The block diagram of computer hardware components is

shown below

Functional Units of a Computer System

Functional Units of a Computer System


Basically any computer is supposed to carry out the

following functions.
1. Accept the data and program as input.
2. Store the data and program and retrieve

as and when required.


3. Process the data as per instructions
given by the program and convert it into
useful information.
4. Communicate the information as output.

Input Unit
A computer uses input devices to accept

the data and program.


Input devices allow communication
between the user and the computer.
In modern computers keyboard, mouse,
light pen, touch screen are some of the
input devices

Output Units
Similar to input devices, output devices

have an interface between the computer


and the user.
These devices take machine coded output
results from the processor and convert
them into a form that can be used by
human beings.
In modern computers, monitors (display
screens) and printers are the commonly
used output devices.

Central Processing Unit


CPU is the brain of any computer system.
It consists of arithmetic and logic units,

control unit and internal memory


(registers).
Programs (software) provide the CPU, a set
of instruction to follow and perform a
specific task.
Between any two components of the
computer system, there is a pathway called
a bus which allows for the data transfer

Central Processing Unit

The functions of the CPU are :


1. Co-ordinate all computer operations
2. Perform arithmetic and logical operations on data

Central Processing Unit


Control unit controls all the hardware operations

of input units, output units, memory unit and the


processor.
ALU perform addition, subtraction, division and
multiplication as well as some logical operations.
The instructions and data are stored in the main
memory so that the processor can directly fetch
and execute them.
While performing these operations the ALU takes
data from the temporary storage area inside the
CPU named registers.

Functions of a CPU

Memory Unit
In the main memory, the computer stores the

program and data that are currently being used,


main memory store the program and data before
processing.
The main memory holds data and program only
temporarily.
There is a need for storage devices to provide
backup storage, they are called secondary
storage devices.
Secondary storage devices can hold more
storage than main memory and is much less
expensive.

Stored Program Concept


The essentials of the stored program concept

are:
1. The program and data are stored in a primary
memory
2. The computer can execute a program
automatically.
3. The control unit fetches and executes the
instructions in sequence one by one.
4. Instruction can modify the contents of any
location in the stored program concept.

Understanding the Working Principles of CPU


Let us go through the various tasks involved in

executing a simple program.


This program performs arithmetic addition on two
numbers.
The algorithm of this program is given by
I. input the value of a
II. input the value of b
III. sum = a + b
IV. output the value of sum

Program executing steps


1. The control unit begins to execute the program
2.
3.
4.

5.

instructions one by one in a sequential manner.


The control unit signals the input device (say
keyboard) to accept the input for the variable a.
The user enters the value of a on the keyboard.
The control unit recognizes and enables to route the
data (value of a) to the pre-defined memory location
(address of a).
The steps 2 to 4 will be repeated for the second input
b. The value of b is stored in the memory location
(address of b).

Program executing steps (Cont.)


6. Before executing the arithmetic instruction, the control
unit enables to send a copy of the values stored in
address of a and address of b to the internal
registers of the ALU and signals the ALU to perform
the sum operation.
7. The ALU performs the addition. After the computation,
the control unit enables to send the copy of the result
back to the memory (address of sum).
8. Finally, the result is displayed on the monitor. The
control unit enables to send the copy of the values of
the address of sum to the monitor (buffer) and
signals it. The monitor displays the result.
9. Now this program execution is complete.

Working Principles of a CPU

Arithmetic Operations
Arithmetic operations include addition, subtraction,

multiplication, and division.


While performing these operations, the ALU makes
use of the registers.
Upon completion of the arithmetic operation, the
result can be transferred from the register to the
main memory.
In addition to registers, the arithmetic unit uses one
or more adders that actually perform arithmetic
operations on the binary digits.

Arithmetic Operations
The arithmetic operation in adding two numbers 5 & 8
can be demonstrated through following steps :
Step 1: 5 and 8 are put into two separate memory
locations.
Step 2: The control unit fetches the two numbers
from their memory locations into the data registers.
Step 3: The arithmetic unit looking at the operator (+)
uses the accumulator and adds the two numbers.
Step 4: The ALU stores the result (13) in memory
buffer register.
Step 5: Then the control unit stores the result into a
user desired memory location, say sum.

Arithmetic Operations

Logical Operations
Some of the basic functions

performed by the ALU are,


add, subtract, logical AND,
logical OR, shift left and shift
right on twos complement
binary numbers.
The inputs to be calculated
are stored in the input
register (AREG) and the
input / output register
(ACCUM) for add, AND and
OR
functions.

Memory Unit
The term memory usually refers to the main

memory of the computer.


There are different types of memory:
1. Random Access Memory (RAM)
2. Read Only Memory (ROM)
3. Programmable Read Only Memory (PROM)
4. Erasable Programmable Read-Only Memory
(EPROM)
5. Electrically Erasable Programmable ReadOnly Memory (EEPROM)

Random Access Memory - RAM


This is really the main store and is the place where

the program gets stored.


When the CPU runs a program, it fetches the
program instructions from the RAM and carries
them out.
If the CPU needs to store the results of the
calculations it can store them in RAM.
It is a volatile form of memory.

Read Only Memory - ROM


In ROM, the information is burnt (pre-recorded) into

the ROM chip at manufacturing time.


Once data has been written into a ROM chip, it
cannot be erased but you can read it.
ROM is a non-volatile memory.
ROM stores critical programs such as the program
that boots the computer.

Programmable Read Only Memory - PROM


PROM is a memory on which data can be

written only once.


A variation of the PROM chip is that it is not
burnt at the manufacturing time but can be
programmed using PROM programmer or a
PROM burner.
PROM is also a non-volatile
memory

Erasable Programmable Read Only Memory - EPROM


In EPROM, the information can be erased and

reprogrammed using a special PROM


programmer.
EPROM is non-volatile memory.
A EPROM differs from a PROM
in that a PROM can be written
to only once and cannot be erased.
But an ultraviolet light is used to erase the contents
of the EPROM.

Electrically Erasable Programmable Read Only


Memory - EEPROM
EEPROM is a recently developed type of

memory. This is equivalent to EPROM, but does


not require ultraviolet light to erase its content.
It is also non-volatile in nature.
EEPROM is not as fast as RAM
or other types of ROM.
A flash memory is a special type
of EEPROM that can be erased
and reprogrammed.

Data Representation
The smallest unit of information is a single digit

called a bit (binary digit), which can be either 0 or 1.


The capacity of a memory system is represented by
a unit called a byte, which is 8 bits of information.
The performance of a memory system is defined by
two different measures, the access time and the
memory cycle time.
Access time refers to how quickly the memory can
respond to a read or write request.
Memory cycle time refers to the minimum period
between two successive requests.

hierarchical memories:
The registers (internal memory) are used to hold

the instruction and data for the execution of the


processor. Eventually the top of the hierarchy
goes to the registers.
The memory closest to the processor is known
as a cache. It is a high speed memory that is
much faster than the main memory.
The next is the main memory (RAM).
The low end of the hierarchy is the secondary
memory (HD, CD, DVD, and FD).

The secondary memory


The secondary memory is the memory that

supplements the main memory.


The program should be brought into the main
memory from the secondary memory before
being executed.
The secondary memory is cheaper compared
to the main memory.
Computer generally has limited
amount of main memory and
large amount of secondary memory.

Storage Devices
Hard Disk
Hard disk is a magnetic disk on which you can store

computer data.
The hard disk is a direct-access storage medium.
This means you can store and retrieve data randomly.

Storage Devices
Magnetic Tape
A recording medium consisting of a thin tape with a

coating of a fine magnetic strip, used for recording


digital data.
Bits are recorded as magnetic spots on the tape along
several tracks. Usually, seven or nine bits are
recorded simultaneously to form a character together
with a parity bit.

Storage Devices
Floppy Disk
The floppy drive uses a thin circular disk for data

storage. It is a soft magnetic disk.


It is a thin magnetic-coated disk contained in a
flexible or semi-rigid protective jacket.
The disk rotates at 360 rpm.
A read/write head makes physical contact with the
disk surface.
Data is recorded as a series of tracks
subdivided into sectors.

Storage Devices
Optical Disk
Optical disks are a storage medium from which

data is read and to which it is written by lasers.


The optical disk is a random access storage
medium; information can be easily read from any
point on the disk.
CD-ROM stands for Compact Disk - Read Only
Memory.

Input and Output Devices


Input devices is also defined as a device that provides

communication between the user and the computer.


For example, a keyboard is an input device.

Keyboard
The most common input device is the keyboard.
The keyboard detects the key pressed and generates the

corresponding ASCII codes which can be recognized by


the computer.

Mouse
Mouse is an input device that controls the movement of

the cursor on the display screen.


a small ball is kept inside and touches the pad through a
hole at the bottom of the mouse. When the mouse is
moved, the ball rolls.
This movement of the ball is converted into signals and
sent to the computer.

Scanner and Bar Code Reader


Scanner is an input device that allows information such as

an image or text to be input into a computer.


The bar-code reader scans the information on the barcodes
and transmits to the computer for further processing.

Scanner

Bar code reader

Touch Sensitive Screen and Optical Character


Recognition (OCR)
Touch Sensitive Screen is a pointing device that enables

the user to interact with the computer by touching the


screen.
You can use your fingers to directly touch the objects on the
screen.
The OCR technique permits the direct reading of any

printed character.
The computer will recognize the characters in the page as
letters and punctuation marks, and stores. This can be
edited using a word processor.

Light Pen and Magnetic Reader


A light pen is a pointing device shaped like a pen and is

connected to a monitor.

Magnetic reader is an input device which reads a

magnetic strip on a card. It is handy and data can be


stored and retrieved.

Microphone
Microphone serves as a voice input device.
It captures the voice data and input to the computer.

Using the microphone along with speech recognition


software can offer a completely new approach to input
information into your computer.

Output Devices
An output device is capable of presenting information from a computer.
Monitors
Monitor is a commonly used output device, sometimes called as display

screen.
The number of pixels that can be displayed vertically and horizontally
gives the resolution of the monitor.
The resolution of the monitor determines the quality of the display.
Some popular resolutions are 640 x 480 pixels, 800 x 600 pixels and
1024 x 768 pixels.

Output Devices
Printers

Printer is an output device that prints text or images on


paper or other media.

Output Devices
Speakers

The computer can also give produce voice output(audio


data).
Speaker serves as a voice output device.

Storage Devices
The smallest unit that can be written to or read from the

disk is a sector.
The storage capacity of the disk is determined as
(number of tracks * number of sectors * bytes per
sector * number of read/write heads).
The arrangement of tracks and sectors on a disk is known
as its format.
High data rates demand that the disk rotates at a high
speed (about 3,600 rpm).

Computer Organization
Basic Components of a Digital Computer
Central Processing Unit (CPU)
Memory Unit
Input and Output Devices

Você também pode gostar