SlideShare a Scribd company logo
1 of 10
Download to read offline
Department of Computer Science & Engineering
Course Title: Computer Architecture & Organization
Course Code: CSE-322
Assignment On:
Different Addressing mode and RISC, CISC Microprocessor
Submitted to:
Rubaiya Hafiz
Lecturer Daffodil International University
Submitted by:
M M Rayhan Parvez
ID: 143-15-4617
Section: F
Submission Date: 22-03-2017
Different Addressing Mode
1.Register Addressing Mode:
In this type of addressing mode the instruction specifies the name of the register in which the
data is available and Opcode specifies the name (or) address of the register on which the
operation would be performed.
Example:
MOV A, B
Here the Opcode is MOV. If the above instruction is executed, the contents of Register B are moved to
the Register A, which is nothing but the accumulator.
Other examples:
ANA B
On executing the above instruction, the contents of Register B or logically ANDed with contents of
register A (accumulator).
SUB H
If we execute the above instruction the contents of Register H will be subtracted from the contents of
the accumulator.
2.Register Indirect Addressing Mode:
This is indirect way of addressing. In this mode, the instruction specifies the name of the register in
which the address of the data is available.
Example:
MOV A, M
SUB M
DCR M
Consider MOV A, M. This instruction will move the contents of memory location, whose address is in
H-L register pair to the accumulator.
M represents the address present in the H-L register pair. So, when MOV A, M is executed, the contents
of the address specified in H-L register pair are moved to accumulator.
3.Immediate Addressing Mode:
In this type of addressing mode the operand is specified within the instruction itself.
Let us discuss with an example.
Consider this instruction:
ADI 34H – This instruction adds the immediate data, 34H to the accumulator.
34H is the data here. H represents Hexadecimal value and the immediate value is added to the
accumulator. In this case 34H is added to the accumulator. Suppose if accumulator has a value 8H and
when this instruction is executed, 34H is added to the 8H and the result is stored in accumulator.
In the above instruction, the operand is specified within instruction itself.
4.Direct Addressing Mode:
In this mode of addressing, the address of the data (operand) is specified within the instruction.
There is a subtle difference between the direct addressing modes and immediate addressing modes. In
immediate addressing mode, the data itself is specified within instruction, but in direct addressing mode
the address of the data is specified in the instruction.
Example:
OUT 10H
LDA 4100H
STA 2000H
Consider the instruction STA 2000H
When this instruction is executed, the contents of the accumulator are stored in the memory location
specified. In the above example the contents of accumulator are stored in memory location 2000H.
5.Indirect Addressing:
This addressing mode utilizes the computer's ability of Segment: Offset addressing. Generally, the base
registers EBX, EBP (or BX, BP) and the index registers (DI, SI), coded within square brackets for
memory references, are used for this purpose.
Indirect addressing is generally used for variables containing several elements like, arrays. Starting
address of the array is stored in, say, the EBX register. The following code snippet shows how to access
different elements of the variable.
MY_TABLE TIMES 10 DW 0 ; Allocates 10 words (2 bytes) each initialized to 0
MOV EBX, [MY_TABLE] ; Effective Address of MY_TABLE in EBX
MOV [EBX], 110 ; MY_TABLE[0] = 110
ADD EBX, 2 ; EBX = EBX +2
MOV [EBX], 123 ; MY_TABLE[1] = 123
6.Implicit Addressing Mode:
There are certain instructions in 8085 which does not require the address of the operand to perform the
operation. They operate only upon the contents of accumulator.
Example:
CMA
RAL
RAR
CMA complements the contents of accumulator.
If RAL is executed the contents of accumulator is rotated left one bit through carry.
If RAR is executed the contents of accumulator is rotated right one bit through carry.
7.Relative Addressing:
For relative addressing, also called PC-relative addressing, the implicitly referenced register is the
program counter (PC). That is, the next instruction address is added to the address field to produce the
EA. typically, the address field is treated as a two-complement number for this operation. Thus, the
effective address is a displacement relative to the address of the instruction as shown in the example
below.
Relative addressing exploits the concept of locality.
E.g. Move X (PC), R1
Here, Contents at address X+PC are moved to R1 .X contains a constant value.
8.Index Addressing Mode:
Offset is added to the base index register to form the effective address if the memory location. This
Addressing Mode is used for reading lookup tables in Program Memory. The Address of the exact
location of the table is formed by adding the Accumulator Data to the base pointer.
Example: MOVC, @A+DPTR (This instruction will move the data from the memory to Accumulator;
the address is made by adding the contents of Accumulator and Data Pointer.
RISC and CISC architecture
What is CISC ?
A complex instruction set computer (CISC /pronounce as ˈsisk’/) is a computer where single instructions
can execute several low-level operations (such as a load from memory, an arithmetic operation, and a
memory store) or are capable of multi-step operations or addressing modes within single instructions, as
its name suggest “COMPLEX INSTRUCTION SET”.
What is RISC ?
A reduced instruction set computer (RISC /pronounce as ˈrisk’/) is a computer which only use simple
instructions that can be divide into multiple instructions which perform low-level operation within single
clock cycle, as its name suggest “REDUCED INSTRUCTION SET”
Understand RISC & CISC architecture with example
Let we take an example of multiplying two numbers
A = A * B; <<<======this is C statement
The CISC Approach: -
The primary goal of CISC architecture is to complete a task in as few lines of assembly as possible. This is achieved
by building processor hardware that is capable of understanding & executing a series of operations, this is where
our CISC architecture introduced.
For this particular task, a CISC processor would come prepared with a specific instruction (we’ll
call it “MULT”). When executed, this instruction
1. Loads the two values into separate registers
2. Multiplies the operands in the execution unit
3. And finally, third, stores the product in the appropriate register.
Thus, the entire task of multiplying two numbers can be completed with one instruction:
MULT A, B <<<======this is assembly statement
MULT is what is known as a “complex instruction.” It operates directly on the computer’s memory
banks and does not require the programmer to explicitly call any loading or storing functions.
Advantage: -
1. Compiler has to do very little work to translate a high-level language statement into assembly
2. Length of the code is relatively short
3. Very little RAM is required to store instructions
4. The emphasis is put on building complex instructions directly into the hardware.
The RISC Approach: -
RISC processors only use simple instructions that can be executed within one clock cycle. Thus, the “MULT”
command described above could be divided into three separate commands:
1. “LOAD” which moves data from the memory bank to a register
2. “PROD” which finds the product of two operands located within the registers
3. “STORE” which moves data from a register to the memory banks.
In order to perform the exact series of steps described in the CISC approach, a programmer would
need to code four lines of assembly:
LOAD R1, A <<<======this is assembly statement
LOAD R2,B <<<======this is assembly statement
PROD A, B <<<======this is assembly statement
STORE R3, A <<<======this is assembly statement
At first, this may seem like a much less efficient way of completing the operation. Because there
are more lines of code, more RAM is needed to store the assembly level instructions. The compiler must also
perform more work to convert a high-level language statement into code of this form.
Advantage: -
1. Each instruction requires only one clock cycle to execute, the entire program will execute in approximately
the same amount of time as the multi-cycle “MULT” command.
2. These RISC “reduced instructions” require less transistors of hardware space than the complex instructions,
leaving more room for general purpose registers. Because all of the instructions execute in a uniform amount
of time (i.e. one clock)
3. Pipelining is possible.
LOAD/STORE mechanism: - Separating the “LOAD” and “STORE” instructions actually reduces the amount of
work that the computer must perform. After a CISC-style “MULT” command is executed, the processor
automatically erases the registers. If one of the operands needs to be used for another computation, the processor
must re-load the data from the memory bank into a register. In RISC, the operand will remain in the register until
another value is loaded in its place.
Comparison of RISC & CISC
CISC RISC
Emphasis on hardware Emphasis on software
Includes multi-clock Single-clock
complex instructions reduced instruction only
Memory-to-memory: “LOAD” and “STORE”
incorporated in instructions
Register to register: “LOAD” and “STORE” are
independent instructions
high cycles per second, Small code sizes Low cycles per second, large code sizes
Transistors used for storing complex instructions Spends more transistors on memory registers
Example of RISC & CISC
Examples of CISC instruction set architectures are PDP-11, VAX, Motorola 68k, and
your desktop PCs on intel’s x86 architecture based too.
Examples of RISC families include DEC Alpha, AMD 29k, ARC, Atmel AVR, Blackfin,
Intel i860 and i960, MIPS, Motorola 88000, PA-RISC, Power (including PowerPC), SuperH, SPARC
and ARM too.
Which one is better?
We cannot differentiate RISC and CISC technology because both are suitable at its specific application.
What counts is how fast a chip can execute the instructions it is given and how well it runs existing
software. Today, both RISC and CISC manufacturers are doing everything to get an edge on the
competition.
The End

More Related Content

What's hot

Io techniques & its types
Io techniques & its typesIo techniques & its types
Io techniques & its typesNehal Naik
 
Associative memory and set associative memory mapping
Associative memory and set associative memory mappingAssociative memory and set associative memory mapping
Associative memory and set associative memory mappingSnehalataAgasti
 
Transmission impairments(presentation)
Transmission impairments(presentation)Transmission impairments(presentation)
Transmission impairments(presentation)Vivek Kumar
 
Introduction to Embedded System I: Chapter 2 (5th portion)
Introduction to Embedded System I: Chapter 2 (5th portion)Introduction to Embedded System I: Chapter 2 (5th portion)
Introduction to Embedded System I: Chapter 2 (5th portion)Moe Moe Myint
 
difference between hub, bridge, switch and router
difference between hub, bridge, switch and routerdifference between hub, bridge, switch and router
difference between hub, bridge, switch and routerAkmal Cikmat
 
Real Time Systems
Real Time SystemsReal Time Systems
Real Time SystemsDeepak John
 
Cache memory
Cache memoryCache memory
Cache memoryAnuj Modi
 
Transport layer services
Transport layer servicesTransport layer services
Transport layer servicesMelvin Cabatuan
 
Interrupt11
Interrupt11Interrupt11
Interrupt11Aisu
 
Computer Networking Theory Assignment 1
Computer Networking Theory Assignment 1Computer Networking Theory Assignment 1
Computer Networking Theory Assignment 1Hasibul Islam Nirob
 
Placement in VLSI Design
Placement in VLSI DesignPlacement in VLSI Design
Placement in VLSI DesignTeam-VLSI-ITMU
 
Classless inter domain routing
Classless inter domain routingClassless inter domain routing
Classless inter domain routingVikash Gangwar
 
Local Area Network – Wired LAN
Local Area Network – Wired LANLocal Area Network – Wired LAN
Local Area Network – Wired LANRaj vardhan
 
Layer 2 & layer 3 switching
Layer 2 & layer 3 switchingLayer 2 & layer 3 switching
Layer 2 & layer 3 switchingMuhd Mu'izuddin
 
IP Address - IPv4 & IPv6
IP Address - IPv4 & IPv6IP Address - IPv4 & IPv6
IP Address - IPv4 & IPv6Adeel Rasheed
 

What's hot (20)

Io techniques & its types
Io techniques & its typesIo techniques & its types
Io techniques & its types
 
Csma
CsmaCsma
Csma
 
Ipv4 presentation
Ipv4 presentationIpv4 presentation
Ipv4 presentation
 
Associative memory and set associative memory mapping
Associative memory and set associative memory mappingAssociative memory and set associative memory mapping
Associative memory and set associative memory mapping
 
Transmission impairments(presentation)
Transmission impairments(presentation)Transmission impairments(presentation)
Transmission impairments(presentation)
 
pipelining
pipeliningpipelining
pipelining
 
Ip address and subnetting
Ip address and subnettingIp address and subnetting
Ip address and subnetting
 
Introduction to Embedded System I: Chapter 2 (5th portion)
Introduction to Embedded System I: Chapter 2 (5th portion)Introduction to Embedded System I: Chapter 2 (5th portion)
Introduction to Embedded System I: Chapter 2 (5th portion)
 
difference between hub, bridge, switch and router
difference between hub, bridge, switch and routerdifference between hub, bridge, switch and router
difference between hub, bridge, switch and router
 
Real Time Systems
Real Time SystemsReal Time Systems
Real Time Systems
 
Cache memory
Cache memoryCache memory
Cache memory
 
Transport layer services
Transport layer servicesTransport layer services
Transport layer services
 
Interrupt11
Interrupt11Interrupt11
Interrupt11
 
Computer Networking Theory Assignment 1
Computer Networking Theory Assignment 1Computer Networking Theory Assignment 1
Computer Networking Theory Assignment 1
 
Placement in VLSI Design
Placement in VLSI DesignPlacement in VLSI Design
Placement in VLSI Design
 
Transport layer
Transport layer Transport layer
Transport layer
 
Classless inter domain routing
Classless inter domain routingClassless inter domain routing
Classless inter domain routing
 
Local Area Network – Wired LAN
Local Area Network – Wired LANLocal Area Network – Wired LAN
Local Area Network – Wired LAN
 
Layer 2 & layer 3 switching
Layer 2 & layer 3 switchingLayer 2 & layer 3 switching
Layer 2 & layer 3 switching
 
IP Address - IPv4 & IPv6
IP Address - IPv4 & IPv6IP Address - IPv4 & IPv6
IP Address - IPv4 & IPv6
 

Similar to Different addressing mode and risc, cisc microprocessor

Cisc vs risc
Cisc vs riscCisc vs risc
Cisc vs riscKumar
 
Cisc vs risc
Cisc vs riscCisc vs risc
Cisc vs riscKumar
 
Instruction Set Architecture
Instruction Set ArchitectureInstruction Set Architecture
Instruction Set ArchitectureJaffer Haadi
 
ITEC582-Chapter 12.pptx
ITEC582-Chapter 12.pptxITEC582-Chapter 12.pptx
ITEC582-Chapter 12.pptxSabaNaeem26
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAAiman Hud
 
Advanced Processor Power Point Presentation
Advanced Processor  Power Point  PresentationAdvanced Processor  Power Point  Presentation
Advanced Processor Power Point PresentationPrashantYadav931011
 
4bit pc report[cse 08-section-b2_group-02]
4bit pc report[cse 08-section-b2_group-02]4bit pc report[cse 08-section-b2_group-02]
4bit pc report[cse 08-section-b2_group-02]shibbirtanvin
 
4bit PC report
4bit PC report4bit PC report
4bit PC reporttanvin
 
Cs2253 coa-2marks-2013
Cs2253 coa-2marks-2013Cs2253 coa-2marks-2013
Cs2253 coa-2marks-2013Buvana Buvana
 
16-bit Microprocessor Design (2005)
16-bit Microprocessor Design (2005)16-bit Microprocessor Design (2005)
16-bit Microprocessor Design (2005)Susam Pal
 
Computer Organization.pptx
Computer Organization.pptxComputer Organization.pptx
Computer Organization.pptxsaimagul310
 
Improving Code Compression Efficiency of MIPS32 Processor using Modified ISA
Improving Code Compression Efficiency of MIPS32 Processor using Modified ISAImproving Code Compression Efficiency of MIPS32 Processor using Modified ISA
Improving Code Compression Efficiency of MIPS32 Processor using Modified ISAIJMTST Journal
 

Similar to Different addressing mode and risc, cisc microprocessor (20)

Cisc vs risc
Cisc vs riscCisc vs risc
Cisc vs risc
 
Cisc vs risc
Cisc vs riscCisc vs risc
Cisc vs risc
 
Cao
CaoCao
Cao
 
Bc0040
Bc0040Bc0040
Bc0040
 
Instruction Set Architecture
Instruction Set ArchitectureInstruction Set Architecture
Instruction Set Architecture
 
Instruction codes
Instruction codesInstruction codes
Instruction codes
 
instruction codes
instruction codesinstruction codes
instruction codes
 
viva q&a for mp lab
viva q&a for mp labviva q&a for mp lab
viva q&a for mp lab
 
ITEC582-Chapter 12.pptx
ITEC582-Chapter 12.pptxITEC582-Chapter 12.pptx
ITEC582-Chapter 12.pptx
 
Introduction to Microcontrollers
Introduction to MicrocontrollersIntroduction to Microcontrollers
Introduction to Microcontrollers
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
 
Advanced Processor Power Point Presentation
Advanced Processor  Power Point  PresentationAdvanced Processor  Power Point  Presentation
Advanced Processor Power Point Presentation
 
4bit pc report[cse 08-section-b2_group-02]
4bit pc report[cse 08-section-b2_group-02]4bit pc report[cse 08-section-b2_group-02]
4bit pc report[cse 08-section-b2_group-02]
 
4bit PC report
4bit PC report4bit PC report
4bit PC report
 
Cs2253 coa-2marks-2013
Cs2253 coa-2marks-2013Cs2253 coa-2marks-2013
Cs2253 coa-2marks-2013
 
16-bit Microprocessor Design (2005)
16-bit Microprocessor Design (2005)16-bit Microprocessor Design (2005)
16-bit Microprocessor Design (2005)
 
Computer Organization.pptx
Computer Organization.pptxComputer Organization.pptx
Computer Organization.pptx
 
Improving Code Compression Efficiency of MIPS32 Processor using Modified ISA
Improving Code Compression Efficiency of MIPS32 Processor using Modified ISAImproving Code Compression Efficiency of MIPS32 Processor using Modified ISA
Improving Code Compression Efficiency of MIPS32 Processor using Modified ISA
 
CISC & RISC Architecture
CISC & RISC Architecture CISC & RISC Architecture
CISC & RISC Architecture
 
Addressing modes
Addressing modesAddressing modes
Addressing modes
 

Recently uploaded

Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfme23b1001
 
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
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .Satyam Kumar
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2RajaP95
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ
 
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
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learningmisbanausheenparvam
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxk795866
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and usesDevarapalliHaritha
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxvipinkmenon1
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 

Recently uploaded (20)

young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdf
 
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
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
 
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
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learning
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptx
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and uses
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptx
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 

Different addressing mode and risc, cisc microprocessor

  • 1. Department of Computer Science & Engineering Course Title: Computer Architecture & Organization Course Code: CSE-322 Assignment On: Different Addressing mode and RISC, CISC Microprocessor Submitted to: Rubaiya Hafiz Lecturer Daffodil International University Submitted by: M M Rayhan Parvez ID: 143-15-4617 Section: F Submission Date: 22-03-2017
  • 2. Different Addressing Mode 1.Register Addressing Mode: In this type of addressing mode the instruction specifies the name of the register in which the data is available and Opcode specifies the name (or) address of the register on which the operation would be performed. Example: MOV A, B Here the Opcode is MOV. If the above instruction is executed, the contents of Register B are moved to the Register A, which is nothing but the accumulator. Other examples: ANA B On executing the above instruction, the contents of Register B or logically ANDed with contents of register A (accumulator). SUB H If we execute the above instruction the contents of Register H will be subtracted from the contents of the accumulator. 2.Register Indirect Addressing Mode: This is indirect way of addressing. In this mode, the instruction specifies the name of the register in which the address of the data is available. Example: MOV A, M
  • 3. SUB M DCR M Consider MOV A, M. This instruction will move the contents of memory location, whose address is in H-L register pair to the accumulator. M represents the address present in the H-L register pair. So, when MOV A, M is executed, the contents of the address specified in H-L register pair are moved to accumulator. 3.Immediate Addressing Mode: In this type of addressing mode the operand is specified within the instruction itself. Let us discuss with an example. Consider this instruction: ADI 34H – This instruction adds the immediate data, 34H to the accumulator. 34H is the data here. H represents Hexadecimal value and the immediate value is added to the accumulator. In this case 34H is added to the accumulator. Suppose if accumulator has a value 8H and when this instruction is executed, 34H is added to the 8H and the result is stored in accumulator. In the above instruction, the operand is specified within instruction itself. 4.Direct Addressing Mode: In this mode of addressing, the address of the data (operand) is specified within the instruction.
  • 4. There is a subtle difference between the direct addressing modes and immediate addressing modes. In immediate addressing mode, the data itself is specified within instruction, but in direct addressing mode the address of the data is specified in the instruction. Example: OUT 10H LDA 4100H STA 2000H Consider the instruction STA 2000H When this instruction is executed, the contents of the accumulator are stored in the memory location specified. In the above example the contents of accumulator are stored in memory location 2000H. 5.Indirect Addressing: This addressing mode utilizes the computer's ability of Segment: Offset addressing. Generally, the base registers EBX, EBP (or BX, BP) and the index registers (DI, SI), coded within square brackets for memory references, are used for this purpose. Indirect addressing is generally used for variables containing several elements like, arrays. Starting address of the array is stored in, say, the EBX register. The following code snippet shows how to access different elements of the variable. MY_TABLE TIMES 10 DW 0 ; Allocates 10 words (2 bytes) each initialized to 0 MOV EBX, [MY_TABLE] ; Effective Address of MY_TABLE in EBX MOV [EBX], 110 ; MY_TABLE[0] = 110 ADD EBX, 2 ; EBX = EBX +2
  • 5. MOV [EBX], 123 ; MY_TABLE[1] = 123 6.Implicit Addressing Mode: There are certain instructions in 8085 which does not require the address of the operand to perform the operation. They operate only upon the contents of accumulator. Example: CMA RAL RAR CMA complements the contents of accumulator. If RAL is executed the contents of accumulator is rotated left one bit through carry. If RAR is executed the contents of accumulator is rotated right one bit through carry. 7.Relative Addressing: For relative addressing, also called PC-relative addressing, the implicitly referenced register is the program counter (PC). That is, the next instruction address is added to the address field to produce the EA. typically, the address field is treated as a two-complement number for this operation. Thus, the
  • 6. effective address is a displacement relative to the address of the instruction as shown in the example below. Relative addressing exploits the concept of locality. E.g. Move X (PC), R1 Here, Contents at address X+PC are moved to R1 .X contains a constant value. 8.Index Addressing Mode: Offset is added to the base index register to form the effective address if the memory location. This Addressing Mode is used for reading lookup tables in Program Memory. The Address of the exact location of the table is formed by adding the Accumulator Data to the base pointer. Example: MOVC, @A+DPTR (This instruction will move the data from the memory to Accumulator; the address is made by adding the contents of Accumulator and Data Pointer. RISC and CISC architecture What is CISC ? A complex instruction set computer (CISC /pronounce as ˈsisk’/) is a computer where single instructions can execute several low-level operations (such as a load from memory, an arithmetic operation, and a memory store) or are capable of multi-step operations or addressing modes within single instructions, as its name suggest “COMPLEX INSTRUCTION SET”. What is RISC ? A reduced instruction set computer (RISC /pronounce as ˈrisk’/) is a computer which only use simple instructions that can be divide into multiple instructions which perform low-level operation within single clock cycle, as its name suggest “REDUCED INSTRUCTION SET”
  • 7. Understand RISC & CISC architecture with example Let we take an example of multiplying two numbers A = A * B; <<<======this is C statement The CISC Approach: - The primary goal of CISC architecture is to complete a task in as few lines of assembly as possible. This is achieved by building processor hardware that is capable of understanding & executing a series of operations, this is where our CISC architecture introduced. For this particular task, a CISC processor would come prepared with a specific instruction (we’ll call it “MULT”). When executed, this instruction 1. Loads the two values into separate registers 2. Multiplies the operands in the execution unit 3. And finally, third, stores the product in the appropriate register. Thus, the entire task of multiplying two numbers can be completed with one instruction: MULT A, B <<<======this is assembly statement MULT is what is known as a “complex instruction.” It operates directly on the computer’s memory banks and does not require the programmer to explicitly call any loading or storing functions. Advantage: - 1. Compiler has to do very little work to translate a high-level language statement into assembly
  • 8. 2. Length of the code is relatively short 3. Very little RAM is required to store instructions 4. The emphasis is put on building complex instructions directly into the hardware. The RISC Approach: - RISC processors only use simple instructions that can be executed within one clock cycle. Thus, the “MULT” command described above could be divided into three separate commands: 1. “LOAD” which moves data from the memory bank to a register 2. “PROD” which finds the product of two operands located within the registers 3. “STORE” which moves data from a register to the memory banks. In order to perform the exact series of steps described in the CISC approach, a programmer would need to code four lines of assembly: LOAD R1, A <<<======this is assembly statement LOAD R2,B <<<======this is assembly statement PROD A, B <<<======this is assembly statement STORE R3, A <<<======this is assembly statement At first, this may seem like a much less efficient way of completing the operation. Because there are more lines of code, more RAM is needed to store the assembly level instructions. The compiler must also perform more work to convert a high-level language statement into code of this form. Advantage: - 1. Each instruction requires only one clock cycle to execute, the entire program will execute in approximately the same amount of time as the multi-cycle “MULT” command. 2. These RISC “reduced instructions” require less transistors of hardware space than the complex instructions, leaving more room for general purpose registers. Because all of the instructions execute in a uniform amount of time (i.e. one clock) 3. Pipelining is possible. LOAD/STORE mechanism: - Separating the “LOAD” and “STORE” instructions actually reduces the amount of work that the computer must perform. After a CISC-style “MULT” command is executed, the processor automatically erases the registers. If one of the operands needs to be used for another computation, the processor must re-load the data from the memory bank into a register. In RISC, the operand will remain in the register until another value is loaded in its place. Comparison of RISC & CISC
  • 9. CISC RISC Emphasis on hardware Emphasis on software Includes multi-clock Single-clock complex instructions reduced instruction only Memory-to-memory: “LOAD” and “STORE” incorporated in instructions Register to register: “LOAD” and “STORE” are independent instructions high cycles per second, Small code sizes Low cycles per second, large code sizes Transistors used for storing complex instructions Spends more transistors on memory registers Example of RISC & CISC Examples of CISC instruction set architectures are PDP-11, VAX, Motorola 68k, and your desktop PCs on intel’s x86 architecture based too. Examples of RISC families include DEC Alpha, AMD 29k, ARC, Atmel AVR, Blackfin, Intel i860 and i960, MIPS, Motorola 88000, PA-RISC, Power (including PowerPC), SuperH, SPARC and ARM too. Which one is better? We cannot differentiate RISC and CISC technology because both are suitable at its specific application. What counts is how fast a chip can execute the instructions it is given and how well it runs existing software. Today, both RISC and CISC manufacturers are doing everything to get an edge on the competition.