0% found this document useful (0 votes)
32 views41 pages

Coal Sp21 Lec1

The document provides an overview of a computer organization and assembly language course. The course objectives are to describe how data is represented in computer memory and how programming constructs are implemented at the machine level. Students will learn to write assembly language programs, understand computer architecture, and represent data types. Key topics covered in the course include memory organization, CPU components, instruction execution, and input/output modules.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views41 pages

Coal Sp21 Lec1

The document provides an overview of a computer organization and assembly language course. The course objectives are to describe how data is represented in computer memory and how programming constructs are implemented at the machine level. Students will learn to write assembly language programs, understand computer architecture, and represent data types. Key topics covered in the course include memory organization, CPU components, instruction execution, and input/output modules.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPSX, PDF, TXT or read online on Scribd
You are on page 1/ 41

Computer Organization and Assembly

Language (CS-506/CS-209)
Muhammad Zeeshan Haider Ali
Lecturer
ISP. Multan
[email protected]

Lecture 1
Computer System an Introduction
Course Objectives:

Course Objectives are to:


• Describe how data is represented in computer memory.
• Demonstrate how fundamental high-level programming constructs are
implemented at the machine-language level.
• Write assembly language program that can input, process and output results.
• Demonstrate an understanding of basic computer architecture
• Describe how data are represented in the computer, including floating point
numbers and arrays.
• Describe how synchronous digital systems are created using Digital Logic
Gates.
Course Outcomes:

At the end of the course the students will


• Acquire the basic knowledge of computer organization, computer
architecture and assembly language
• Understand the concepts of basic computer organization, architecture.
• Understand the Assembly language techniques
• Solve the problems related to computer organization and assembly
language
Reference Books:

• Computer Organization & PC Assembly Language by Ytha Yu

• Irvine Assembly Language for Intel Based Computers, Sthed, Prentice


Hall, 2007

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 system an introduction. • Interrupt and services


• Memory Organization, The CPU • Flow Control instructions
• Registers, Memory operations • Stack and Procedures
• Communication Network • Arrays and structures
• Assembly An Introduction • Flow of information control
• Data Representation • Y-86 Architecture
• Integer Arithmetic • HCL
• Different Operation by ccpu • Pipelining.
Today’s Agenda:

• Computer.
• Computer Organization
• Components of a Computer
• Overview of each component.
What is Computer?

• An Electronic device that takes


input, process it and produces
output.
Computer Components:

• Hardware Components. • Software Components:


Physical components of a Set of Instructions used to operate
Computer. the computer
CPU System software
Brain of computer essential for computer,
Without System software not
Main Memory
possible to operate Computer.
to store data
Application Software
I/O Devices Customized software
Performs input and output developed to perform user defined
operations operations.
Computer Operations:

• Arithmetic operations • Logical Operations


Unary operations: Unary operations:
Inc (++) Dec (--) Not
Binary operations: Binary operations
Add, Sub, Mul, Div. AND, OR
Com, Assign
Computer Organization.

• 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

You might also like