SlideShare a Scribd company logo
1 of 13
COE-251
Introduction to Computer Systems
Fazal Hameed
Email: fhameed@aus.edu
Main Units of a computer system
4
Input
Central
Processing Unit
Control
ALU
Memory
Instr1
Instr2
Instr3
Data1
Data2
Output
Computer System
Human operator
Sensors
Other computers
Coordinates action
in CPU and
performs
processing
Monitor
Printer
Actuator
Stores instruction
and data
Examples of a computer system
• Automatic Door
• Inputs: Sensor
• Output: Motor
• Air Conditioner (AC)
• Inputs: remote, temperature sensor
• Outputs: Cooling unit
• Line tracking robot
• Tracks a line
• Inputs: Left sensor and right
• Outputs: Right and left actuator
• Missile detonation system
• Inputs: Sensor
• Output: Detonator
Examples of a computer system…
• Fuel tank
• Inputs: Pressure sensors
• Output: 8 LEDs
Pseduocode
if(count < 32)
No LED on
else if(count >= 32 && count < 64)
One LED on
else if(count >= 64 && count < 96)
Two LEDs on
else if(count >= 96 && count < 128)
Three LEDs on
Input
Pressure
sensor
Central
Processing
Unit
Output
8 LEDs
A/D
converter
8-bit
Analog Digital
else if(count >= 128 && count < 160)
Four LEDs on
else if(count >= 160 && count < 192)
Five LEDs on
else if(count >= 192 && count < 224)
Six LEDs on
else if(count >= 224 && count <245)
Seven LEDs on
else
All LEDs on
Memory
Memory Chip
m w
2m × w
CS OE WE
Address
m
Data
w
m: width of the address bus
w: width of the data bus
CS: Chip Select
OE: Output Enable
WE: Write Enable
Memory contains 2m locations
each of w bits
CS
0 1
Chip
disabled OE = 0
WE = 0
No Read/
No Write
OE = 0
WE = 1
Write operation
OE = 1
WE = 0
Read operation
OE = 1
WE = 1
Chip
enabled
Memory Access Example
Memory Chip
m = 3 w = 4
2m × w
CS OE WE
1 0 1 0
Memory contains 2m = 23 = 8
locations each of w = 4 bits
Data width = 4
000
0 0 0 1
0 0 0 0
1 0 1 1
001
010
011
1 1 1 1
100
0 0 1 1
1 0 0 0
0 0 1 1
101
110
111
m = 101 CS = 0 OE = 0 WE = 0
No read or write operation
Address
lines m
Data
lines w
m = 101 CS = 1 OE = 1 WE = 0
Read Operation at location 101
w3 w2 w1 w0
= 0 0 1 1
w3 w2 w1 w0
= 1 1 1 0
m = 111 CS = 1 OE = 0 WE = 1
Write Operation at location 111
1 1 1 0
Microprocessor (CPU) interface
Microprocessor
(CPU)
Address lines (A)
Data lines (D)
R/W*
AS (Address strobe)
Address lines : To address a particular location in memory
R/W* : To perform a read (R/W* = 1) or a write operation (R/W* = 0)
Data lines: Direction of data determined by R/W* signal
AS = 1 Microprocessor has generated a valid address
AS = 0 The address is invalid
How to connect CPU with memory
A11-A00
D07-D00
2A × D
212 × 8
Microprocessor
R/W*
AS
w = 8
m=12
2m × w
212 × 8
Memory Chip
CS OE WE
R/W* = 1/0
0/1
Inside the 8086/8088 (Registers)
• Register provides faster access compared to
memory
• In the CPU, registers store information temporarily.
– One or two bytes of data to be processed.
– The address of data.
• General-purpose registers in 8088/86 processors
can be accessed as either 16-bit or 8-bit registers
– All other registers can be accessed only
as the full 16 bits.
• In 8088/86, data types are either 8 or 16 bits
– To access 12-bit data, for example, a 16-bit register
must be used with the highest 4 bits set to 0.
Inside the 8086/8088 (Registers)
• The bits of a register are numbered in descending
order, as shown:
• The first letter of each register indicates its use.
– AX is used for the Accumulator (divided into AH/AL).
– BX is a Base addressing register.
– CX is a Counter in loop operations.
– DX points to Data in I/O operations.
Higher byte Lower Byte
General purpose registers
AX (Accumulator)
AH AL
BX (Base Register)
BH BL
CX (Used as a counter)
CH CL
DX (Used to point to data in I/O operations)
DH DL
15 8 7 0
Higher byte Lower byte
• Data Registers are normally used for storing temporary results
that will be acted upon by subsequent instructions
• Each register (AX, BX, CX, DX) is 16-bit wide.
• General purpose registers can be accessed as either 16 or 8 bits
-- AH: upper half of AX
-- AL: lower half of AX
Register addressing mode
• In register addressing mode, the operand lies in a register.
• The general form of using an immediate addressing mode is mnemonic dest,
source
• The content of dest is changed while the source content remains same
• Register can be used as a source or destination
Instruction AX (AH/AL) BX (BH/BL) CX (CH/CL) DX (DH/DL)
Initial value 0x5421 0xAB12 0x0003 0x0000
MOV AX, BX
Old value
0xAB12 0xAB12 0x0003 0x0000
ADD CX, AX 0xAB12 0xAB12 0xAB15 0x0000
Old value
MOV DH, AL 0xAB12 0xAB12 0xAB15 0x1200
New value
Old value
MOV CL, DL 0xAB12 0xAB12 0xAB00 0x1200
New value
Old value
New value New value
New value
CX = CX + AX
Immediate addressing mode
• In Immediate addressing mode, the operand is a part of instruction.
• Immediate addressing mode is used to initialize a constant to a variable (e.g., int
c = 13)
• The variable can be either stored in memory or a register
• The general form of using an immediate addressing mode is mnemonic dest,
value where value is a constant
• Destination can either be a register or a memory
Instruction AX (AH/AL) BX (BH/BL) CX (CH/CL) DX (DH/DL)
Initial value 0x0000 0x0000 0x00AF 0x0001
MOV AX, 2105H
Old value
0x2105 0x0000 0x00AF 0x0001
New value
MOV BX, 65 0x2105 0x0041 0x00AF 0x0001
Old value
New value
New value
MOV CH, 2BH 0x2105 0x0041 0x2BAF 0x0001
New value
Old value
ADD DL, C3H 0x2105 0x0041 0x2BAF 0x00C4
New value
Old value

More Related Content

Similar to Introduction to Computer System. 8085/8086 architecture

Microprocessors and microcontrollers
Microprocessors and microcontrollersMicroprocessors and microcontrollers
Microprocessors and microcontrollers
gomathy S
 
Instruction FormatMachine instruction has an opcode and zero or m.pdf
Instruction FormatMachine instruction has an opcode and zero or m.pdfInstruction FormatMachine instruction has an opcode and zero or m.pdf
Instruction FormatMachine instruction has an opcode and zero or m.pdf
pritikulkarni20
 
computer organization and assembly Regitster.ppt
computer organization and assembly Regitster.pptcomputer organization and assembly Regitster.ppt
computer organization and assembly Regitster.ppt
ssuser7b3003
 

Similar to Introduction to Computer System. 8085/8086 architecture (20)

MPMC Unit-1
MPMC Unit-1MPMC Unit-1
MPMC Unit-1
 
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMINGChapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING
 
UNIT-3.pptx
UNIT-3.pptxUNIT-3.pptx
UNIT-3.pptx
 
Logic gates and poden follow me to stream leader
Logic gates and poden follow me to stream leaderLogic gates and poden follow me to stream leader
Logic gates and poden follow me to stream leader
 
amba.ppt
amba.pptamba.ppt
amba.ppt
 
Microprocessors and microcontrollers
Microprocessors and microcontrollersMicroprocessors and microcontrollers
Microprocessors and microcontrollers
 
amba.ppt
amba.pptamba.ppt
amba.ppt
 
amba.ppt
amba.pptamba.ppt
amba.ppt
 
amba (1).ppt
amba (1).pptamba (1).ppt
amba (1).ppt
 
Instruction FormatMachine instruction has an opcode and zero or m.pdf
Instruction FormatMachine instruction has an opcode and zero or m.pdfInstruction FormatMachine instruction has an opcode and zero or m.pdf
Instruction FormatMachine instruction has an opcode and zero or m.pdf
 
Computer Architecture
Computer ArchitectureComputer Architecture
Computer Architecture
 
Architecture of 8085
Architecture of 8085Architecture of 8085
Architecture of 8085
 
Ch5_MorrisMano.pptx
Ch5_MorrisMano.pptxCh5_MorrisMano.pptx
Ch5_MorrisMano.pptx
 
microprocessor_8085_architecture.ppt
microprocessor_8085_architecture.pptmicroprocessor_8085_architecture.ppt
microprocessor_8085_architecture.ppt
 
CAAL_CCSU_U1.pdf
CAAL_CCSU_U1.pdfCAAL_CCSU_U1.pdf
CAAL_CCSU_U1.pdf
 
Blackfin Processor Core Architecture Part 2
Blackfin Processor Core Architecture Part 2Blackfin Processor Core Architecture Part 2
Blackfin Processor Core Architecture Part 2
 
Micro 2
Micro 2Micro 2
Micro 2
 
computer organization and assembly Regitster.ppt
computer organization and assembly Regitster.pptcomputer organization and assembly Regitster.ppt
computer organization and assembly Regitster.ppt
 
Lecture 11
Lecture 11Lecture 11
Lecture 11
 
8086_architecture.ppt
8086_architecture.ppt8086_architecture.ppt
8086_architecture.ppt
 

Recently uploaded

"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
mphochane1998
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
Kamal Acharya
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
jaanualu31
 

Recently uploaded (20)

Basic Electronics for diploma students as per technical education Kerala Syll...
Basic Electronics for diploma students as per technical education Kerala Syll...Basic Electronics for diploma students as per technical education Kerala Syll...
Basic Electronics for diploma students as per technical education Kerala Syll...
 
Post office management system project ..pdf
Post office management system project ..pdfPost office management system project ..pdf
Post office management system project ..pdf
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdf
 
Introduction to Artificial Intelligence ( AI)
Introduction to Artificial Intelligence ( AI)Introduction to Artificial Intelligence ( AI)
Introduction to Artificial Intelligence ( AI)
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
👉 Yavatmal Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top Class Call Girl S...
👉 Yavatmal Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top Class Call Girl S...👉 Yavatmal Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top Class Call Girl S...
👉 Yavatmal Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top Class Call Girl S...
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
 
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
 
fitting shop and tools used in fitting shop .ppt
fitting shop and tools used in fitting shop .pptfitting shop and tools used in fitting shop .ppt
fitting shop and tools used in fitting shop .ppt
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
 
Introduction to Data Visualization,Matplotlib.pdf
Introduction to Data Visualization,Matplotlib.pdfIntroduction to Data Visualization,Matplotlib.pdf
Introduction to Data Visualization,Matplotlib.pdf
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
Linux Systems Programming: Inter Process Communication (IPC) using Pipes
Linux Systems Programming: Inter Process Communication (IPC) using PipesLinux Systems Programming: Inter Process Communication (IPC) using Pipes
Linux Systems Programming: Inter Process Communication (IPC) using Pipes
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
 
Computer Graphics Introduction To Curves
Computer Graphics Introduction To CurvesComputer Graphics Introduction To Curves
Computer Graphics Introduction To Curves
 

Introduction to Computer System. 8085/8086 architecture

  • 1. COE-251 Introduction to Computer Systems Fazal Hameed Email: fhameed@aus.edu
  • 2. Main Units of a computer system 4 Input Central Processing Unit Control ALU Memory Instr1 Instr2 Instr3 Data1 Data2 Output Computer System Human operator Sensors Other computers Coordinates action in CPU and performs processing Monitor Printer Actuator Stores instruction and data
  • 3. Examples of a computer system • Automatic Door • Inputs: Sensor • Output: Motor • Air Conditioner (AC) • Inputs: remote, temperature sensor • Outputs: Cooling unit • Line tracking robot • Tracks a line • Inputs: Left sensor and right • Outputs: Right and left actuator • Missile detonation system • Inputs: Sensor • Output: Detonator
  • 4. Examples of a computer system… • Fuel tank • Inputs: Pressure sensors • Output: 8 LEDs Pseduocode if(count < 32) No LED on else if(count >= 32 && count < 64) One LED on else if(count >= 64 && count < 96) Two LEDs on else if(count >= 96 && count < 128) Three LEDs on Input Pressure sensor Central Processing Unit Output 8 LEDs A/D converter 8-bit Analog Digital else if(count >= 128 && count < 160) Four LEDs on else if(count >= 160 && count < 192) Five LEDs on else if(count >= 192 && count < 224) Six LEDs on else if(count >= 224 && count <245) Seven LEDs on else All LEDs on
  • 5. Memory Memory Chip m w 2m × w CS OE WE Address m Data w m: width of the address bus w: width of the data bus CS: Chip Select OE: Output Enable WE: Write Enable Memory contains 2m locations each of w bits CS 0 1 Chip disabled OE = 0 WE = 0 No Read/ No Write OE = 0 WE = 1 Write operation OE = 1 WE = 0 Read operation OE = 1 WE = 1 Chip enabled
  • 6. Memory Access Example Memory Chip m = 3 w = 4 2m × w CS OE WE 1 0 1 0 Memory contains 2m = 23 = 8 locations each of w = 4 bits Data width = 4 000 0 0 0 1 0 0 0 0 1 0 1 1 001 010 011 1 1 1 1 100 0 0 1 1 1 0 0 0 0 0 1 1 101 110 111 m = 101 CS = 0 OE = 0 WE = 0 No read or write operation Address lines m Data lines w m = 101 CS = 1 OE = 1 WE = 0 Read Operation at location 101 w3 w2 w1 w0 = 0 0 1 1 w3 w2 w1 w0 = 1 1 1 0 m = 111 CS = 1 OE = 0 WE = 1 Write Operation at location 111 1 1 1 0
  • 7. Microprocessor (CPU) interface Microprocessor (CPU) Address lines (A) Data lines (D) R/W* AS (Address strobe) Address lines : To address a particular location in memory R/W* : To perform a read (R/W* = 1) or a write operation (R/W* = 0) Data lines: Direction of data determined by R/W* signal AS = 1 Microprocessor has generated a valid address AS = 0 The address is invalid
  • 8. How to connect CPU with memory A11-A00 D07-D00 2A × D 212 × 8 Microprocessor R/W* AS w = 8 m=12 2m × w 212 × 8 Memory Chip CS OE WE R/W* = 1/0 0/1
  • 9. Inside the 8086/8088 (Registers) • Register provides faster access compared to memory • In the CPU, registers store information temporarily. – One or two bytes of data to be processed. – The address of data. • General-purpose registers in 8088/86 processors can be accessed as either 16-bit or 8-bit registers – All other registers can be accessed only as the full 16 bits. • In 8088/86, data types are either 8 or 16 bits – To access 12-bit data, for example, a 16-bit register must be used with the highest 4 bits set to 0.
  • 10. Inside the 8086/8088 (Registers) • The bits of a register are numbered in descending order, as shown: • The first letter of each register indicates its use. – AX is used for the Accumulator (divided into AH/AL). – BX is a Base addressing register. – CX is a Counter in loop operations. – DX points to Data in I/O operations. Higher byte Lower Byte
  • 11. General purpose registers AX (Accumulator) AH AL BX (Base Register) BH BL CX (Used as a counter) CH CL DX (Used to point to data in I/O operations) DH DL 15 8 7 0 Higher byte Lower byte • Data Registers are normally used for storing temporary results that will be acted upon by subsequent instructions • Each register (AX, BX, CX, DX) is 16-bit wide. • General purpose registers can be accessed as either 16 or 8 bits -- AH: upper half of AX -- AL: lower half of AX
  • 12. Register addressing mode • In register addressing mode, the operand lies in a register. • The general form of using an immediate addressing mode is mnemonic dest, source • The content of dest is changed while the source content remains same • Register can be used as a source or destination Instruction AX (AH/AL) BX (BH/BL) CX (CH/CL) DX (DH/DL) Initial value 0x5421 0xAB12 0x0003 0x0000 MOV AX, BX Old value 0xAB12 0xAB12 0x0003 0x0000 ADD CX, AX 0xAB12 0xAB12 0xAB15 0x0000 Old value MOV DH, AL 0xAB12 0xAB12 0xAB15 0x1200 New value Old value MOV CL, DL 0xAB12 0xAB12 0xAB00 0x1200 New value Old value New value New value New value CX = CX + AX
  • 13. Immediate addressing mode • In Immediate addressing mode, the operand is a part of instruction. • Immediate addressing mode is used to initialize a constant to a variable (e.g., int c = 13) • The variable can be either stored in memory or a register • The general form of using an immediate addressing mode is mnemonic dest, value where value is a constant • Destination can either be a register or a memory Instruction AX (AH/AL) BX (BH/BL) CX (CH/CL) DX (DH/DL) Initial value 0x0000 0x0000 0x00AF 0x0001 MOV AX, 2105H Old value 0x2105 0x0000 0x00AF 0x0001 New value MOV BX, 65 0x2105 0x0041 0x00AF 0x0001 Old value New value New value MOV CH, 2BH 0x2105 0x0041 0x2BAF 0x0001 New value Old value ADD DL, C3H 0x2105 0x0041 0x2BAF 0x00C4 New value Old value