Lecture 1

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

Computer Organization and

Assembly Language

1
Title of the Course Computer Organization and Assembly Language

Credit Hours 3

Course Code CSC-415

Course Outline:

Microprocessor Bus Structure: Addressing, Data and Control, Memory Organization and Structure (Segmented and Linear Models),
Introduction to Registers and Flags, Data Movement, Arithmetic and Logic, Programme Control, Subroutines, Stack and Its
Operation, Peripheral Control Interrupts, Interfacing with High Level Languages, Real-Time Application. Objectives and
Perspectives of Assembly Language, Addressing Modes, Introduction to The Assembler and Debugger, Manipulate and Translate
Machine and Assembly Code, Describe Actions Inside The Processing Chip, Discuss Operations Performed By An Instruction Set,
Write A Fully Documented Program, Using An Assembler Of Choice.

Recommended Books:

1. Stallings, "Computer Organization & Architecture", 7th ed, Prentice HALL, 2006.
2. Irvine, Assembly Language for Intel-based Computers, 5th ed, Prentice Hall, 2007.

2
Lecturer # 1
Basic Concepts

3
Basic Computer Organization

Address Bus
ALU

I/O Data Bus Memory

CU Control Bus

4
What is a Microprocessor?
The microprocessor is the central unit of a computer system that
performs arithmetic and logic operations, which generally include
adding, subtracting, transferring numbers from one area to another,
and comparing two numbers. It's often known simply as a processor, a
central processing unit, or as a logic chip. It's essentially the engine or
the brain of the computer that goes into motion when the computer is
switched on. It's a prog rammable, multipurpose device that
incorporates the functions of a CPU (central processing unit) on a
single IC (integrated circuit).
5
How Does a Microprocessor Work?

A microprocessor accepts binary data as input, processes that data, and


then provides output based on the instructions stored in the memory. The
data is processed using the microprocessor's ALU (arithmetical and logical
unit), control unit, and a register array. The register array processes the
data via a number of registers that act as temporary fast access memory
locations. The flow of instructions and data through the system is
managed by the control unit.

6
Benefits of a Microprocessor
Computer systems aren't the only devices that use microprocessors. Everything from smartphones to
household appliances to cars use microprocessors these days. Here are a few reasons why
microprocessors are so widely used:

• They don't cost a lot - Due to their use of IC (integrated circuit) technology,
microprocessors don't cost much to produce. This means that the use of
microprocessors can greatly reduce the cost of the system it's used in.

• They are fast - The technology used to produce modern microprocessors has
allowed them to operate at incredibly high speeds--today's microprocessors can
execute millions of instructions per second.

7
Benefits of a Microprocessor (Continued)
• They consume little power - Power consumption is much lower than other types of
processors since microprocessors are manufactured using metal oxide semiconductor
technology. This makes devices equipped with microprocessors much more energy efficient.

• They are portable - Due to how small microprocessors are and that they don't consume a
lot of power, devices using microprocessors can be designed to be portable (like
smartphones).

• They are reliable - Because semiconductor technology is used in the production of


microprocessors, their failure rate is extremely low.

• They are versatile - The same microprocessor chip can be used for numerous applications
as long as the programming is changed, making it incredibly versatile.
8
Common Terms Used
When it comes to discussing microprocessors, the following are some common
terms related to microprocessors:

• Word Length
Word length refers to the number of bits in the processor's internal data bus or the number of bits that a
processor can process at any given time. For example, an 8-bit processor will have 8-bit registers, an 8-bit
data bus, and will perform 8-bit processing at a time.
• Instruction Set
The instruction set is the series of commands that a microprocessor can understand. Essentially, it's the
interface between the hardware and the software.
• Cache Memory
The cache memory is used to store data or instructions that the software or program frequently
references during operation. Basically, it helps to increase the operation's overall speed by allowing the
processor to access data more quickly than from a regular RAM.
9
Common Terms Used (Continued)
• Clock Speed
The clock speed is the speed at which a microprocessor is able to execute instructions.
It's typically measured in Hertz and expressed in measurements like MHz (megahertz)
and GHz (gigahertz).
• Bus
A bus is the term used to describe the set of conductors that transmit data or that
address or control information to the microprocessor's different elements. Most
microprocessors consist of three different buses, which include the data bus, the
address bus, and the control bus.
10
Microprocessor Bus Structure:

• Address bus
• Data Bus
• Control bus

11
Address Bus

• It is a group of conducting wires which carries address only. Address bus is unidirectional
because data flow in one direction, from microprocessor to memory or from
microprocessor to Input/output devices (That is, Out of Microprocessor).
• An address bus is a group of 16 lines generally called as A0 – A15 to carry a 16-bit address
of memory location.
• In a computer system, each peripheral or memory location is identified by a binary number
called an address. This is similar to the postal address of a house.
• The address bus is unidirectional, that means bit flow in only one direction from MPU to
the peripheral.
• MPU carries 16-bit address i.e. 216 = 65,536 or 64K memory locations.
12
Address Bus (Continued)
• Length of Address Bus of 8085 microprocessor is 16 Bit (That is, Four
Hexadecimal Digits), ranging from 0000 H to FFFF H, (H denotes Hexadecimal).
The microprocessor 8085 can transfer maximum 16 bit address which means it can
address 65, 536 different memory location.
• The Length of the address bus determines the amount of memory a system can
address. Such as a system with a 32-bit address bus can address 2^32 memory
locations. If each memory location holds one byte, the addressable memory space is
4 GB. However, the actual amount of memory that can be accessed is usually much
less than this theoretical limit due to chipset and motherboard limitations.

13
Data Bus

A data bus is a group of eight bidirectional lines used for data flow in both the
directions between MPH and peripheral devices.
The 8 data lines are manipulating 8-bit data ranging from 00 to FF i.e.
(28 = 256) numbers from 0000 0000 -1111 1111.
This 8 bit data is called as word length and the register size of a microprocessor and
MPH is called 8–bit microprocessor.

14
Data Bus (Continued)
• It is a group of conducting wires which carries Data only. Data bus is bidirectional because
data flow in both directions, from microprocessor to memory or Input/Output devices and
from memory or Input/Output devices to microprocessor. Length of Data Bus of 8085
microprocessor is 8 Bit (That is, two Hexadecimal Digits), ranging from 00 H to FF H. (H
denotes Hexadecimal).
• When it is write operation, the processor will put the data (to be written) on the data bus,
when it is read operation, the memory controller will get the data from specific memory
block and put it into the data bus.
• The width of the data bus is directly related to the largest number that the bus can carry,
such as an 8 bit bus can represent 2 to the power of 8 unique values, this equates to the
number 0 to 255.A 16 bit bus can carry 0 to 65535.

15
Control Bus

The control bus is having various single lines used for sending control signals in the
form of the pulse to the memory and I/O devices.
The MPU generates specific control signals to perform a particular operation.
Some of these control signals are memory read, memory write, I/O read and I/O
write

16
Control Bus (Continued)
It is a group of conducting wires, which is used to generate timing and control signals to
control all the associated peripherals, microprocessor uses control bus to process data, that is
what to do with selected memory location. Some control signals are:
Memory read
Memory write
I/O read
I/O Write
If one line of control bus may be the read/write line.If the wire is low (no electricity flowing)
then the memory is read, if the wire is high (electricity is flowing) then the memory is written.

17

You might also like