How Computer Function
•Accepts Data
(INPUT)
•Process Data
(PRECESSING)
•Produces Output
(OUTPUT)
•Stores Results
(STORAGE)
How is this tied together?
Input devices
•Input devices are used to get data into
a system.
•They should be able to do this as
accurately and quickly as possible, and
with the minimum of human
intervention.
Input devices
•The most common types of input devices
are:
–Keyboards
–Point and Click devices (including mouse, tracker
balls, touch sensitive pads, joysticks, light pens,
touch screens, and graphic tablets)
–Readers (including magnetic strip readers,
barcode readers, optical character
readers/recognition, magnetic ink character
readers/recognition, and optical mark
readers/recognition)
–Punched cards and tape (including punched
cards and Kimball tags)
Input devices
•The most common types of input devices
are:
–Sound capture devices (including voice
recognition and microphones)
–Terminals (including EPOS and EFTPOS
terminals)
–Digital imaging devices (including video
digitisers, scanners, digital cameras, and
web cams)
–Tonal devices (including touch tone
telephones)
Keyboards
•The most common type of keyboard is the
QWERTY keyboard (so called because the
top line of letters are q, w, e, r, t, and y.
Keyboards
•Another type of keyboard is the
concept keyboard.
•The can be specially designed so that
people with restricted vision can use
them to interface with a computer.
•Concept keyboards can also be
programmed to perform common
functions with one keystroke (e.g. a
computerised till in a fast food
restaurant).
Concept Keyboard
Point and Click devices
•Point and Click devices include mouse,
tracker balls, touch sensitive pads,
joysticks, light pens, touch screens,
and graphic tablets.
Mouse
•The mouse translates movement on the
desktop into digital information.
•This is information is converted into
movement of the cursor on the screen.
•A mouse will also have one, two, or
three buttons which can be clicked to
help the user to select what functions
they wish to use.
Tracker ball
•The tracker ball is essentially an
upside down mouse.
•Instead of moving the mouse on the
table top, the ball is rotated.
•This achieves the same result as using
a mouse but takes up far less room.
Touch sensitive pad
•These are most commonly found on
laptop computers.
•A stylus or the user’s finger is pressed
gently onto the pad, and as it is
moved the cursor moves on the
screen.
Joystick
•These are most commonly used to
interact with computer games,
although they are also used in other
circumstances (e.g. on hospital
scanners).
•Like the tracker ball, the movement of
the joystick moves the cursor on the
screen,
Light pen
•Light pens are usually used with
specialist design software.
•The light pen works by being touched
against the screen.
•As the pen is moved on the screen,
the cursor moves.
Touch screen
•The touch screen is a special type of screen
which is sensitive to touch.
•Selections can be made by touching the
screen.
•These are particularly useful in banks,
building societies, and shops, where
customers who are not used to using a
keyboard can interact with a computer
system.
Graphics tablet
•A graphics tablet allows the user to
create designs directly onto the
screen.
•A special stylus is connected to the
computer via the graphics tablet, and
as the user ‘draws’ on the tablet with
the stylus the drawing appears on
screen.
Input Devices sometimes may
exhibit operational problems.
Use the mouse and QWERT
keyboard as examples.
1. What are some of the
problems you may encounter is
using such devices?
2. What are your suggestions to
overcome such problems?
Readers
•The most common types of reader
used include magnetic strip readers,
barcode readers, optical character
readers/recognition, magnetic ink
character readers/recognition, and
optical mark readers/recognition).
Magnetic strip readers
•The most common
magnetic tape readers
are those used at
electronic points of sale
(EPOS).
•These ‘read’ the personal
data stored on the
magnetic strip of a credit
or debit card.
Barcode readers
•Barcodes are used
in shops, libraries,
luggage handling,
and stock control.
•The lines on a
barcode represent
numbers, and can
be scanned very
quickly using a
laser scanner.
Optical character
readers/recognition
•Optical character recognition is a
method of inputting text using a
scanner.
•It requires special software to convert
the scanned image of each letter into
an ASCII (American Standard Code for
Information Interchange) code, and it
often confuses similar shaped letters
and numbers (e.g. S and 5, B and 8).
Magnetic ink character
readers/recognition
•Magnetic ink characters are printed at
the bottom of cheques.
•They are used by banks to identify the
bank a customer banks with, the
individual branch where their account
is held, and the customer’s bank
account number.
Optical character
reader
Magnetic ink
characters
Magnetic ink character
readers/recognition
Branch codeCheque number Account number
MIC reader
Optical mark
readers/recognition
•Optical mark recognition sense marks
made on specially designed forms
(e.g. multiple choice answer sheets,
lottery cards).
•OMR is a very cheap, easy and quick to
handle system of inputting data, but if
a user makes a mistake they are
difficult to correct.
Optical mark
readers/recognition
Optical mark reader
Complete optical
mark reader
system
Punched cards and tape
•Punched cards and tape were used by
the first computers to store programs
and data.
•They are seldom used today except for
clock cards, which records when a
person starts and ends work, and
Kimball tags, which are used for stock
control.
Punch card
Punch card reader
Sound capture devices
•The most common use of sound
capture devices involves the use of
voice recognition software and
microphones.
Sound capture devices
•Voice recognition software
‘remembers’ the way a user speaks,
and converts their speech into text
that appears on screen.
•Although voice recognition software
has become increasingly
sophisticated, many such programs
have difficulty converting more than
90% of common words accurately.
Terminals
•EPOS (Electronic Point Of Sale) and
EFTPOS (Electronic Fund Transfer at
Point Of Sale) terminals are connected,
via secure Internet connections, to the
computers of the main banks and
credit card companies.
Terminals
•EPOS and EFTPOS allow a retailer to
transfer the cost of what they have
sold to a customer from the
customer’s credit card or bank
account to their own bank account.
•This is much faster than accepting
payment by cheque, and more secure
than accepting payment in cash.
Terminals
•It also gives the retailer an opportunity
to collect information about their
customers, and to develop individual
customer profiles (i.e. know what an
individual customer may want to buy).
•This helps to retailer to ‘target’
individual customers with special
offers etc.
Digital imaging devices
•These include video digitisers,
scanners, digital cameras, and web
cams.
Web cam
Video Digitisers
•The video digitiser is a combination of
hardware and dedicated software that
converts an analogue signal into a
digital signal.
•This is the basis of most set top boxes
that give access to digital television on
standard television sets.
•It can also be used to ‘capture’ still
images from video.
Scanners
•Scanners are used to scan text or
images so that they can be stored on
and manipulated by computer.
•The scanner converts the text or
image into a digital signal which it
sends to the computer.
•The user can then decide whether they
want to store or manipulate what they
have scanned.
Digital cameras
•Digital cameras convert the analogue
image seen through the camera’s
lense into a digital signal that can be
stored.
•Each picture is split up into millions of
tiny squares (or pixels), each of which
is a different colour.
•Each pixel is stored as a ‘bit’ of digital
information.
Web cams
•Web cameras (web cams for short) are
small digital cameras which are
attached to computers so that still and
motion digital images can be
‘captured’ and used.
•They are often used in conjunction
with the Internet so that people can
videoconference.
Tonal devices
•Touch tone telephones are the most
common tonal device used to input
data.
•Customers can use them to interact
with computerised telephone systems
so that they can respond to choices
given to them by recorded messages.
Data storage
•This refers to Storing data in both Internal
memory and backing storage devices
•The term memory identifies data storage that
comes in the form of chips, and the word storage is
used for memory that exists on tapes or disks.
Computer memory
•Computers have two types of memory.
•These are:
–Internal memory (also known as main
memory or Primary storage)
–Non-volatile semiconductor memory or
Secondary storage
Types of Internal memory
•There are two main types of memory.
•These are:
–RAM (Random Access Memory)
ROM (Read Only Memory)
Internal memory (RAM)
•Internal memory is used by the
computer to store programs and data
that are currently being used.
•It is usually referred to as a
computer’s RAM (Random Access
Memory).
•It is also referred to as the computer’s
Immediate Access Store (IAS).
RAM
•It is ‘Random’ because
any part of the memory
can be accessed directly
by the computer
•RAM is made up of
locations, also known
as cells
•Each location has a
unique address that
never changes
Internal memory (RAM)
•Internal memory can not hold all the
data and programs that a computer
might need.
•It only holds the data and programs
that are in use at a particular moment
in time, and empties and refills itself
as different programs and files are
used.
Internal memory (RAM)
•Internal memory is volatile memory.
•This is because this memory is
emptied (i.e. its contents are lost)
when the computer is turned off.
Random Access Memory
•When the computer is switched on, the
operating instructions, computer
programs, and data are moved into
the RAM as required.
•RAM empties every time the computer
is switched off - this is why work has
to be saved before the computer is
switched off!
Random Access Memory
•RAM is usually measured in megabytes.
•The more RAM a computer has, the more it
can do.
•RAM if very fast compared to backup
storage. A typical hard disk can take about
10 milli-seconds to get a piece of data,
whilst RAM will take about 10 nano-
seconds. That is one thousand million
times faster!
•This is why a computer needs both a
backup storage and RAM. It uses RAM for
speed and the hard disk to store data whilst
switched off.
Internal Memory (ROM)
•It refers to computer memory chips containing
permanent or semi-permanent pre-recorded
programs. Unlike RAM, ROM is non-volatile.
Even after you turn off your computer, the
contents of the ROM remains available.
•All computers have a small amount of ROM
containing the boot firmware.
•This is so that essential instructions can be
stored, e.g. Instructions to bootstrap the
computer
Read Only Memory
•Instructions stored in the ROM enable
the computer to check the hardware
and load the operating systems.
•Embedded computer systems usually
has their programs stored in ROM
•ROMs are not as fast as RAMs.
Backing storage
•Backing storage is process that is used
to store data and programs that are
needed to be used again and again.
•This storage data is not lost when the
computer is turned off.
•Computer disks (e.g. floppy, hard, or
CDs disks) are often used as backing
storage.
Magnetic Storage Devices
•Hard Disk
•Floppy Disk
•ZIP drive
•Magnetic Tape
Hard Disk
•Data is stored by magnetically charging “bits” on a
rotating disk.
•The “bits” are read/written by a sensor
•Access is slow since the head (the sensor) must be
mechanically moved to the location of the bit on the
disk
•Personal Computers typically comes with over 50
GigaBytes disk
Hard Disk
Advantages
•Main Backing storage
for files and programs
•Can store lots of data
compared to the
floppy disk or optical
disks
•Can have a second
hard disk as Back-up
storage
Disadvantages
•Slow to access when
compared to RAM
•Data can Be
damaged if the head
crashes onto the
platter
Typical size = 120GBTypical size = 120GB
Floppy disc
Advantages
•Small thin and
lightweight so easy
to carry round
•Can Be reused But
data can’t Be
overwritten only
deleted to create
space
Disadvantages
•Can’t store that
much and one Big
picture will take up a
lot of room
•It’s thin so it could
get damaged easily
Typical size = 1Typical size = 1··44 MB44 MB
Zip Disc
Advantages
•Can hold more data
than a floppy disk
and again easy to
carry around
Because of the size
Disadvantages
•Much more
expensive than a
floppy
•You need a special
drive to read the
disk
Typical size = 100 MBTypical size = 100 MB
What is you suggestion on how What is you suggestion on how
to logically store data is a to logically store data is a
magnetic disk to facilitate both magnetic disk to facilitate both
access and easy location of access and easy location of
data?data?
Do you think we can follow the Do you think we can follow the
same procedure to store data in same procedure to store data in
optical devices ?optical devices ?
Magnetic Storage Disks
•Magnetic Disk can be useful only if formatted.Magnetic Disk can be useful only if formatted.
•Formatting divide the disks into areas, called: Formatting divide the disks into areas, called:
Tracks, Sectors and Cylinders.
•The formatting process sets up a method of The formatting process sets up a method of
assigning addresses to the different disk areas.assigning addresses to the different disk areas.
•A formatting method allows you to efficiently A formatting method allows you to efficiently
use the space while still being able to find use the space while still being able to find
things.things.
Disk Tracks
•A
track is a circular
A
track is a circular
ring on one side of the ring on one side of the
diskdisk
•Each track has a Each track has a
number. number.
•The diagram shows 3 The diagram shows 3
trackstracks
Sectors
•A
disk sector is a wedge-
A
disk sector is a wedge-
shape piece of the disk, shape piece of the disk,
shown in yellowshown in yellow
•A A track sectortrack sector is the is the
area of intersection of a area of intersection of a
track and a sector, track and a sector,
shown in yellow.shown in yellow.
•On a 3½" disk there are On a 3½" disk there are
80 tracks with 9 or 18 80 tracks with 9 or 18
sectors eachsectors each
In the illustration above, you can see how the In the illustration above, you can see how the
disk is divided into tracks (brown) and sectors disk is divided into tracks (brown) and sectors
(yellow).(yellow).
Clusters
•A cluster is a set of track sectors, ranging from 2 to A cluster is a set of track sectors, ranging from 2 to
32 or more, depending on the formatting scheme 32 or more, depending on the formatting scheme
in use. in use.
•The most common formatting scheme for PCs sets The most common formatting scheme for PCs sets
the number of track sectors in a cluster based on the number of track sectors in a cluster based on
the capacity of the disk. A 1.2 gigbyte hard drive the capacity of the disk. A 1.2 gigbyte hard drive
will have clusters twice as large as a 500 MB hard will have clusters twice as large as a 500 MB hard
drive.drive.
•1 cluster is the minimum space used by any read or 1 cluster is the minimum space used by any read or
write. So there is often a lot of slack space, unused write. So there is often a lot of slack space, unused
space, in the cluster beyond the data stored there. space, in the cluster beyond the data stored there.
Cylinders
•A
cylinder is a set of
A
cylinder is a set of
matched tracks.matched tracks.
•On a floppy, a track from On a floppy, a track from
the top surface and the the top surface and the
same track from the same track from the
bottom surface of the disk bottom surface of the disk
make up a cylindermake up a cylinder..
•On a hard disk, a cylinder On a hard disk, a cylinder
is made of all the tracks of is made of all the tracks of
the same from all the the same from all the
metal disks that make up metal disks that make up
the "hard disk".
the "hard disk".
What happens when a disk is
formatted?
•All data is erased.All data is erased. (Don’t forget this) (Don’t forget this)
•Surfaces are checked for physical and Surfaces are checked for physical and
magnetic defects.magnetic defects.
•A root directory is created to list where A root directory is created to list where
things are on the disk.things are on the disk.
Note: Note: The computer keeps track of what it has The computer keeps track of what it has
put where on a disk by remembering the put where on a disk by remembering the
addresses of all the sectors used, which would addresses of all the sectors used, which would
mean remembering some combination of the mean remembering some combination of the
cylinder, track, and sectorcylinder, track, and sector
Magnetic Tape
Advantages
•Can store a lot of
data
•Not easily damaged
•Can Be used
overnight to Back-up
a system
Disadvantages
•Takes a long time to
load data onto it
•Have to go through
the tape to get to
the data you want –
serial access
Typical size = 100MBTypical size = 100MB
CD-ROM
•Stands for Compact Disk Read Only
Memory
•Once data is burned onto the disks it cannot
be wiped
•Data is stored through tiny pits burnt onto
the surface by a laser beam in the CD-ROM
drive. This is why they are known as optical
storage devices. A laser beam also reads
the information from the disk
CD-Rom
Advantages
•Data cannot Be
erased – you cannot
lose your data
•Easy to carry around
•Cheap to produce
•Can Be read By a
DVD drive
Disadvantages
•Fragile
•Can scratch easily –
this effects the data
when the laser reads
it
•Slower to access
than a hard drive
Typical size = 650mBTypical size = 650mB
DVDs
•Stands for Digital Versatile Disk and are now
the most common method of recording video
material.
•They are bigger, faster than CD and can hold
cinema-like video, better-than-CD-quality audio,
and computer data.
•A single sided DVD can store about 4.7Gb of
data.
•various kinds of DVD disks for sale:- DVD-R,
DVD+R, DVD-RW and DVD+RW.
DVD
Advantages
•large amount of
storage
•Does not transmit
virus’s
•The prices are
getting cheaper
•Good for storing
films and videos
Disadvantages
•Doesn't work in CD
ROM drives
•More expensive than
CD ROMs
Typical size = 5-17GBTypical size = 5-17GB
Semiconductor/Solid State
Storage Devices
Flash Drive
Data is stored by
charging small-scale
“batteries” on the
device.
Most flash drives
have a capacity of
256 Megabytes up to
32 Gigabytes.
Understanding Computer Storage
Storage
Amount
Definition
(in bytes)
Enough Raw Capacity For…
Byte 1 A single character
KiloByte 10
3
Half of a typewritten page
MegaByte 10
6
A short novel or single low-res photo
GigaByte 10
9
A symphony in hi-fidelity sound or a truck
full of paper
TeraByte 10
12
One-tenth of the printed texts in the Library
of Congress
PetaByte 10
15
450,000 hours of TV or all email produced
worldwide in a single day(about 4 years
ago)
ExaByte 10
18
Two exabytes is estimated to be all
information generated worldwide in a single
year. Five exabytes is all the words ever
spoken by human being
H/W On your own H/W On your own
1.Find out how data is stored in 1.Find out how data is stored in
CD-ROM, CD-RW and DVDCD-ROM, CD-RW and DVD
2. Mention other commonly 2. Mention other commonly
found semiconductor secondary found semiconductor secondary
devices found in the market, devices found in the market,
manufacturers and their usemanufacturers and their use
How the CPU Works
What is CPU
•An abbreviation for Central Processing Unit
•Sometimes referred to simply as the central
processor, but more commonly called
processor, the CPU is where most
calculations take place.
•It is the "brains" of the computer,
responsible for controlling its inner
workings
CPU
•The CPU is an electronic chip that performs instructions.
–made of circuitry – electronic components wired together to control
the flow of electrical signals
–the circuitry is embedded in a small silicon chip, 1-2 inches square
–despite its small size, the CPU is the most complex part of a
computer
(CPU circuitry can have 10's of millions of individual components)
–commercial examples: Intel Pentium 4, AMD Athlon, Motorola
PowerPC G4, and Duo core
•The CPU works by repeatedly fetching a program instruction
from memory and executing that instruction
–individual instructions are very simple (e.g., add two numbers, or
copy this data)
–complex CPU behavior results from incredible speed e.g.
•a 2.8 GHz Celeron processor can execute 2.8 billion instructions
per second
•a 3.2 GHz Pentium 4 processor can execute 3.2 billion
instructions per second
The CPU
•The speed at which a CPU works is determined by it’s
Clock speed or rate. Hertz is a measure of how many
tasks the CPU can complete in one second of time
–Definitions first:
•Mega : a word meaning million (i.e. 10
6
)
•Giga : a word meaning billion (i.e. 10
9
)
•Tera : a word meaning 1000 billion (i.e. 10
12
)
•Peta : a word meaning 1000 tera (i.e. 10
15
)
•Hertz : a word meaning “change per second”
–Modern CPU clock rates are something like:
•2.8 GIGA HERTZ: which means 2.8 BILLION TASKS PER SECOND
CPU Components
•3 Major Parts
–Arithmetic/Logic Unit (ALU)
–Control Unit (CU)
–Memory
•The ALU & CU are the commonly known
as the Central Processing Unit
Block Diagram of System
Memory
CPU
ALU
I/O
Control Unit
Program Counter
Arithmetic/
Logic Unit (ALU)
•The component where data is held
temporarily
•It carry out all arithmetic calculations such
ADD, SUB, MULT, and DIV.
•It performs logical and other operation
such as SHIFT, OR, AND, COMP
•It knows the commands that make up the
machine language of the CPU e.g LOAD
Memory
CPU
ALU
I/O
Control Unit
Program Counter
Control Unit
Control Unit
Fetch Next Instruction
Fetch Data Store Data
Increment Instruction
Execute Instruction
• Everything that happens to data
inside a computer has to be
coordinated or it just won’t work
properly.
• Organising this coordination is
the job of the Control Unit.
• Control Unit Interprets and
controls the execution of all
instructions
• This control corresponds to the
“fetch-execute” cycle
–The fetch cycle gets the
instructions
–The execute cycle does the
work specified in the
instruction
Control Unit
•The control unit acts as a go-between linking the
ALU and the system memory.
•The control unit controls the functioning of the
CPU and data flow.
•It accepts the data from the system memory,
passes the data to the ALU for performing
arithmetic and logical operations, and returns
the processed data back to the system memory.
•The Control Unit does not ‘do’, it directs or
decides what to do next.
Output Devices
Output devices
•Output devices are used to get data
out of a system.
•They should be able to do this as
accurately and quickly as possible, and
with the minimum of human
intervention.
Output devices
•The most common types of output
devices are:
–Visual devices (including Visual Display
Units [VDUs], screens, and monitors)
–Hard copy devices (including ink jet
printer, laser printers, dot-matrix printers,
and plotters)
–Sound devices
–Computer controlled devices (including
robots)
Visual devices
•The most common visual device is the
visual display unit (VDU).
•These are also known as computer
screens and monitors.
•The types of visual display unit found
in common usage are based on
cathode ray tube or liquid crystal
display (LCD) technology.
Visual devices - Projectors
•These are very useful in circumstances
where a user wants to show a large
group of people the same information
simultaneously.
Visual devices - Projectors
A typical projector. This type uses combinations
of red, green, and blue light to create the
projected image.
Hard copy devices - Printers
•The most common types of printer are
the laser and the ink jet printers.
•A less common type of printer is the
dot-matrix printer.
Hard copy devices - Printers
Ink jet printerLaser printer
Hard copy devices - Plotters
•Plotters are a very specialised type of
output device, and are usually found
where high quality technical drawings
or graphs have to be produced.
Hard copy devices - Plotters
Typical plotters
Sound devices - Speakers and
Headphones
•The speakers and headphones used
with computers are usually compatible
with other devices such as stereo
systems.
Computer controlled devices
•A variety of different control devices
can be connected to a computer.
•These include robotic arms and
motors (also known as actuators).
•The most common use of computer
controlled devices is in computer-
aided manufacturing.
Computer controlled devices -
Robots
A typical
computer
controlled device
used in computer-
aided
manufacturing – a
robotic arm