Coal Sp21 Lec1
Coal Sp21 Lec1
Language (CS-506/CS-209)
Muhammad Zeeshan Haider Ali
Lecturer
ISP. Multan
[email protected]
Lecture 1
Computer System an Introduction
Course Objectives:
Download Link:
https://zeeshanaliatisp.wordpress.com/
Teaching Style and Philosophy
• My role is to
• Facilitate and guide the students to the fundamental concepts
• Make it simple and elaborate with examples
• Relate as much as possible to available products
• Prepare class notes to be as rich and comprehensive as possible
• Your role is to
• Focus on understanding and digesting the concept
• Do not worry about the grade more than concepts; you are a professional !!
• Slow down me if you do not understand and raise questions
• Be prepared to answer an oral quiz, when you get involved in a side talk
Course Topics to be discussed:
• Computer.
• Computer Organization
• Components of a Computer
• Overview of each component.
What is Computer?
• Computer architecture
refers to those attributes of a system visible to a programmer or, put
another way, those attributes that have a direct impact on the logical
execution of a program
• Computer organization
refers to the operational units and their interconnections that realize the
architectural specifications.
High Level View of Computer Organization.
Simplified Block Diagram of Computer
System.
The System Board:
• Inside the system unit is a main
circuit board called the system
board, which contains the
microprocessor and memory
circuits. The system board is also
called a motherboard because, it
contains expansion slots. which are
connectors for additional circuit
boards called add-in boards or add-
in cards. 1/0 circuits are usually
located on add-In cards.
The Central Processing Unit:
• manages the instruction-
execution cycle
• FETCH – DECODE –
EXECUTE
• coordinates the activities of
other devices
Central Processing Unit:
Arithmetic logic unit
• Performs arithmetic and logical operations
• Arithmetic operation
• Unary: increment (+1) and decrement (-1)
• Binary: add, subtract, multiply, and divide
• Logical operation
• Unary: NOT
• Binary: AND, OR, XOR
Central Processing Unit:
Registers
• Registers are fast storage locations that hold data temporarily.
• Data registers
• Input data and output data
• Instruction registers
• Program counter
Central Processing Unit:
Control Unit
• The control unit is like the part of the human brain that controls the
operation of each part of the body.
• Controlling is achieved through wires that can be on (hot) or off
(cold).
Main Memory
• Read
Random
Only
Access
Memory
Memory
(ROM)
(RAM)
• readable
• writeable
permanent
• usually volatile (e.g., Dynamic RAM or DRAM)
nonvolatile
• general storage storage for data and instructions
special-purpose
The CPU and Main Memory
Inside the CPU
Inside the CPU
memory
address
register
Inside the CPU
memory
memory data
address register
register
Inside the CPU
memory
memory data
address register
register
program
counter
Inside the CPU
memory
memory data
address register
register
instruction
register
program
counter
Inside the CPU
memory
memory data
address register
register
instruction
register
program arithmetic
counter logic unit
Inside the CPU
memory
memory data
address register
register
accumulator
(work
instruction register)
register
program arithmetic
counter logic unit
Inside the CPU
memory
memory data
address register
register
accumulator
(work
instruction register)
register
program arithmetic
system logic unit
counter
clock
FETCH the instruction
1. address of the
next instruction is
transferred from
PC to MAR
2. the instruction is
located in memory
FETCH the instruction
3. instruction is
copied from
memory to MDR
DECODE the instruction
instruction is
transferred to
and decoded in
the IR
EXECUTE the instruction
control unit
sends signals
to appropriate
devices to cause
execution of the
instruction
Types of Processor Operations
• Arithmetic
Data Movement
and Logical
Operations
Operations
• integer arithmetic
moving data from memory to the CPU
• moving datatwo
comparing from
quantities
memory to memory
• input androtating
shifting, output bits in a quantity
• testing, comparing, and converting bits
Types of Processor Operations
• Program Control
• starting a program
• halting a program
• skipping to other instructions
• testing data to decide whether to skip over some instructions
System Clock
• Timing
Even though machine instructions are very simple, their execution is
actually quite complex. To ensure that the steps arc carried out in an
orderly fashion, a clock circuit controls the processor
The time interval between two pulses· is known as a clock period, and
the number of pulses per second is called the clock rate or clock speed,
measured In megahertz (MHz).
One megahertz Is 1 million cycles (pulses) per second. The original lBM
PC had a clock rate of.4.77 MHz, but the latest PS/2 model has .1 cluck
rate of 33 MHz
System Clock
The computer circuits are activated by the clock pulses; that is, the
circuits perform an operation only. when a clock pulse is present. Each
step in the instruction fetch and execution cycle requires one or more
clock periods. For example, the 8086 takes four clock periods to do a
memory read and a multiplication operation may take more than
seventy clock periods. If we speed up the clock circuit, a processor can
be made to operate faster. However, each processor has a rated
maximum clock speed beyond which it may not function properly.
Input/output Module:
• Interface to CPU and Memory
• Interface to one or more peripherals
Generic Model of I/O Module
External Devices
• Human readable (human interface)
• Monitor, printer, keyboard, mouse
• Machine readable
• Disk, tape, sensors
• Communication
• Modem
• Network Interface Card (NIC)
Any Quarry?
???
Thank You