SlideShare a Scribd company logo
1 of 41
CSC 222: Computer Organization 
& Assembly Language 
4 – Register & Memory 
Instructor: Ms. Nausheen Majeed
Outline 
 The Components of Microcomputer System 
 The CPU 
 Registers 
 Memory 
 Types: RAM, ROM, Cache 
 Memory Organization & Segmentation 
 System Bus 
 Data, Address & Control 
2
References 
 Chapter 1, Ytha Yu and Charles Marut, “Assembly Language 
3 
Programming and Organization of IBM PC” 
 Chapter 3, William Stallings, “Computer Organization & Architecture” 
 Chapter 2, Subrata Ghoshal, “Computer Organization & 
Architecture”
The CPU
CPU 
 Brain of Computer; controls all operations 
5 
 Uses Memory Circuits to store information 
 Uses I/O Circuits to communicate with I/O Devices 
 Executes programs stored in memory 
 System programs 
 Application programs 
 Instruction Set: Instructions performed by CPU 
 Two main components: 
 Execution Unit (EU) 
 Bus Interface Unit (BIU)
Execution Unit (EU) 
 Purpose: Execute instructions 
 Contains ALU (Arithmetic & Logic Unit) 
6 
 To perform arithmetic (+, -, x,/) and logic (AND, OR, NOT) 
operations. 
 The data for the operations are stored in circuits called 
Registers. 
 A register is like a memory location except that it is 
referred by a name not a number (address). 
 EU uses registers for: 
 Storing data. 
 Holding operands for ALU 
 To reflect result of a computation – FLAG register
Bus Interface Unit (BIU) 
 Facilitates communication between the EU and the 
memory or I/O circuits. 
 Responsible for transmitting address, data and control 
signals on the buses. 
7
Internal Bus 
 The EU and BIU are connected by an internal bus and 
they work together. 
 While EU is executing, the BIU fetches up to six bytes of 
the next instruction and places them in the instruction 
queue. 
8 
 Instruction Pre-fetch 
 Purpose: Speed up the processor 
 If the EU needs to communicate with memory or the 
peripherals, the BIU suspends instruction pre-fetch and 
performs the needed operations.
9 Intel 8086 Microprocessor Organization
Registers
Registers 
 Registers are high-speed storage locations inside the 
microprocessor. 
 Designed to be accessed at much higher speed than 
conventional memory. 
 Registers are classified according to the functions they 
perform. 
 General Types of Registers: 
 Data Registers: To hold data for an operation. 
 Address Registers: To hold the address of an instruction or data. 
 Status/Flag Register: keeps the current status of the processor or 
result of an arithmetic operation. 
11
8086 Internal registers 16 bits (2 bytes each) 
12 
AX, BX, CX and DX are two 
bytes wide and each byte can 
be accessed separately 
These registers are used as 
memory pointers. 
6 status; 3 control ; 7 unused 
Segment registers are used 
as base address for a segment
General Purpose/Data Registers 
 Following four registers are available to the programmer for 
general data manipulation: 
 AX (Accumulator): Used in arithmetic, logic and data transfer 
instructions. Also required in multiplication, division and 
input/output operations. 
 BX (Base): It can hold a memory address that points to a variable. 
 CX (Counter): Act as a counter for repeating or looping 
instructions. These instructions automatically repeat and 
decrement CX and quit when equals to 0. 
 DX (Data): It has a special role in multiply and divide operations. 
Also used in input/output operations. 
13
Segment Registers 
 Store addresses of instruction and data in memory. 
 These values are used by the processor to access memory 
locations. 
 CS (Code): Defines the starting address of the section of memory 
holding code. 
 DS (Data): Defines the section of memory that holds most of the 
data used by programs. 
 ES (Extra): This is an additional data segment that is used by 
some of the string instructions. 
 SS (Stack): It defines the area of the memory used for stack 
14
Pointers and Index Registers 
 These can be accessed only as 16 bit registers. 
 IP - instruction pointer: Always points to next instruction to be 
executed. IP register always works together with CS segment 
register and it points to currently executing instruction. 
 SI - source index register: Can be used for pointer addressing of 
data. Offset address relative to DS 
 DI - destination index register: Can be used for pointer 
addressing of data . Offset address relative to ES 
 SI and DI used in string movement instructions. 
 SP and BP are used to access data inside the stack segment 
 BP - base pointer: Primarily used to access parameters passed 
via the stack. Offset address relative to SS 
 SP – stack pointer: Always points to top item on the stack. Offset 
address relative to SS 
15
80386 Extended Registers 
 The 80386/80486 processor contain 32-bit registers 
which greatly improve the efficiency of program that take 
advantage of them. 
 EAX, EBX, ECX, EDX, 
 EFLAGS 
 EIP 
 EBP, ESP, ESI, EDI. 
16
Memory
Bits, Bytes and Double words 
byte byte 
0 0 1 0 0 1 1 0 0 1 1 0 1 0 1 0 word 
 Each 1 or 0 is called a bit. 
 Group of 4 bits = Nibble 
 Group of 8 bits = Byte 
 Group of 16 bits = Word 
 Group of 32 bits = Double words 
18
Common Prefixes 
19
Memory 
 Information processed by the computer is stored in its 
memory. 
 Program 
 Data 
 Not all accumulated information is needed by the CPU at 
the same time 
 Therefore, it is more economical to use low-cost storage 
devices to serve as a backup for storing the information that is 
not currently used by CPU 
 Memory Operations: 
 Read (Fetch contents of a location) 
 Write (Store data at a location) 
20
Memory Hierarchy 
21
Contd.. 
 The memory unit that directly communicate with CPU is 
called the main memory 
 Devices that provide backup storage are called auxiliary 
memory 
 The main memory occupies a central position by being 
able to communicate directly with the CPU and with 
auxiliary memory devices through an I/O processor 
 A special very-high-speed memory called cache is used 
to increase the speed of processing by making current 
programs and data available to the CPU at a rapid rate 
22
Contd.. 
23
Main Memory 
 Most of the main memory in a general purpose computer 
is made up of RAM integrated circuits chips, but a portion 
of the memory may be constructed with ROM chips 
 Memory Circuits: 
 RAM 
24 
 Program Data and Instructions 
 Read and Write 
 ROM 
 Used for storing an initial program called bootstrap loader, 
which is required to start the computer software operating when 
power is turned off. 
 Only Read
Cache 
 A special very-high-speed memory called cache is used 
to increase the speed of processing by making current 
programs and data available to the CPU at a rapid rate. 
 To reduce memory access time thus program execution 
time. 
25
Memory Organization 
 Memory is organized into a collection of bytes. 
 Each byte is identified by a number – Address 
 Number of bits in an address depends on the processor 
 Example:- Intel 8086: 20-bit address, Intel 80286: 24-bit 
address 
 Data stored in a memory byte – Contents 
26
Contd.. 
 Number of bits used in the address determines the 
number of bytes that can be accessed by the processor. 
 Example: If processor uses 20-bit address, it can access 
220 = 1048576 bytes = 1 MB of memory 
 Question: If processor uses 24-bit address, how many 
bytes of memory can be accessed? 
27
Memory Segments 
 A memory segment is a block of 216 (or 64 K) 
consecutive memory bytes. 
 Each segment has a number. 
 Within a segment, memory location is specified by 
an offset. This is the number of bytes from the 
beginning of the segment. 
28
29 
F0000 
E0000 
D0000 
C0000 
B0000 
A0000 
90000 
80000 
70000 
60000 
50000 
40000 
30000 
20000 
10000 
00000 
One Segment 
8000:FFFF 
8000:0000 
segment of fset
Segment : Offset Address 
 Logical Address = Segment : Offset 
 16-bit segment, 16-bit offset 
 Physical Address = Segment * 10h + Offset 
 20-bit address 
 Example: 
Logical Address = A4FB:4872 
Physical Address = A4FB0h + 4872h = 0A9822h 
30
Exercise 
A memory location has a physical address 4A37Bh. 
Compute: 
a. The offset address if the segment number is 40FFh. 
b. The segment number if the offset address is 123Bh. 
31
Program Segments 
 A typical machine language program is loaded into 
following different memory segments: 
 Code Segment 
 Data Segment 
 Stack Segment 
 Stack is a data structure used by processor to 
implement procedure calls. 
32
System Bus
What is a Bus? 
 A communication pathway connecting two or more 
devices 
 Often grouped 
 A number of channels in one bus 
 e.g. 32 bit data bus is 32 separate single bit channels 
34 
Address Bus 
CPU Memory I/O 
Control Bus 
Data Bus
Data Bus 
 Carries data 
 Remember that there is no difference between “data” 
and “instruction” at this level 
 Width is a key determinant of performance 
 8, 16, 32, 64 bit 
35
Address bus 
 Identify the source or destination of data 
 e.g. CPU needs to read an instruction (data) from a given 
location in memory 
 Bus width determines maximum memory capacity of 
system 
 e.g. 8080 has 16 bit address bus giving 64k address space 
36
Control Bus 
 Control and timing information 
 Memory read/write signal 
 Interrupt request 
 Clock signals 
37
Types of Transfer 
 Memory to Processor 
 Processor to Memory 
 I/O to Processor 
 Processor to I/O 
 I/O to and from Memory 
38
Interconnection Structure 
 Memory 
 N words of equal length, each word having a unique 
address 
 Unit of Transfer (read/Write): Word 
 Operation: Read/Write indicated by Control Signal 
 Location of operation specified by an address 
 I/O Module 
 Two operations: read and write 
 May control other external devices 
 Port: interface between I/O module and device 
 Able to send interrupt signal to CPU 
39
Contd.. 
 CPU 
 Reads in instruction and data 
 Writes out data 
 Uses control signal to control all operations 
 Receives interrupt signal 
40
41 
Address 
Data Read 
Data Write 
Interrupt Signals

More Related Content

What's hot

General register organization (computer organization)
General register organization  (computer organization)General register organization  (computer organization)
General register organization (computer organization)rishi ram khanal
 
Computer architecture input output organization
Computer architecture input output organizationComputer architecture input output organization
Computer architecture input output organizationMazin Alwaaly
 
Computer architecture cache memory
Computer architecture cache memoryComputer architecture cache memory
Computer architecture cache memoryMazin Alwaaly
 
Input Output - Computer Architecture
Input Output - Computer ArchitectureInput Output - Computer Architecture
Input Output - Computer ArchitectureMaruf Abdullah (Rion)
 
Memory management ppt coa
Memory management ppt coaMemory management ppt coa
Memory management ppt coaBharti Khemani
 
Ram and-rom-chips
Ram and-rom-chipsRam and-rom-chips
Ram and-rom-chipsAnuj Modi
 
top level view of computer function and interconnection
top level view of computer function and interconnectiontop level view of computer function and interconnection
top level view of computer function and interconnectionSajid Marwat
 
Types of instructions
Types of instructionsTypes of instructions
Types of instructionsihsanjamil
 
8086 architecture and pin description
8086 architecture and pin description 8086 architecture and pin description
8086 architecture and pin description Aswini Dharmaraj
 
Register transfer and micro-operation
Register transfer and micro-operationRegister transfer and micro-operation
Register transfer and micro-operationNikhil Pandit
 
Processor Organization and Architecture
Processor Organization and ArchitectureProcessor Organization and Architecture
Processor Organization and ArchitectureVinit Raut
 
Cache memory ppt
Cache memory ppt  Cache memory ppt
Cache memory ppt Arpita Naik
 
Associative memory 14208
Associative memory 14208Associative memory 14208
Associative memory 14208Ameer Mehmood
 

What's hot (20)

Input output interface
Input output interfaceInput output interface
Input output interface
 
General register organization (computer organization)
General register organization  (computer organization)General register organization  (computer organization)
General register organization (computer organization)
 
Computer architecture input output organization
Computer architecture input output organizationComputer architecture input output organization
Computer architecture input output organization
 
Computer architecture cache memory
Computer architecture cache memoryComputer architecture cache memory
Computer architecture cache memory
 
Input Output - Computer Architecture
Input Output - Computer ArchitectureInput Output - Computer Architecture
Input Output - Computer Architecture
 
Interrupts
InterruptsInterrupts
Interrupts
 
Memory management
Memory managementMemory management
Memory management
 
Basic Computer Organization and Design
Basic  Computer  Organization  and  DesignBasic  Computer  Organization  and  Design
Basic Computer Organization and Design
 
Memory management ppt coa
Memory management ppt coaMemory management ppt coa
Memory management ppt coa
 
Ram and-rom-chips
Ram and-rom-chipsRam and-rom-chips
Ram and-rom-chips
 
Registers
RegistersRegisters
Registers
 
top level view of computer function and interconnection
top level view of computer function and interconnectiontop level view of computer function and interconnection
top level view of computer function and interconnection
 
Types of instructions
Types of instructionsTypes of instructions
Types of instructions
 
8086 architecture and pin description
8086 architecture and pin description 8086 architecture and pin description
8086 architecture and pin description
 
Computer arithmetic
Computer arithmeticComputer arithmetic
Computer arithmetic
 
Register transfer and micro-operation
Register transfer and micro-operationRegister transfer and micro-operation
Register transfer and micro-operation
 
Interrupts
InterruptsInterrupts
Interrupts
 
Processor Organization and Architecture
Processor Organization and ArchitectureProcessor Organization and Architecture
Processor Organization and Architecture
 
Cache memory ppt
Cache memory ppt  Cache memory ppt
Cache memory ppt
 
Associative memory 14208
Associative memory 14208Associative memory 14208
Associative memory 14208
 

Similar to Register & Memory

Pai unit 1_l1-l2-l3-l4_upload
Pai unit 1_l1-l2-l3-l4_uploadPai unit 1_l1-l2-l3-l4_upload
Pai unit 1_l1-l2-l3-l4_uploadYogesh Deshpande
 
Architecture OF 8085
Architecture OF 8085Architecture OF 8085
Architecture OF 8085muneer.k
 
8085 microprocessor
8085 microprocessor8085 microprocessor
8085 microprocessorgohanraw
 
Data Manipulation
Data ManipulationData Manipulation
Data ManipulationAsfi Bhai
 
8086_architecture MMC PPT.ppt
8086_architecture MMC PPT.ppt8086_architecture MMC PPT.ppt
8086_architecture MMC PPT.pptJamesAlpha3
 
Computer architecture instruction formats
Computer architecture instruction formatsComputer architecture instruction formats
Computer architecture instruction formatsMazin Alwaaly
 
Bindura university of science education
Bindura university of science educationBindura university of science education
Bindura university of science educationInnocent Tauzeni
 
microprocessor_part_3_compressed_1588259301.pdf
microprocessor_part_3_compressed_1588259301.pdfmicroprocessor_part_3_compressed_1588259301.pdf
microprocessor_part_3_compressed_1588259301.pdfssuserd21262
 
Intel 8086 microprocessor
Intel 8086 microprocessorIntel 8086 microprocessor
Intel 8086 microprocessorRavi Yasas
 
Microprocessor note
Microprocessor noteMicroprocessor note
Microprocessor notealokbhatta
 
The primary purpose of memory interfacing is to facilitate the transfer of da...
The primary purpose of memory interfacing is to facilitate the transfer of da...The primary purpose of memory interfacing is to facilitate the transfer of da...
The primary purpose of memory interfacing is to facilitate the transfer of da...Sindhu Mani
 

Similar to Register & Memory (20)

Microprocessor
MicroprocessorMicroprocessor
Microprocessor
 
Advanced micro -processor
Advanced micro -processorAdvanced micro -processor
Advanced micro -processor
 
Pai unit 1_l1-l2-l3-l4_upload
Pai unit 1_l1-l2-l3-l4_uploadPai unit 1_l1-l2-l3-l4_upload
Pai unit 1_l1-l2-l3-l4_upload
 
Architecture OF 8085
Architecture OF 8085Architecture OF 8085
Architecture OF 8085
 
8085 microprocessor
8085 microprocessor8085 microprocessor
8085 microprocessor
 
8085
80858085
8085
 
8085
80858085
8085
 
8085
80858085
8085
 
Data Manipulation
Data ManipulationData Manipulation
Data Manipulation
 
Module 1 8086
Module 1 8086Module 1 8086
Module 1 8086
 
8086_architecture MMC PPT.ppt
8086_architecture MMC PPT.ppt8086_architecture MMC PPT.ppt
8086_architecture MMC PPT.ppt
 
8085 archi
8085 archi8085 archi
8085 archi
 
Computer architecture instruction formats
Computer architecture instruction formatsComputer architecture instruction formats
Computer architecture instruction formats
 
Bindura university of science education
Bindura university of science educationBindura university of science education
Bindura university of science education
 
microprocessor_part_3_compressed_1588259301.pdf
microprocessor_part_3_compressed_1588259301.pdfmicroprocessor_part_3_compressed_1588259301.pdf
microprocessor_part_3_compressed_1588259301.pdf
 
U I - 4. 80386 Real mode.pptx
U I - 4. 80386 Real mode.pptxU I - 4. 80386 Real mode.pptx
U I - 4. 80386 Real mode.pptx
 
intel 8086 introduction
intel 8086 introductionintel 8086 introduction
intel 8086 introduction
 
Intel 8086 microprocessor
Intel 8086 microprocessorIntel 8086 microprocessor
Intel 8086 microprocessor
 
Microprocessor note
Microprocessor noteMicroprocessor note
Microprocessor note
 
The primary purpose of memory interfacing is to facilitate the transfer of da...
The primary purpose of memory interfacing is to facilitate the transfer of da...The primary purpose of memory interfacing is to facilitate the transfer of da...
The primary purpose of memory interfacing is to facilitate the transfer of da...
 

More from Education Front

More from Education Front (20)

Improving Pronunciation
Improving PronunciationImproving Pronunciation
Improving Pronunciation
 
Generic Software Process Models
Generic Software Process ModelsGeneric Software Process Models
Generic Software Process Models
 
2- Dimensional Arrays
2- Dimensional Arrays2- Dimensional Arrays
2- Dimensional Arrays
 
Problem Sloving
Problem SlovingProblem Sloving
Problem Sloving
 
Problem Solving - 1
Problem Solving - 1Problem Solving - 1
Problem Solving - 1
 
Introduction To Stack
Introduction To StackIntroduction To Stack
Introduction To Stack
 
Process Models
Process ModelsProcess Models
Process Models
 
Process Models
Process ModelsProcess Models
Process Models
 
Data Representation
Data RepresentationData Representation
Data Representation
 
Introduction to Algorithm
Introduction to AlgorithmIntroduction to Algorithm
Introduction to Algorithm
 
Revised Process of Communication
Revised Process of CommunicationRevised Process of Communication
Revised Process of Communication
 
Importance of Language in Communication
Importance of Language in CommunicationImportance of Language in Communication
Importance of Language in Communication
 
Lecture1 (SE Introduction)
Lecture1 (SE Introduction)Lecture1 (SE Introduction)
Lecture1 (SE Introduction)
 
Lecture 2 (Software Processes)
Lecture 2 (Software Processes)Lecture 2 (Software Processes)
Lecture 2 (Software Processes)
 
Introduction to data structure
Introduction to data structureIntroduction to data structure
Introduction to data structure
 
Facing Today’s Communication Challenges
Facing Today’s Communication ChallengesFacing Today’s Communication Challenges
Facing Today’s Communication Challenges
 
Processor Basics
Processor BasicsProcessor Basics
Processor Basics
 
Data Representation
Data RepresentationData Representation
Data Representation
 
Computer Evolution
Computer EvolutionComputer Evolution
Computer Evolution
 
Assembly Language Basics
Assembly Language BasicsAssembly Language Basics
Assembly Language Basics
 

Recently uploaded

Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptSAURABHKUMAR892774
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...Chandu841456
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvLewisJB
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)dollysharma2066
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
EduAI - E learning Platform integrated with AI
EduAI - E learning Platform integrated with AIEduAI - E learning Platform integrated with AI
EduAI - E learning Platform integrated with AIkoyaldeepu123
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 
DATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage exampleDATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage examplePragyanshuParadkar1
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfme23b1001
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
pipeline in computer architecture design
pipeline in computer architecture  designpipeline in computer architecture  design
pipeline in computer architecture designssuser87fa0c1
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 

Recently uploaded (20)

Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.ppt
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvv
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
EduAI - E learning Platform integrated with AI
EduAI - E learning Platform integrated with AIEduAI - E learning Platform integrated with AI
EduAI - E learning Platform integrated with AI
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 
DATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage exampleDATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage example
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdf
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
pipeline in computer architecture design
pipeline in computer architecture  designpipeline in computer architecture  design
pipeline in computer architecture design
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 

Register & Memory

  • 1. CSC 222: Computer Organization & Assembly Language 4 – Register & Memory Instructor: Ms. Nausheen Majeed
  • 2. Outline  The Components of Microcomputer System  The CPU  Registers  Memory  Types: RAM, ROM, Cache  Memory Organization & Segmentation  System Bus  Data, Address & Control 2
  • 3. References  Chapter 1, Ytha Yu and Charles Marut, “Assembly Language 3 Programming and Organization of IBM PC”  Chapter 3, William Stallings, “Computer Organization & Architecture”  Chapter 2, Subrata Ghoshal, “Computer Organization & Architecture”
  • 5. CPU  Brain of Computer; controls all operations 5  Uses Memory Circuits to store information  Uses I/O Circuits to communicate with I/O Devices  Executes programs stored in memory  System programs  Application programs  Instruction Set: Instructions performed by CPU  Two main components:  Execution Unit (EU)  Bus Interface Unit (BIU)
  • 6. Execution Unit (EU)  Purpose: Execute instructions  Contains ALU (Arithmetic & Logic Unit) 6  To perform arithmetic (+, -, x,/) and logic (AND, OR, NOT) operations.  The data for the operations are stored in circuits called Registers.  A register is like a memory location except that it is referred by a name not a number (address).  EU uses registers for:  Storing data.  Holding operands for ALU  To reflect result of a computation – FLAG register
  • 7. Bus Interface Unit (BIU)  Facilitates communication between the EU and the memory or I/O circuits.  Responsible for transmitting address, data and control signals on the buses. 7
  • 8. Internal Bus  The EU and BIU are connected by an internal bus and they work together.  While EU is executing, the BIU fetches up to six bytes of the next instruction and places them in the instruction queue. 8  Instruction Pre-fetch  Purpose: Speed up the processor  If the EU needs to communicate with memory or the peripherals, the BIU suspends instruction pre-fetch and performs the needed operations.
  • 9. 9 Intel 8086 Microprocessor Organization
  • 11. Registers  Registers are high-speed storage locations inside the microprocessor.  Designed to be accessed at much higher speed than conventional memory.  Registers are classified according to the functions they perform.  General Types of Registers:  Data Registers: To hold data for an operation.  Address Registers: To hold the address of an instruction or data.  Status/Flag Register: keeps the current status of the processor or result of an arithmetic operation. 11
  • 12. 8086 Internal registers 16 bits (2 bytes each) 12 AX, BX, CX and DX are two bytes wide and each byte can be accessed separately These registers are used as memory pointers. 6 status; 3 control ; 7 unused Segment registers are used as base address for a segment
  • 13. General Purpose/Data Registers  Following four registers are available to the programmer for general data manipulation:  AX (Accumulator): Used in arithmetic, logic and data transfer instructions. Also required in multiplication, division and input/output operations.  BX (Base): It can hold a memory address that points to a variable.  CX (Counter): Act as a counter for repeating or looping instructions. These instructions automatically repeat and decrement CX and quit when equals to 0.  DX (Data): It has a special role in multiply and divide operations. Also used in input/output operations. 13
  • 14. Segment Registers  Store addresses of instruction and data in memory.  These values are used by the processor to access memory locations.  CS (Code): Defines the starting address of the section of memory holding code.  DS (Data): Defines the section of memory that holds most of the data used by programs.  ES (Extra): This is an additional data segment that is used by some of the string instructions.  SS (Stack): It defines the area of the memory used for stack 14
  • 15. Pointers and Index Registers  These can be accessed only as 16 bit registers.  IP - instruction pointer: Always points to next instruction to be executed. IP register always works together with CS segment register and it points to currently executing instruction.  SI - source index register: Can be used for pointer addressing of data. Offset address relative to DS  DI - destination index register: Can be used for pointer addressing of data . Offset address relative to ES  SI and DI used in string movement instructions.  SP and BP are used to access data inside the stack segment  BP - base pointer: Primarily used to access parameters passed via the stack. Offset address relative to SS  SP – stack pointer: Always points to top item on the stack. Offset address relative to SS 15
  • 16. 80386 Extended Registers  The 80386/80486 processor contain 32-bit registers which greatly improve the efficiency of program that take advantage of them.  EAX, EBX, ECX, EDX,  EFLAGS  EIP  EBP, ESP, ESI, EDI. 16
  • 18. Bits, Bytes and Double words byte byte 0 0 1 0 0 1 1 0 0 1 1 0 1 0 1 0 word  Each 1 or 0 is called a bit.  Group of 4 bits = Nibble  Group of 8 bits = Byte  Group of 16 bits = Word  Group of 32 bits = Double words 18
  • 20. Memory  Information processed by the computer is stored in its memory.  Program  Data  Not all accumulated information is needed by the CPU at the same time  Therefore, it is more economical to use low-cost storage devices to serve as a backup for storing the information that is not currently used by CPU  Memory Operations:  Read (Fetch contents of a location)  Write (Store data at a location) 20
  • 22. Contd..  The memory unit that directly communicate with CPU is called the main memory  Devices that provide backup storage are called auxiliary memory  The main memory occupies a central position by being able to communicate directly with the CPU and with auxiliary memory devices through an I/O processor  A special very-high-speed memory called cache is used to increase the speed of processing by making current programs and data available to the CPU at a rapid rate 22
  • 24. Main Memory  Most of the main memory in a general purpose computer is made up of RAM integrated circuits chips, but a portion of the memory may be constructed with ROM chips  Memory Circuits:  RAM 24  Program Data and Instructions  Read and Write  ROM  Used for storing an initial program called bootstrap loader, which is required to start the computer software operating when power is turned off.  Only Read
  • 25. Cache  A special very-high-speed memory called cache is used to increase the speed of processing by making current programs and data available to the CPU at a rapid rate.  To reduce memory access time thus program execution time. 25
  • 26. Memory Organization  Memory is organized into a collection of bytes.  Each byte is identified by a number – Address  Number of bits in an address depends on the processor  Example:- Intel 8086: 20-bit address, Intel 80286: 24-bit address  Data stored in a memory byte – Contents 26
  • 27. Contd..  Number of bits used in the address determines the number of bytes that can be accessed by the processor.  Example: If processor uses 20-bit address, it can access 220 = 1048576 bytes = 1 MB of memory  Question: If processor uses 24-bit address, how many bytes of memory can be accessed? 27
  • 28. Memory Segments  A memory segment is a block of 216 (or 64 K) consecutive memory bytes.  Each segment has a number.  Within a segment, memory location is specified by an offset. This is the number of bytes from the beginning of the segment. 28
  • 29. 29 F0000 E0000 D0000 C0000 B0000 A0000 90000 80000 70000 60000 50000 40000 30000 20000 10000 00000 One Segment 8000:FFFF 8000:0000 segment of fset
  • 30. Segment : Offset Address  Logical Address = Segment : Offset  16-bit segment, 16-bit offset  Physical Address = Segment * 10h + Offset  20-bit address  Example: Logical Address = A4FB:4872 Physical Address = A4FB0h + 4872h = 0A9822h 30
  • 31. Exercise A memory location has a physical address 4A37Bh. Compute: a. The offset address if the segment number is 40FFh. b. The segment number if the offset address is 123Bh. 31
  • 32. Program Segments  A typical machine language program is loaded into following different memory segments:  Code Segment  Data Segment  Stack Segment  Stack is a data structure used by processor to implement procedure calls. 32
  • 34. What is a Bus?  A communication pathway connecting two or more devices  Often grouped  A number of channels in one bus  e.g. 32 bit data bus is 32 separate single bit channels 34 Address Bus CPU Memory I/O Control Bus Data Bus
  • 35. Data Bus  Carries data  Remember that there is no difference between “data” and “instruction” at this level  Width is a key determinant of performance  8, 16, 32, 64 bit 35
  • 36. Address bus  Identify the source or destination of data  e.g. CPU needs to read an instruction (data) from a given location in memory  Bus width determines maximum memory capacity of system  e.g. 8080 has 16 bit address bus giving 64k address space 36
  • 37. Control Bus  Control and timing information  Memory read/write signal  Interrupt request  Clock signals 37
  • 38. Types of Transfer  Memory to Processor  Processor to Memory  I/O to Processor  Processor to I/O  I/O to and from Memory 38
  • 39. Interconnection Structure  Memory  N words of equal length, each word having a unique address  Unit of Transfer (read/Write): Word  Operation: Read/Write indicated by Control Signal  Location of operation specified by an address  I/O Module  Two operations: read and write  May control other external devices  Port: interface between I/O module and device  Able to send interrupt signal to CPU 39
  • 40. Contd..  CPU  Reads in instruction and data  Writes out data  Uses control signal to control all operations  Receives interrupt signal 40
  • 41. 41 Address Data Read Data Write Interrupt Signals