Computer System

orangesvetElectronics - Devices

Nov 8, 2013 (3 years and 9 months ago)

96 views



S
4C CIT
/CH/
May
,

2
00
6


COMPUTER SYSTEM


page
1

C
OMPUTER
S
YSTEM

Basic Computer Structure

Input Unit



Central
Processing Unit



Output Unit



Memory










Backing Store





The Central Processing Unit (CPU)
is the unit in the computer which operates the whole computer following
instructions and

performs all logical computations and numerical
calculations
.



The main memory stores data temporarily. It may accept data from input device and send data to output
device.



Backing store (secondary memory) is also connected with the main memory. It store
s data permanently.

Types of Computer Systems

Mainframe computer



A mainframe (or mainframe computer) is a large and expensive computer system.



It has a high speed CPU, a large main memory and a host of input/output and backup storage devices.



Up to
100 or
more users
can use the computer at the same time through different terminals.

Minicomputer



Minicomputer is smaller than mainframe in size and in processing ca
p
acity, for about 10 users to use.



The hardware organization of minicomputer is similar to that of

mainframe.

Microcomputer



A microcomputer is much smaller. The whole CPU is built in a small chip called

microprocessor

.



Also, microcomputer contains only one terminal. So only one user can use it at a time.

Central Processing Unit (CPU)



The CPU is a d
evice to accept and execute sequentially the instructions stored in the computer’
s

main memory.



The CPU is composed of

control unit


(

CU

) and

arithmetic and logic unit





(

ALU

).



The CU send
s

control signals to all parts of the computer. The A
LU calculates the data from input device or
main memory. The registers are locations inside CPU where data are held temporarily during calculations or
other operations.



S
4C CIT
/CH/
May
,

2
00
6


COMPUTER SYSTEM


page
2



Inside the CPU, there are special memory cells called

registers

. They are used by t
he CPU for
temporarily storing data or instructions during the execution of an instruction.



The

data


bus,

address


bus and


control


bus are the main communication links within the
CPU.

Control Unit



It

controls the flow of data in the CPU. It interpre
ts program instructions and tells
the

whole
computer

how to
process data.



Two sample

registers

in it
:

i.

Instruction Register (IR).
It holds the instruction fetched from main memory while the instruction is being
interpreted and executed.

ii.

Program Counter (P
C).
It holds the address of the next instruction in main memory to be executed.
Normally, the content of the PC increases by one after each instruction executed. (What will be the
exception?

Branching


if..then and case..of in Pascal


)

Arithmetic an
d Logic Unit (ALU)

i.

It carries out all arithmetic and logic operations.

ii.

Arithmetic operations
include,

a.

basic operation : +,
-
, *, /

b.

comparison : >, <, =, >=, <=, <>

iii.

Logic operations
include: NOT, AND, OR, NAND, NOR

iv.

It has the register
accumulator (AC)
. It

holds the intermediate and final results
of the ALU.

System clock



An accurate electronic timer used for
synchronization

of all the chips inside the computer
.



The speed of the clock is measured in Hz or GHz. A CPU with a higher clock speed should be faste
r than
another one with lower speed if they are of similar architecture.

Pipelining



Each instruction execution
involves

4 stages, fetching, decoding, executing and storing.



With pipelining, several instructions in
different

stages are processed simultaneou
sly and thus improving the
overall processing performance.

Cache memory



It is a small fast memory, too expensive to be used for the whole of RAM, that acts as an intermediate store
between the CPU and memory, is used to improve the overall speed of the com
puter

by pre
-
fetching instructions
and data from slower main memory.



Level 1cache


inside CPU / Level 2 cache


on the motherboard.



S
4C CIT
/CH/
May
,

2
00
6


COMPUTER SYSTEM


page
3

Main memory



There are two types of main memory, Read
-
Only Memory (ROM) and Random Access Memory (RAM).

RAM (_______________
_________)



The part of memory used to store the program and data input the computer.



Data in it are addressed
directly (randomly)
. Data can be read from or written to RAM by sending signal to
specify the location in memory

(



)
.



Also known as ___________
__________________.



Data in RAM is ______________, i.e. will disappear if the power supply is turned off.



T
ypes of RAM:

i.

D
ynamic RAM (DRAM)
.

It

needs be refreshed every few milliseconds

ii.

S
tatic RAM (SRAM)
.

It needs not be refreshed and works faster. It
is

more expensive and
often used
as cache memory.

iii.

Synchronous DRAM (SDRAM).
It improves performance because it is synchronised with the CPU
clock.

iv.

Double Data Rate Synchronous DRAM (DDR SDRAM).
It doubles the speed of SDRAM.

ROM (________________________)



Da
ta CANNOT be
written
into a ROM but CAN be
read
from it. (READ
-
ONLY

/

non
-
volatile

)



It usually stores
firmware (permanently written) such as BIOS (Basic Input / Output System) including the

bootstrap loader
for system start
-
up
.



The part of memory used o
nly by the computer itself. Information is masked on the ROM permanently
while it is manufactured in the factory.



It is also accessed

randomly

.

CMOS

(

Complementary Metal
-
oxide Semiconductor


)



It uses very little power to retain information. (a small
battery for long time)



It stores system configuration data such as the type of hard disk, the system date and time and other BIOS
setting.



Data in it is

volatile


.

Memory Organi
z
ation



Each ‘0’ or ‘1’ of data is called a
bit
.

Each bit of data is stored i
n a memory cell.



8 bits is called 1
byte
.



1 KB (kilobyte) means 1024 bytes of data. (2
10
)



S
4C CIT
/CH/
May
,

2
00
6


COMPUTER SYSTEM


page
4



If a disk is said to 360 KB of disk space, it will be able to store about 368640 bytes of data.



A 8
-
bit machines means that a word in the computer contains 8 bits or

1 byte of data, stored in 8 memory
cell. The number of bits in a word is called
word length
.

(n
-
1)






.

.

.

.

.

0001



0000



Memory address


word



The longer the word length, the more information can be stored in each word. On the other hand,

the
complexity of the electronic circuitry will also increase proportionately.



The whole memory can be considered as a long array of memory. Each element
may
contain a word of data.



Each word is accessed by specifying the memory address. Address start f
rom 0 to the total number of words
in memory minus one. e.g. for 64 KB memory, the address starts from 0000
16

to FFFF
16
.



RAM and ROM are under the same addressing system.

Bus



Bus is a group of wires interconnecting the various parts of computer system.



Th
ere are 3 kinds of buses:

i.

data bus

ii.

address bus

iii.

control bus

Data bus



used for the transfer of

data


between units.



The routing of information occurs a whole word at a time in a data bus. E.g. An 8
-
bit machine sending 8
bits of data at time in a data bus.



Data bus is often
bi
-
directional
.

Address bus



used for carrying the

address



of the memory location specified by the control unit.



The number of wires in the address bus depends on the size of the main memory. For 2
16

= 64 K memory
locations, 16 lines a
re necessary.

Control bus



used for carrying the

control signals




to and from control unit in CPU.



The number of wires varies between processors but not normally be less than 10.

Figure 1



S
4C CIT
/CH/
May
,

2
00
6


COMPUTER SYSTEM


page
5

** Other than classifying buses by function, it is also customary to classi
fy them by the way they are connected
to the CPU, such as
I/O bus
or
memory bus
.

Example



A
32
-
bit microcomputer system has a 128 MB memory. How many lines will be most possibly present in
the data bus and address bus?

No. of lines in the data bus = word
length = 32

No. of words in memory

= No. of bytes in memory / No. of bytes in a word




= 128 MB /
4

bytes = 2
27

/ 2
2

= 2
25

No. of lines in the address bus = 25


** Note that :

A memory of 2
n

locations needs an address n bits.



A memory of N locations
needs an address of m bits where m is an integer


log
2

N
.



Questions :

Find the most probable number of lines in data bus and address bus in the following cases,

i.

A 32
-
bit
byte
-
addressing
microcomputer has 4 M memory.

ii.

A 8
-
bit
word
-
addressing
microcomputer

has 128 M memory.

Expansion

bus



It ends at an interface
called


expansion slot




on a motherboard
.




With theses slots the system unit can be connected with
other

external

peripheral devices by inserting
different kinds of

expansion cards

(interface ca
rds)



.



Three main types of the slots:

i.

Accelerated Graphics Ports (AGP)

: It holds a high
-
speed video graphics card for video applications.

ii.

Peripheral Component Interconnect (PCI) slots

: They are used for general
-
purpose expansion cards
such as Network
Interface Card (NIC) or sound card.

iii.

Industry Standard Architecture (ISA) slots

:

They are used for compatibility with earlier systems.

In
terfacing
介面



Peripheral devices are ex
ternally connected to a PC through different ports (or interfaces)



Common types of ports:

i.

Serial ports. E.g. RS
-
232 interface or COM port.

ii.

Parallel ports. E.g. printer port.

iii.

Universal Serial Bus (USB). It supports a maximum o
f 127 peripheral devices,
transmitting

data in
serial mode at speed from 12Mbps up to 480Mbps.

iv.

IEEE 1394 High Performance Serial Bus. It supports a maximum of 63 peripheral devices,
transmitting

data at speed up to 400Mbps.



S
4C CIT
/CH/
May
,

2
00
6


COMPUTER SYSTEM


page
6

Input Device and Media



Input d
evices are responsible for the reading of information to be processed by the CPU.



The input data are encoded onto an input medium; and an input device is used to convert the encoded data
into a machine
-
sensible form, ‘0’ or ‘1’.

** Machine
-
sensible.
same

as machine
-
readable, is the name given to any data that is in a form suitable to be
read into a machine such as a computer.

Keyboard and keypads



It has keys of alphabets and numbers arranged as those on typewriter.



Other keys may include function keys, a
calculator
-
like keypad, cursors keys, etc.



It works with the VDU to form a


. Keying
-
in a character will result in a display of the
character on the screen of the VDU. At the same time, the corresponding ASCII is sent to the CPU.



In some computer connec
ted peripheral devices such as Automatic Teller Machine (ATM), Stock Taking
Devices, specially designed
keypad
are used where just a smaller number of keys and some function keys
are present in them.

Mouse, Trackball,

T
ouch
pad
, Point Stick



A mouse also wo
rks with the VDU. It controls the display of a VDU
(mouse pointer) by its movement on a flat surface. It also has at least
two bottom for single
-
click, double
-
click and right
-
click.



On its bottom surface, there may be a moving ball or two light
-
emitting
diode (LED) to sense its movement.



Trackballs,
t
ouch
pads and point sticks
are similar in principle to a
mouse except that you roll the ball
or touch the pad
instead of moving
the body as in the mouse.

Game paddles /
Joystick



A game paddle is a
n analog
ue

i
nput device designed for playing
computer
games.



An example is

a joystick has a control stick controlling X
-
axis and Y
-
axis movement.

Graphic Tablet



It is a device
that
is used for graphic input.



It consists of a grid of sensor wires and a cursor (or a pe
n).



The cursor moves over the grid to specify the points on the graph.






S
4C CIT
/CH/
May
,

2
00
6


COMPUTER SYSTEM


page
7

Touch Screen



A menu is displayed on the screen. To choose an option, what you
have to do is to use your finger to touch the option on the screen.



The position of touching is recognize
d by photocells and infra
-
red
light beams on the sides of the screen.

Scanner



It converts printed figures or pictures into computer sensible form
by detecting the reflection of light from the built
-
in light source.



Three types of scanners:


flatbed scanner
,
paper
-
feeding scanner
and
hand
-
held scanner
s
.



As the flatbed scanners were the most reliable type giving image product of highest quality it is the most
common type used nowadays.

Digital camera



It
functions like an ordinary camera except that the ima
ge is stored in digital format on the camera

s internal
memory and then storage media like floppy
diskettes

or specially designed memory sticks.



A speci
al
-
designed

software usually comes with the camera to help manage the pictures.

Document Reader



Sometime
s, data are input to the CPU directly from source document by different types of document reader.



Mark reader (Optical Mark Recognition, OMR)

i.

It senses the presence of marks in the prescribed position, by detecting the

reflection of light








or the

conductivity



(
HB
pencil mark).

ii.

e.g. Multiple Choice answer sheet of HKCEE



Optical Character Reader (Optical Character Recognition, OCR)

i.

It senses different characters by identifying their shapes photo
-
electrically.

ii.

Advantages of OCR:

a.

The characters of OC
R are humanly readable.

b.

Characters can be read by passing the scanner over them. The time and manual labour for data
entry can be greatly reduced.

iii.

Limitation of OCR:

a.

The scanner must be properly placed over the characters along printed lines from left to
right.

b.

OCR
may not
recognize all the characters without mistakes. Recognition for hand writing is still
error



Magnetic Ink Character Reader (Magnetic Ink Character Recognition, MICR)

i.

It senses different characters by recognition their shapes inscribed on

documents with ink containing
magnetized particles.

It is usually found on bank cheques.




S
4C CIT
/CH/
May
,

2
00
6


COMPUTER SYSTEM


page
8


ii.

Advantages of MICR:

a.

Magnetic ink characters are difficult to counterfeit.

b.

Like OCR, ordinary people can read these characters.

c.

Magnetic ink reader can read cheque
s with a high degree of accuracy and sort cheques at high
speed.

iii.

Limitations of MICR:

a.

There are only 10 digits, namely, 0 to 9, and 4 special characters, which are used exclusively by the
banking industry. You cannot use alphabets or other symbols in MICR
.

b.

The equipment used to print and read magnetic ink characters is very expensive and not widely
available. It is limited to the bank cheques.

c.

To enable the reader to read the characters correctly, the magnetic ink character must be printed
precisely at th
e right positions on the cheque.

Handwriting Reader



When one writes on a pad, corresponding graphics appear on the screen.



If it is an alphanumeric character, the reader can recognize it and the character is entered into the computer.



It is usually used fo
r input of Chinese characters as it is difficult to input Chinese characters using the
traditional keyboard.

Voice Recognition



Recent research in voice recognition techniques enable
s

data to be inputted into the computer verbally via
microphone.



The
voice
recognition system
has to be

trained


to respond to the speech of a particular person , e.g.
the
person has to read 250 sentences into the system before the system can be used.



It seems to be best method at all as it is the most natural for human beings t
o communicate with speech.
However, the techniques still have some defects:

i.

Some words may be of the same phonetics. The computer has to recognize from the context of
the

speech.

ii.

It is not suitable in quiet working environment.

Point
-
Of
-
Sale Entry (POS)



The point
-
of
-
sale may use punched tags, bar
-
codes or magnetic strips.



It is used in shops where the input may invoke the calculation for the transaction
and updating the transaction file. The input method must be fast to shorten the
transaction time.

Figure 2




S
4C CIT
/CH/
May
,

2
00
6


COMPUTER SYSTEM


page
9

Mag
netic
strip
card reader



It
can read the magnetic strips on the back of bank
cards
and
telephone cards.



The magnetic strips store data appropriate
ly

for the
application, e.g. the account number of the bank card or the
amount of money remaining on the telep
hone card.

Smart card reader



A smart card contains a
small
processor and a small amount
of memory storage.



Smart cards are commonly used locally as a stored
-
value ticket for public transports like MTR, KCR and
buses.



Each time we take a train or bus journe
y, we place the card onto the reader.

The reader
then automatically
updates the amount of money and records the fare and time of travel on the card. We can also increase the
amount of money stored on the card by using a value

adding

machine at the statio
n.

Bar code
reader



A bar
-
code consists of varying thickness vertical lines that represent a unique code for the product.



As a bar code reader is moved over the surface of the bar code, the data is recorded in the computer.



In some supermarket, an optical w
and is not necessary and the product can be put into an automatic laser
scanning mechanism.

Digitizer



With a suitable interface it is now easy to plug in standard audio and video signal from a CD player,
camcorder or a TV receiver, and digitise them into c
omputer formats.



The sound and graphic can usually be played or displayed in real time.



As a result, it is now common to watch TV or listen radio on PC, or to monitor home through internet with
small digital camera.

Communication Device and Media
(for both

Input and Output)

Modem



It is used in transmitting data from one computer to another through telephone lines.



It consists of a
mo
dulator and
dem
odulator.



Modulator



data in computer




signal through telephone lines



Demodulator



Network I
nterface Card (NIC)



A network interface card (NIC) is a computer circuit board that is installed in a computer so that it can be
connected to a network.




S
4C CIT
/CH/
May
,

2
00
6


COMPUTER SYSTEM


page
10



Each NIC is unique. NICs provide a dedicated, full
-
time connection to a network.

Output Device and Med
ia

Vi
sual

Display Unit (VDU)



It is
also
known as monitor, as it helps to monitor the computer

s operations.



In addition to reflect the input key and mouse actions, the output data of process are also usually displayed
by the VDU.



All colours on the VDU are

made up by a mixture of the three primary colours:

RED


,

GREEN


and

BLUE

(

RGB


).



The Super VGA (SVGA) monitor that we use in our computer rooms has a


resolution


from 640


480
, 1024


768

to 1
600



1200

pixels, each can be one of 16

colours to 2
24

colours (i.e. 24 bit
colours).



The two common types of VDU are Cathode Ray Tube (CRT) display and Liquid Crystal Display (LCD).



Another common type of display devices is the video projector.

Printer



It output data in paper forms (hardcopi
es).



There are 3 types of printers:

character printer
: print 1 character at a time.

line printer
: print 1 whole line at a time.

page printer
: print 1 page at a time.



Dot
-
matrix printer

i.

A character printer or line printer.

ii.

Characters in a dot
-
matrix c
haracter impact printer are produced by printing appropriate dot patterns.







S
4C CIT
/CH/
May
,

2
00
6


COMPUTER SYSTEM


page
11


iii.

They are adequate for ordinary printout where print quality is not so important.



Ink
-
jet printer

i.

A line printer.

ii.

It uses the dot
-
matrix principle droplets of electrically charge
d ink injected through a nozzle toward the
paper instead of impact.



Laser printer

i.

A

page printer
.

ii.

Printing process: The laser printers use a laser beam to create images onto a drum. The images are
electronically charged to attract toner, which is then tr
ansferred from the drum onto paper. A heating
process follows which fixes the images onto the paper.

iii.

It produces the best quality printouts among the printers we study and thus is widely used for business
printing.



Another type of printers. Heat
-
sensitive

printer used by facsimile machines (FAX).


Figure 3

Figure 4



S
4C CIT
/CH/
May
,

2
00
6


COMPUTER SYSTEM


page
12


Comparison between printers


Dot
-
matrix

Ink
-
jet

Laser

Cost

Low

Medium

High

Speed

Slow

Fast

Very fast

Quality

Good

Very good

Excellent

Popularity

Low

High for home use

High for business use

Plotter



It
is designed to draw continuous curves instead of discrete characters or matrix of dots, resulting in the
form of graphics or pictures.



It is commonly used in drawing professional diagram for building and cars or maps.



Three kinds of plotters:

flatbed, rot
ary (drum) and turtle
.



Figure 5

Figure 6



S
4C CIT
/CH/
May
,

2
00
6


COMPUTER SYSTEM


page
13



Other output media

i.

Microfilm and Microfiches

ii.

Voice synthesiser

iii.

Braille embosser

Backing Store (Secondary memory)



The reasons for not putting data only in main memory:

i.

main memory is expensive;

ii.

data in main memory is not permanen
t (i.e. volatile);

iii.

if all data are stored in main memory, the size of main memory will be very large and accessing time of
data in it will thus be very long.

Magnetic Tape



Data in it is stored in vertical columns of frames.



A magnetic tape drive is used to

read and to write magnetic tape. It is done by a read/write head.



After a block of data is written, it is read back immediately for checking.



The storage density of a magnetic tape is expressed in terms of
bits per inch (bpi)
.



The maximum number of bytes

that can be read from or written on tape in a second is called



data transfer rate




.
(byte per second, bps, or character per second, cps)



On a magnetic tape, we must read or write from beginning to the end
-

sequential access.




S
4C CIT
/CH/
May
,

2
00
6


COMPUTER SYSTEM


page
14




Advantages of mag
netic tapes:

i.

Compact

ii.

Economical

iii.

Fast Transfer Rate



Limitation of magnetic tapes:

Allows only
sequential access

Magnetic Disks



A magnetic disk is a circular sheet(s) of plastic material or metal (harddisk). Magnetic materials is coated
on both surfaces.



Da
ta are stored as strings of bits along concentric circles, called

track

.



The disk surface is also divided into pie
-
shaped segments, called

sector

.


i

Figure 8

Figure 9



S
4C CIT
/CH/
May
,

2
00
6


COMPUTER SYSTEM


page
15



The mapping of a symbolic filename on to a physical location in a disk is achieved by means of a file

directory
or
catalogue
on the disk (e.g. File Allocation Table, FAT)
-

a table containing information about
the locations of named files.



Each record of data on a disk is addressed by a track number and a sector number.


hence allowing
random
access.



We
can still read or write a magnetic disk sequentially, depending on our needs. i.e. It supports both
sequential and random access.



Two main kinds of magnetic disks: Harddisks and floppy disks (floppies).



Harddisk stores much more data than a floppy diskett
e. However, floppies are more portable and
inexpensive.



The lifetime of a floppy is much shorter than a harddisk.



Advantages of magnetic disk over magnetic tape:

i.

Direct access


ii.
Easy updating



The common formats of floppy disks are shown below:

Size

Notation

Sides

Tracks

Sectors

Total

5.25”

䑓䑄

2



8

㌲か

5.25”

䑓䑄

2



9

㌶か

5.25”

䑓䡄

2





ㄲ〰1

3.5”

䑓䑄

2



9

㜲か

3.5”

䑓䡄

2





ㄴ㐰1

CD
-

ROM (

Compact Disc


Read
-
Only Memory



)



It uses the same techniques
and is same in size
a
s the audio compact disc; therefore, is good for circulating
information in large value, storing archival information
that
can be retrieved later by searching under certain
criteria.



Now it has increasing importance as its low price and large volume. The
only limitation is that it is
unwritable.




As the technology makes progress compact disk recordable (CD
-
R) and compact disk rewritable (CD
-
RW)

i.

CD
-
R can be written once but can be read many times.

Figure 10



S
4C CIT
/CH/
May
,

2
00
6


COMPUTER SYSTEM


page
16

ii.

CD
-
RW can be read and written many times.

DVD
(

Digital Vi
deo Disk


or

Digital Versatile Disk



)



It is different in format with the CD
-
ROMs.



DVD can store a greater amount of data than a traditional CD. A double
-
sided DVD can store 17 GB of
data.

Comparison of different backing store


Magnetic Tape

Hard

Dis
k

Floppy Disk

Optical Technology

Cost of Drive

H
igh

High

Low

High

Cost of Media

Relatively low

Low

Very low

Very low

Access Mode

Sequential only

Sequential/Direct

Sequential/Direct

Sequential/Direct

Access Time

Depends on location

10
-
100 ms

70
-

600 ms

30 ms
-

1 sec

Storage Scheme

IBG Separation

Cylinder, Sector

Sector

Sector

Capacity

10M
-

2G bytes

20M


20䜠by瑥t

㄰〠
-

1440 䬠by瑥t

600䴠
-

65䜠by瑥t

Data Rate

40
-

320 KB / s

2.5
-

7.1 MB / s

250 KB / s

150
-

250 KB / s

Speed

50
-

200 in / s

2400, 3
600 rpm

300 rpm

Variable so as to main
Constant Linear
Velocity



Comparison between backing store and main memory


Main memory

Backing store

technology

semi
-
conductor

magnetic disk

magnetic tape

physical size

small

larger


storage capacity

small

larger


cost

expensive

cheap

(cents per bit)

(50
-

500)

0.05
-

0.0025

0.005
-

0.0005

access time

very fast (10
-
3

-

10
-
2




f慳琠a3
-

30 ms)

s汯w (10s
-

㄰1
m楮)

p敲m慮敮捥 of d慴a

vo污瑩汥lfor RAM

non
-
vo污瑩汥lfor R位

non
-
vo污瑩汥

r敡d⽷r楴攠mode

r敡d⽷r楴

r敡d
-
on汹

r敡d⽷r楴

慣捥ss mode

r慮dom 慮d d楲散

r慮dom 慮d d楲散

s敱敮瑩慬

fn捴楯n

却Sr敳eprogr慭s 慮d d慴愠wh楣 慲攠b敧楮
pro捥ss敤

s瑯r敳e b慣kp 捯p

敳e or 污lg攠 vo汵m攠
楮瑥慣瑩攠r敳e汴l