You are on page 1of 17

Introduction to Computer Systems

Lecture #01

Introduction to Computer Systems


Lecture Objectives:
The student should be able to identify and explain the major components of a computer system in terms of their functions.

What is a Computer? Components of a Computer System Computer Hardware Computer Software Fetch-Decode-Execute Cycle
2

What is a Computer ?
A computer is an electronic device which can input, process, and output data

input

processing

output

Major Components of a Computer System


A computer system consists of two main parts: hardware and software Hardware is the electronic and mechanical parts of a computer system. Software is the data and the computer programs of a computer system. Computer hardware is divided into three major components:
1. The Central Processing Unit (CPU) 2. Computer memory 3. Input/Output (I/O) devices

CPU
The CPU is the "brain" of the computer system.
It does the fundamental computing within the system It directly or indirectly controls all the other components

A particular computer will have a particular type of processor The CPU has a limited storage capacity. It relies on memory to hold data and programs and to save results. The CPU consists of:
1. 2. 3. The Arithmetic and Logic Unit (ALU). The Control Unit (CU). Registers.

The CPU components are connected by a group of electrical wires called the CPU bus.
5

CPU
The CPU is connected to memory and I/O devices by the System bus The System bus consists of: Address-, Control- and Data-buses.
PC: Program Counter Register MAR: Memory Address Register MDR: Memory Data Register

Computer Hardware

Computer Memory
The main function of computer memory is to store software. Computer memory is divided into primary memory and secondary memory. Primary memory is divided into random access memory (RAM) and readonly memory (ROM):
RAM holds the programs and data that the processor is actively working with. ROM contains software that is used in Input/Output operations. It also contains software that loads the Operating System in Primary Memory. The Software in ROM is usually called firmware. The CPU can read and write to RAM but it can only read from ROM. RAM is volatile while ROM is not.

Secondary memory : used for long-term storage of programs and data.


Examples of secondary memory devices are: hard disks, floppy disks and CD ROMs
8

Primary Memory
A bit (binary digit) is the smallest storage unit within a computer. It is a tiny electrical circuit that can be in one of two states:
A voltage high represented by the symbol 1 A voltage low represented by the symbol 0

Any system of symbols can be represented by bit patterns. Primary memory is divided into a number of memory cells or bytes. Each byte has a unique integer address and it is usually 8 bits.

Primary Memory

UNIT Byte Kilobyte Megabyte Gigabyte Terabyte

SYMBOL

POWER OF 2 0 2 10 2 20 2 30 2 40 2

Number of bytes 1 1,024 1,048,576 1,073,741,824 1,099,511,627,776

KB MB GB TB

10

Primary and Secondary Memory Comparison


Primary memory Fast Expensive Low capacity Connects directly to the processor Secondary memory Slow Cheap Large capacity Not connected directly to the processor

11

I/O (Input/Output)Devices
Input devices are used to enter programs and data into a computer.
Examples: keyboard, mouse, microphone, scanner, and bar code reader.

Output devices are where program output is shown or is sent.


Examples: monitor, printer, and speaker.

An I/O device is directly connected to the System bus through a device controller.

12

Software
Software is the programs and data that a computer uses.
Programs are lists of instructions for the processor Data can be any information that a program needs: character data, numerical data, image data, audio data, etc. Both programs and data are saved in computer memory in the same way.

Computer software is divided into two main categories:


1. Systems software 2. Applications software

System software manages computer resources and makes computers easier to use An applications software enables a computer user to do a particular task

13

Software
Application Programs Systems Programs

Word processors Game programs Spreadsheets Data base systems Graphics programs Web browsers

Operating system. Networking system. Programming language software. Web site server. Data backup.

14

Operating Systems
The most important systems program is the operating system.
It is a group of programs that coordinates the operation of all the hardware and software components of the computer system. It is responsible for starting application programs running and finding the resources that they need

Examples of operating systems are: Unix, Windows 98, Windows NT, Windows XP, MS-DOS, Linux, Solaris, VMS, OS/2 and System 7.

15

Fetch Decode Execute Cycle


The CPU continuously transfers data to and from memory Data transfer is done in units called instructions or words When a computer is switched on, the CPU continuously goes through a process called fetch-decode-execute cycle:
The Control Unit fetches the current instruction from memory, decodes it and instructs the ALU to execute the instruction.
The execution of an instruction may generate further data fetches from memory

The result of executing an instruction is stored in either a register or RAM

16

Fetch-Decode-Execute Cycle (contd)


Main Memory
1 Fetch Instruction Cycle

Control Unit
2 Decode

cpu

RAM

Store

Execution Cycle Execute

Arithmetic/Logic Unit

17

You might also like