CS110
Computing for Productivity
Components of a Computer System
1
A System
A collection of parts
Acting together
For some defined purpose
A system has a boundary
A system
Processing
Input Output
System
Sub
System
System
Boundary
Examples of systems
Digestive system
Banking system
Transport system
What are the parts making up these systems?
Components of a computer system
5
Computers consist of hardware and
software.
Hardware Software
All the machinery and All the instructions that tell
equipment in a computer the computer how to
system perform a task
Computers also consist of firmware and
liveware.
Firmware Liveware
Instructions or programs All the living things aiding
that reside inside computer to work. Data
Integrated Circuits (ICs) entry operators,
programmers etc
Few Basics….
26
Computer
Hardware Software
CPU Memory I/O Etc. System Application Utility
Software Software Software
Hardware
Physical devices you can see and touch
Screens
Keyboards
Printers
Hardware ‘Discussion’
Hardware also refers to objects such as disks, disk
drives, boards, and chips. In contrast, software is
untouchable. Software exists as ideas, concepts, and
symbols, but it has no substance.
Books provide a useful analogy. The pages and the ink
are the hardware, while the words, sentences, paragraphs,
and the overall meaning are the software. A computer
without software is like a book full of blank pages -- you need
software to make the computer useful just as you need
words to make a book meaningful.
(Single In-line Memory Module)
Hardware
11
Hardware
CPU: Central Processing Unit
– Brain of a computer
– Manages all devices and performs the actual processing
of data
– Carry out instructions given by user
– For Personal Computer (PC), the CPU is usually included
in a single Integrated Circuit (IC) chip (called
Microprocessor)
– Nowadays, one or more microprocessors (chips) can be
used to form a CPU
Parallel Processing
12
Hardware
Input and Output devices (I/O devices)
– Interface between the outside world and the computer
system
– Input devices: keyboard, mouse
– Output devices: monitors, printers
– Other I/O devices: scanner, joystick, touch screen, …
13
Hardware
Memory
– Internal memory / Main memory
Random Access Memory (RAM)
– Main feature 1: volatile
requires continuous supply of electrical power to retain information
– Main feature 2: cheap in terms of bytes per dollar
suitable for large volume data storage
– Functions:
Receive commands / data from keyboard
Store information ready to be sent to output
Store currently running programs/their data
Store immediate data generated by the currently running programs
14
Another kind of memory
Read Only Memory (ROM)
– Main feature 1: non-volatile
data retain even when the power is off
– Main feature 2: relatively expensive and can only be written
once
suitable for storing essential data but in small volume
– Usually used for system boot up and basic control of I/O
devices
When a computer first powers up, nothing is in RAM
Need ROM to store the instructions to set up various
I/O devices, such as disk interface card, video adapter card,
sound card, etc.
– ROM is used to store BIOS (Basic Input/Output Systems)
15
Hardware
Storage devices
– External memory
Non-volatile
Used to store programs/data for future use
Also used when the capacity of the internal storage is
insufficient to keep the currently running programs and the
data required
Floppy disks, hard disks, CD ROMs, Magnetic tapes
16
Hardware
Main differences between storage & memory:
– Larger capacity in storage than in memory
– Data in storage are retained while data in memory
disappear when power is off
– Storage is much cheaper than memory
17
Buses
– Path along which “bits” are transmitted
– Linking up the CPU, Memory and I/O devices
Address
Memory
Instructions / I I I I I D D D I I
00 01 02 03 04 05 06 07 08 09
CPU Data
I I I I D D D D D D
Control 10 11 12 13 14 15 16 17 18 19
20
I: Instruction 21
I/O 22 External
I/O
D: Data I/O Storage
18
Put all the hardware together and…
You still need the software!
System software
(Operating System)
Helps the computer
perform essential operating
tasks and enables the
application software to run
and…
System Software
Exists primarily for the computer itself
Hides the hardware complexities
Brings the different hardware configurations into
common platforms and accessible by the users
Consists of several programs, the most important
one is the operating system (master control
program that runs the computer)
21
You still need the software!
Utility Software:
Also known as service routine, utility software helps
in the management of computer hardware and
application software. It performs a small range of
tasks. Disk defragmenters, systems utilities and
virus scanners are some of the typical examples of
utility software.
Operating System
Master control program
– Manage all resources of the computer
CPU, memory, disk, monitor, network, …
Operating
– Co-ordinate running programs
System
Runs as soon as the computer boots up,
until the computer shuts down
Usually store in the hard disk and load
BIOS
into the memory when the computer
starts
Need the help of BIOS for I/O devices
E.g. Windows, Unix, Linux
Other I/O Devices
resources
23
How the OS is loaded into memory?
• When power up, nothing is in RAM. No control is possible
to the hard disk to load the OS
• CPU starts to read the BIOS instructions stored in the
ROM
• Things that normally perform
– Initialize all I/O devices: hard disk, video, mouse,
keyboard, CD-ROM, etc
– Load the bootstrap loader of the operating system to
RAM
– Start to execute the bootstrap loader in RAM
• The bootstrap loader further loads the other part of the
operating system to the RAM
24
Hard Disk Monitor
Bootstrap
OS loader
Video
Interface
Disk Interface
Main Memory (RAM)
Bootstrap loader
OS
CPU
BIOS
(Stored in
Mother Board ROM)
25
You still need the software!
Application software
Enables you to perform
specific tasks--solve
problems, perform work,
or entertain yourself
Application Software
Developed to fulfill certain needs of users
Either customized or packaged
– Customized software
Designed for a particular customer according to their needs
Payroll, inventory control, …
– Packaged software
Developed for general use
Microsoft word, excel, Access, power-point, …
27
Software ‘Discussion’ (2)
The distinction between software and hardware is
sometimes confusing because they are so integrally linked.
Clearly, when you purchase a program, you are buying
software. But to buy the software, you need to buy the disk
(hardware) on which the software is recorded.
Software is often divided into two categories. Systems
software includes the operating system and all the utilities
that enable the computer to function. Applications software
includes programs that do real work for users. For example,
word processors, spreadsheets, and database management
systems fall under the category of applications software.
Software - Programming
• Programming – the way to generate a program
• Computer can only understand 0 and 1
• The most direct way to communicate with the computer is to use
0 and 1 Machine Language Programming
• 0110001111000010
0001000111100011
Machine :
Language Very
Verytedious
tediousand
andcan
canmake
makeerror
erroreasily
easily
:
Program
0011000100001000
1000001001010101
29
Software – Low level language
Assembly Language Programming
• Assembly Language is created to help humans to instruct the
CPU to work
• By using a tool called Assembler, assembly language program can
be converted into machine language program
Assembly Language Machine Language
mov ax, #0 0110001111000010
add ax, $1234 0001000111100011
: :
:
Assembler :
mov bx, #22 0011000100001000
mov $2345, bx 1000001001010101
30
Software - High Level Language
Programming
• Assembly language programming is still too complicated for
general users
• They are far from human used language
e.g. “Set W equal to W plus X minus Y divided by Z”
“Repeat the next sequence of instructions until X is less
than 0 or Y equals Z”
• A high level language is required to close the gap between human
and computers
31
Machine Language Programming
– No application nowadays
Assembly Language Programming
– Advantage: Less complicated than Machine Language. Usually
generate more efficient code than HLL
– Disadvantage: Need the understanding of CPU structure. Still difficult
to program
– Application: Sometimes used in the programming of embedded
systems (e.g. CPU of printer, washing machines, etc.)
High Level Language Programming (such as C/C++)
– Advantage: Need the least amount of effort to write a program
– Disadvantage: The program written may not be optimal (depends on
the compiler)
– Application: For large scale programs
32
Hardware & Software Summary
User interacts with application software
System software enables the application software
to interact with computer CPU and help the
computer to manage its internal resources
(hardware)
33
Hardware & Software Summary
Banking System / Web Browser / Application
Media player Software
GUI /
Command interpreter
System Software
Operating System
Physical devices / Hardware
Micro-architecture level
34