SlideShare a Scribd company logo
1 of 31
Instruction Formats
Shahad
Outline
Instruction Formats
Pentium Instruction Format
Type of address instruction
Instruction Set Architecture ISA
Introduction
 An instruction format or instruction code is a group of
bits used to perform a particular operation on the data
stored in computer
 Processor fetches an instruction from memory and
decodes the bits to execute the instruction.
 Different computer may have their own instruction set .
 The operation of the processor is determined by the
instructions it executes, referred to as machine
instructions or computer instructions
 The collection of different instructions that the
processor can execute is referred to as the processor’s
instruction set
 Each instruction must contain the information required
by the processor for execution
Elements of a Machine Instruction
Operation code (opcode)
Specifies the operation to be performed. The operation is
specified by a binary code, known as the operation code,
opcode do ADD, SUB,DIV,LOAD,...
Source operand reference
The operation may involve one or more source operands, that
is, operands that are inputs for the operation
Result operand reference
The operation may produce a result
Next instruction reference
This tells the processor where to fetch the next instruction after
the execution of this instruction is complete
Instruction Cycle State Diagram
Source and result operands can be in one of
four areas:
1) Main memory or virtual memory
 As with next instruction references, the main or virtual memory
address must be supplied.
2) I/O devices
 The instruction must specify the I/O module and device for the
operation. If memory-mapped I/O is used, this is just another main
or virtual memory address.
3) Processor register
 A processor contains one or more registers that may be referenced
by machine instructions.
 If more than one register exists each register is assigned a unique
name or number and the instruction must contain the number of
the desired register
4) Immediate
 The value of the operand is contained in a field in the instruction
being executed
Types of Operand
Addresses: immediate, direct, indirect, stack
Numbers: integer or fixed point (binary, twos
complement), floating point (sign, exponent),
(packed) decimal
(246 = 0000 0010 0100 0110)
Characters: ASCII (128 printable and control
characters + bit for error detection)
Logical Data: bits or flags, e.g., Boolean 0 and 1
Instruction Representation
Within the computer each instruction is represented by a
sequence of bits
The instruction is divided into fields, corresponding to the
constituent elements of the instruction
Instruction Types
A computer should have a set of instructions that allows the user to
formulate any data processing task.. Any program written in a high-
level language must be translated into machine language to be
executed, so we can categorize instruction types as follows:
Data processing: Arithmetic instructions provide computational
capabilities for processing numeric data
Data storage: Movement of data into or out of register and or
memory locations
Data movement :I /O instructions are needed to transfer programs
and data into memory and the results of computations back out to
the user
Control: test instruction test the value of a data word or the status of
a computation
Branch instruction used to branch to a different set of instructions
depending on the decision made
Instruction Formats
Layout of bits in an instruction
Includes opcode
Includes (implicit or explicit) operand(s)
Usually more than one instruction format in an instruction set
Instruction Length
Affected by and affects:
Memory size
Memory organization - addressing
Bus structure, e.g., width
CPU complexity
CPU speed
 Trade off between powerful instruction repertoire and saving
space
Allocation of Bits
Number of addressing modes: implicit or additional bits specifying
it
Number of operands
Register (faster, limited size and number, 32) versus memory
Number of register sets, e.g., data and address (shorter addresses)
Address range
Address granularity (e.g., by byte)
Number of Addresses
 More addresses
1-More complex instructions
2-More registers - inter-register operations are quicker
3-Less instructions per program
 Fewer addresses
1-Less complex instructions
2-More instructions per program, e.g. data movement
3-Faster fetch/execution of instructions
Pentium Instruction Format
Pentium uses a variable length instruction format.
The Pentium instruction can be from 2 to 16 bytes long.
The Instruction is broken down into 6 sections
1-Instruction Prefixes
2-Opcode
3-Mod R/M
4-SIB
5-Displacement
6-Immediate
1.Instruction Prefixes
2 .Opcode
Instruction Prefix:used in multiprocessor
enviroments, specifically with strings
Segment Override: This specifies which
segment-register to use, if not the default.
Operand Size: The operand size can be
either 16 or 32 bits, this specifies which is
being used.
Address Size: The Pentium can use a 16
or 32 bit address, this specifies which is
being used.
The opcode can be either one or two bytes.
The opcode can also specify if the data is 16
or 32 bit.
The opcode specifies which way the data is
going (to or from memory).
The opcode specifies if an immediate value is
signed or not.
 Mod R/M :specifies addressing
information. It specifies whether an
operand is in a register or in memory.
 The Mod and R/M fields are combined to
form the means in which the memory is
indexed.
 The Reg/Opcode specifies either the
register being used or 3 bits for more
opcode.
 The SIB field is used with the Mod R/M
field for the addressing mode.
 The scale field specifies the factor for
scaled indexing.
 The index field specifies the register for
indexing.
 The Base field specifies the base register
for addressing.
3.Mod R/M
4.SIB
5.Displacement
Displacement: If the addressing mode uses
displacement the displacement field is used.
It can hold an 8, 16, or 32 bit signed integer
for displacement.
Immediate: This is where an immediate value
is stored if one is used. It can hold an 8, 16, or
32 bit operand.
Pentium Instructions
 Traditional Instructions
Add, sub, add w/carry, sub w/carry, mul, div
BCD arithmetic, Booleans, shifts/rotates, string ops
Loops, conditionals, condition code setting, subroutines
 MMX / SSE /SSE2
Extensions to the instruction set for parallel SIMD operations on
packed data
Designed to speed up multimedia and communication applications Š
graphics and image processing Švideo and audio processing Š
speech compression and recognition
SIMD – Single Instruction Multiple Data stream „
 MMX – Multimedia Extensions :64-bit„
 SSE – Streaming SIMD Extension:128-bit
 SSE2 – Streaming SIMD Extension 2 :128-bit
 Example applications
Subtracting one image from another for overlaying
Unpacking a compressed image (JPEG, MPEG, etc)
Type of address instruction
1) Three address instructions
Operation , Result ,Operand1 ,Operand2
Computer with three address instructions formats can use each address
field to specify either a processor register or a memory operand .
X= (A+B)*(C+D) is shown below
Add R1,A,B
Add R2,C,D
Mul X,R1,R2
Needs very long words to hold everything
It is assumed that the computer has two processor registers R1 andR2
The advantage of three address format is that it results in short
programs when evaluating arithmetic expression .
The disadvantage is the binary coded instructions require too many
bits to specify
2) Two address instructions
One address doubles as operand and result
Most common in commercial in computers . Each address field
can specify either a processes register on a memory word
X= (A+B)*(C+D)
MOV R1, A
ADD R1, B
MOV R2 ,C
ADD R2 , D
MUL R1 ,R2
MOV X1 ,R1
Reduces length of instruction
Requires some extra work , temporary storage
 MOV instruction moves or transfers the operand to and from
memory and processor registers.
 First symbol listed in an instruction is assumed to be both a
source and destination .
3) One address instructions
 One address instruction use un implied accumulator (AC) register
for all data manipulation now we see the same example
X= (A+B)*(C+D)
LOAD A
ADD B
STORE T
LOAD C
ADD D
MUL T
STORE X
 All operation are done between the AC register and a memory
operand
 T is the address of a temporary memory location for storing
intermediate result
4) Zero address instruction
All addresses implicit, e.g. ADD
Uses a stack, e.g. pop a, pop b
PUSH A
Push b
ADD
PUSH C
PUSH D
ADD
MUL
POP X
Number of Addresses
Instruction Set Architecture
ISA
 Is the structure of a computer that a machine language
programmer must understand to write a correct (timing
independent) program for that machine.
 Is the set of processor design techniques used to
implement the instruction work flow on hardware.
 ISA tell you that how your processor going to process
your program instructions.
From the architecture point of view, the microprocessor
chips can be classified into two categories:
1-Complex Instruction Set Computer(CISC) .
2-Reduce Instruction Set Computers (RISC) .
In either case, the objective is to improve system
1) Complex Instruction Set computer
(CISC)
Computer with large number of instruction is called CISC it is mostly
used in scientific computing applications requiring a lots of floating
point arithmetic
The essential goal of CISC architecture is to attempt to provide a single
machine instruction for each statement that is written in a high-level
language.
Provide a complex instruction set is the desire to simplify the
compilation and improve the overall computer performance.
Examples of CISC architecture are the DEC VAX computer and the IBM
370 computer. Other are 8085, 8086, 80x86 etc.
The major characteristics of CISC
architecture
A large number of instructions– typically from 100 to 250 instructions
Some instructions that perform specialized tasks and are used
infrequently
A large variety of addressing modes—typically from 5 to 20 different
modes
 Variable-length instruction formats
Instructions that manipulate operands in memory
 Reduced speed due to memory read/write operations
 Use of micro program – special program in control memory of a
computer to perform the timing and sequencing of the micro operations
fetch, decode, execute etc.
 Major complexity in the design of micro program
 No large number of registers – single register set of general purpose
and low cost
2) Reduced Instruction Set Computers
(RISC)
 A computer with few and simple construction . RISC architecture is
simple and efficient .
RISC concept – an attempt to reduce the execution cycle by simplifying
the instruction set
Small set of instructions – mostly register to register operations and
simple load/store operations for memory access
 Each operand – brought into register using load instruction,
computations are done among data in registers and results transferred
to memory using store instruction
Simplify instruction set and encourages the optimization of register
manipulation
 May include immediate operands, relative mode etc .
The major characteristics of RISC
architecture
 Relatively few instructions
 Relatively few addressing modes
 Memory access limited to load and store instructions
 All operations done within the registers of the CPU
 Fixed-length, easily decoded instruction format
 Single-cycle instruction execution
 Hardwired rather than micro programmed control
Superscalar and out-of-order execution
Large number of registers
Fast floating point performance
Larger Cache.
Comparison between RISC and
CISC Architectures
CISCRISCS.N.
Complex instructions taking multiple
cycles
Simple instructions taking one cycle1
Any instructions may reference memoryOnly load and store memory references2
Not/less pipelinedHeavily pipelined3
Single register setMultiple register sets4
Complexity is in micro-programmingComplexity is in compiler5
Instructions interpreted by micro-
programming
Instructions executed by hardware6
Variable format instructionsFixed format instructions7
Large instructions and modesFew instructions and modes8
Table below shows some examples of
CISC and RISC processors
The two architectures, CISC and RISC, can be compared based on
1- instruction set
2-studying the available addressing modes
3-the integer and floating point units
RISC ProcessorCISC Processor
MIPS R2000IBM 370/168
SUN SPARSVAX 11/780
INTEL I 860MICROVAX II
MOTORLA 8800INTEL 80286
POWERPC 601INTEL 80386
IBM RS/6000SUN-3/75
MIPS R4000PDP-11
Intel x86/ pentium
Pentium 4 microinstructions
 Embeds a RISC architecture and pipelining within a
CISC instruction set
 Instructions fetched to CPU
Translated into internal RISC-style
“microinstructions”
Microinstructions are stored in the level 0
instruction cache
CPU execution logic executes microinstructions in
a pipelined fashion
 Retains compatibility with old Pentium and x86 code
while achieving RISC-like performance
Intel x86 Processor-CISC or RISC or
both
Now we are into the post-RISC era, where processors have the
advantages of both RISC and CISC architecture.
The gap between RISC and CISC has blurred significantly, longer
relevant.
Intel’s Pentium Core 2 Duo processor can execute more than one
CISC instruction per clock cycle due to increased processing speed.
This speed advantage would enable CISC instructions to be pipelined.
On the other hand, RISC instructions are also becoming complex
(CISC-like) to take advantage of increased processing speed.
 RISC processors also use complicated hardware for superscalar
execution.
So at present, classifying a processor as RISC or CISC is almost
impossible, because their instructions sets all look similar.
Computer architecture instruction formats

More Related Content

What's hot

Input Output Organization
Input Output OrganizationInput Output Organization
Input Output OrganizationKamal Acharya
 
Timing and control
Timing and controlTiming and control
Timing and controlchauhankapil
 
Register organization, stack
Register organization, stackRegister organization, stack
Register organization, stackAsif Iqbal
 
General register organization (computer organization)
General register organization  (computer organization)General register organization  (computer organization)
General register organization (computer organization)rishi ram khanal
 
Memory organization (Computer architecture)
Memory organization (Computer architecture)Memory organization (Computer architecture)
Memory organization (Computer architecture)Sandesh Jonchhe
 
Register transfer language
Register transfer languageRegister transfer language
Register transfer languageSanjeev Patel
 
Register transfer and micro-operation
Register transfer and micro-operationRegister transfer and micro-operation
Register transfer and micro-operationNikhil Pandit
 
instruction format and addressing modes
instruction format and addressing modesinstruction format and addressing modes
instruction format and addressing modesRamaPrabha24
 
instruction cycle ppt
instruction cycle pptinstruction cycle ppt
instruction cycle pptsheetal singh
 
Memory organization in computer architecture
Memory organization in computer architectureMemory organization in computer architecture
Memory organization in computer architectureFaisal Hussain
 
Microprogram Control
Microprogram Control Microprogram Control
Microprogram Control Anuj Modi
 
Instruction format
Instruction formatInstruction format
Instruction formatchauhankapil
 
Computer architecture pipelining
Computer architecture pipeliningComputer architecture pipelining
Computer architecture pipeliningMazin Alwaaly
 

What's hot (20)

Input Output Organization
Input Output OrganizationInput Output Organization
Input Output Organization
 
Instruction format
Instruction formatInstruction format
Instruction format
 
Instruction code
Instruction codeInstruction code
Instruction code
 
Timing and control
Timing and controlTiming and control
Timing and control
 
Register organization, stack
Register organization, stackRegister organization, stack
Register organization, stack
 
Interrupts
InterruptsInterrupts
Interrupts
 
General register organization (computer organization)
General register organization  (computer organization)General register organization  (computer organization)
General register organization (computer organization)
 
Memory organization (Computer architecture)
Memory organization (Computer architecture)Memory organization (Computer architecture)
Memory organization (Computer architecture)
 
Memory Organization
Memory OrganizationMemory Organization
Memory Organization
 
Register transfer language
Register transfer languageRegister transfer language
Register transfer language
 
Register transfer and micro-operation
Register transfer and micro-operationRegister transfer and micro-operation
Register transfer and micro-operation
 
instruction format and addressing modes
instruction format and addressing modesinstruction format and addressing modes
instruction format and addressing modes
 
Addressing modes
Addressing modesAddressing modes
Addressing modes
 
instruction cycle ppt
instruction cycle pptinstruction cycle ppt
instruction cycle ppt
 
Memory organization in computer architecture
Memory organization in computer architectureMemory organization in computer architecture
Memory organization in computer architecture
 
Microprogram Control
Microprogram Control Microprogram Control
Microprogram Control
 
Instruction format
Instruction formatInstruction format
Instruction format
 
Computer system bus
Computer system busComputer system bus
Computer system bus
 
Computer architecture pipelining
Computer architecture pipeliningComputer architecture pipelining
Computer architecture pipelining
 
Computer arithmetic
Computer arithmeticComputer arithmetic
Computer arithmetic
 

Similar to Computer architecture instruction formats

Addressing modes (detailed data path)
Addressing modes (detailed data path)Addressing modes (detailed data path)
Addressing modes (detailed data path)Mahesh Kumar Attri
 
pdfslide.net_morris-mano-ppt.ppt
pdfslide.net_morris-mano-ppt.pptpdfslide.net_morris-mano-ppt.ppt
pdfslide.net_morris-mano-ppt.pptSaurabhPorwal14
 
Please send the answers to my email. Mirre06@hotmail.comSomeone se.pdf
Please send the answers to my email. Mirre06@hotmail.comSomeone se.pdfPlease send the answers to my email. Mirre06@hotmail.comSomeone se.pdf
Please send the answers to my email. Mirre06@hotmail.comSomeone se.pdfebrahimbadushata00
 
Module 1-ppt System programming
Module 1-ppt System programmingModule 1-ppt System programming
Module 1-ppt System programmingvishnu sankar
 
UNIT 2_ESD.pdf
UNIT 2_ESD.pdfUNIT 2_ESD.pdf
UNIT 2_ESD.pdfSaralaT3
 
Instruction set (prasenjit dey)
Instruction set (prasenjit dey)Instruction set (prasenjit dey)
Instruction set (prasenjit dey)Prasenjit Dey
 
System Programming- Unit I
System Programming- Unit ISystem Programming- Unit I
System Programming- Unit ISaranya1702
 
Introduction to Processor Design and ARM Processor
Introduction to Processor Design and ARM ProcessorIntroduction to Processor Design and ARM Processor
Introduction to Processor Design and ARM ProcessorDarling Jemima
 
(246431835) instruction set principles (2) (1)
(246431835) instruction set principles (2) (1)(246431835) instruction set principles (2) (1)
(246431835) instruction set principles (2) (1)Alveena Saleem
 
the-cpu-design-central-processing-unit-design-1
the-cpu-design-central-processing-unit-design-1the-cpu-design-central-processing-unit-design-1
the-cpu-design-central-processing-unit-design-1Basel Mansour
 
Examinable Question and answer system programming
Examinable Question and answer system programmingExaminable Question and answer system programming
Examinable Question and answer system programmingMakerere university
 

Similar to Computer architecture instruction formats (20)

Addressing modes (detailed data path)
Addressing modes (detailed data path)Addressing modes (detailed data path)
Addressing modes (detailed data path)
 
pdfslide.net_morris-mano-ppt.ppt
pdfslide.net_morris-mano-ppt.pptpdfslide.net_morris-mano-ppt.ppt
pdfslide.net_morris-mano-ppt.ppt
 
Please send the answers to my email. Mirre06@hotmail.comSomeone se.pdf
Please send the answers to my email. Mirre06@hotmail.comSomeone se.pdfPlease send the answers to my email. Mirre06@hotmail.comSomeone se.pdf
Please send the answers to my email. Mirre06@hotmail.comSomeone se.pdf
 
Bc0040
Bc0040Bc0040
Bc0040
 
Register & Memory
Register & MemoryRegister & Memory
Register & Memory
 
microprocessor
 microprocessor microprocessor
microprocessor
 
Module 1-ppt System programming
Module 1-ppt System programmingModule 1-ppt System programming
Module 1-ppt System programming
 
UNIT 2_ESD.pdf
UNIT 2_ESD.pdfUNIT 2_ESD.pdf
UNIT 2_ESD.pdf
 
Instruction set (prasenjit dey)
Instruction set (prasenjit dey)Instruction set (prasenjit dey)
Instruction set (prasenjit dey)
 
System Programming- Unit I
System Programming- Unit ISystem Programming- Unit I
System Programming- Unit I
 
Cao 2012
Cao 2012Cao 2012
Cao 2012
 
9.cs instrset
9.cs instrset9.cs instrset
9.cs instrset
 
Introduction to Processor Design and ARM Processor
Introduction to Processor Design and ARM ProcessorIntroduction to Processor Design and ARM Processor
Introduction to Processor Design and ARM Processor
 
(246431835) instruction set principles (2) (1)
(246431835) instruction set principles (2) (1)(246431835) instruction set principles (2) (1)
(246431835) instruction set principles (2) (1)
 
COA.pptx
COA.pptxCOA.pptx
COA.pptx
 
Chapter 7
Chapter 7Chapter 7
Chapter 7
 
the-cpu-design-central-processing-unit-design-1
the-cpu-design-central-processing-unit-design-1the-cpu-design-central-processing-unit-design-1
the-cpu-design-central-processing-unit-design-1
 
Examinable Question and answer system programming
Examinable Question and answer system programmingExaminable Question and answer system programming
Examinable Question and answer system programming
 
instruction codes
instruction codesinstruction codes
instruction codes
 
x86_1.ppt
x86_1.pptx86_1.ppt
x86_1.ppt
 

More from Mazin Alwaaly

Pattern recognition voice biometrics
Pattern recognition voice biometricsPattern recognition voice biometrics
Pattern recognition voice biometricsMazin Alwaaly
 
Pattern recognition palm print authentication system
Pattern recognition palm print authentication systemPattern recognition palm print authentication system
Pattern recognition palm print authentication systemMazin Alwaaly
 
Pattern recognition on line signature
Pattern recognition on line signaturePattern recognition on line signature
Pattern recognition on line signatureMazin Alwaaly
 
Pattern recognition multi biometrics using face and ear
Pattern recognition multi biometrics using face and earPattern recognition multi biometrics using face and ear
Pattern recognition multi biometrics using face and earMazin Alwaaly
 
Pattern recognition IRIS recognition
Pattern recognition IRIS recognitionPattern recognition IRIS recognition
Pattern recognition IRIS recognitionMazin Alwaaly
 
Pattern recognition hand vascular pattern recognition
Pattern recognition hand vascular pattern recognitionPattern recognition hand vascular pattern recognition
Pattern recognition hand vascular pattern recognitionMazin Alwaaly
 
Pattern recognition Hand Geometry
Pattern recognition Hand GeometryPattern recognition Hand Geometry
Pattern recognition Hand GeometryMazin Alwaaly
 
Pattern recognition forensic dental identification
Pattern recognition forensic dental identificationPattern recognition forensic dental identification
Pattern recognition forensic dental identificationMazin Alwaaly
 
Pattern recognition fingerprints
Pattern recognition fingerprintsPattern recognition fingerprints
Pattern recognition fingerprintsMazin Alwaaly
 
Pattern recognition facial recognition
Pattern recognition facial recognitionPattern recognition facial recognition
Pattern recognition facial recognitionMazin Alwaaly
 
Pattern recognition ear as a biometric
Pattern recognition ear as a biometricPattern recognition ear as a biometric
Pattern recognition ear as a biometricMazin Alwaaly
 
Pattern recognition 3d face recognition
Pattern recognition 3d face recognitionPattern recognition 3d face recognition
Pattern recognition 3d face recognitionMazin Alwaaly
 
Multimedia multimedia over wireless and mobile networks
Multimedia multimedia over wireless and mobile networksMultimedia multimedia over wireless and mobile networks
Multimedia multimedia over wireless and mobile networksMazin Alwaaly
 
Multimedia network services and protocols for multimedia communications
Multimedia network services and protocols for multimedia communicationsMultimedia network services and protocols for multimedia communications
Multimedia network services and protocols for multimedia communicationsMazin Alwaaly
 
Multimedia content based retrieval in digital libraries
Multimedia content based retrieval in digital librariesMultimedia content based retrieval in digital libraries
Multimedia content based retrieval in digital librariesMazin Alwaaly
 
Multimedia lossy compression algorithms
Multimedia lossy compression algorithmsMultimedia lossy compression algorithms
Multimedia lossy compression algorithmsMazin Alwaaly
 
Multimedia lossless compression algorithms
Multimedia lossless compression algorithmsMultimedia lossless compression algorithms
Multimedia lossless compression algorithmsMazin Alwaaly
 
Multimedia basic video compression techniques
Multimedia basic video compression techniquesMultimedia basic video compression techniques
Multimedia basic video compression techniquesMazin Alwaaly
 
Multimedia image compression standards
Multimedia image compression standardsMultimedia image compression standards
Multimedia image compression standardsMazin Alwaaly
 
Multimedia fundamental concepts in video
Multimedia fundamental concepts in videoMultimedia fundamental concepts in video
Multimedia fundamental concepts in videoMazin Alwaaly
 

More from Mazin Alwaaly (20)

Pattern recognition voice biometrics
Pattern recognition voice biometricsPattern recognition voice biometrics
Pattern recognition voice biometrics
 
Pattern recognition palm print authentication system
Pattern recognition palm print authentication systemPattern recognition palm print authentication system
Pattern recognition palm print authentication system
 
Pattern recognition on line signature
Pattern recognition on line signaturePattern recognition on line signature
Pattern recognition on line signature
 
Pattern recognition multi biometrics using face and ear
Pattern recognition multi biometrics using face and earPattern recognition multi biometrics using face and ear
Pattern recognition multi biometrics using face and ear
 
Pattern recognition IRIS recognition
Pattern recognition IRIS recognitionPattern recognition IRIS recognition
Pattern recognition IRIS recognition
 
Pattern recognition hand vascular pattern recognition
Pattern recognition hand vascular pattern recognitionPattern recognition hand vascular pattern recognition
Pattern recognition hand vascular pattern recognition
 
Pattern recognition Hand Geometry
Pattern recognition Hand GeometryPattern recognition Hand Geometry
Pattern recognition Hand Geometry
 
Pattern recognition forensic dental identification
Pattern recognition forensic dental identificationPattern recognition forensic dental identification
Pattern recognition forensic dental identification
 
Pattern recognition fingerprints
Pattern recognition fingerprintsPattern recognition fingerprints
Pattern recognition fingerprints
 
Pattern recognition facial recognition
Pattern recognition facial recognitionPattern recognition facial recognition
Pattern recognition facial recognition
 
Pattern recognition ear as a biometric
Pattern recognition ear as a biometricPattern recognition ear as a biometric
Pattern recognition ear as a biometric
 
Pattern recognition 3d face recognition
Pattern recognition 3d face recognitionPattern recognition 3d face recognition
Pattern recognition 3d face recognition
 
Multimedia multimedia over wireless and mobile networks
Multimedia multimedia over wireless and mobile networksMultimedia multimedia over wireless and mobile networks
Multimedia multimedia over wireless and mobile networks
 
Multimedia network services and protocols for multimedia communications
Multimedia network services and protocols for multimedia communicationsMultimedia network services and protocols for multimedia communications
Multimedia network services and protocols for multimedia communications
 
Multimedia content based retrieval in digital libraries
Multimedia content based retrieval in digital librariesMultimedia content based retrieval in digital libraries
Multimedia content based retrieval in digital libraries
 
Multimedia lossy compression algorithms
Multimedia lossy compression algorithmsMultimedia lossy compression algorithms
Multimedia lossy compression algorithms
 
Multimedia lossless compression algorithms
Multimedia lossless compression algorithmsMultimedia lossless compression algorithms
Multimedia lossless compression algorithms
 
Multimedia basic video compression techniques
Multimedia basic video compression techniquesMultimedia basic video compression techniques
Multimedia basic video compression techniques
 
Multimedia image compression standards
Multimedia image compression standardsMultimedia image compression standards
Multimedia image compression standards
 
Multimedia fundamental concepts in video
Multimedia fundamental concepts in videoMultimedia fundamental concepts in video
Multimedia fundamental concepts in video
 

Recently uploaded

Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.aasikanpl
 
TOPIC 8 Temperature and Heat.pdf physics
TOPIC 8 Temperature and Heat.pdf physicsTOPIC 8 Temperature and Heat.pdf physics
TOPIC 8 Temperature and Heat.pdf physicsssuserddc89b
 
Pests of soyabean_Binomics_IdentificationDr.UPR.pdf
Pests of soyabean_Binomics_IdentificationDr.UPR.pdfPests of soyabean_Binomics_IdentificationDr.UPR.pdf
Pests of soyabean_Binomics_IdentificationDr.UPR.pdfPirithiRaju
 
Artificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C PArtificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C PPRINCE C P
 
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptxTHE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptxNandakishor Bhaurao Deshmukh
 
GenBio2 - Lesson 1 - Introduction to Genetics.pptx
GenBio2 - Lesson 1 - Introduction to Genetics.pptxGenBio2 - Lesson 1 - Introduction to Genetics.pptx
GenBio2 - Lesson 1 - Introduction to Genetics.pptxBerniceCayabyab1
 
Twin's paradox experiment is a meassurement of the extra dimensions.pptx
Twin's paradox experiment is a meassurement of the extra dimensions.pptxTwin's paradox experiment is a meassurement of the extra dimensions.pptx
Twin's paradox experiment is a meassurement of the extra dimensions.pptxEran Akiva Sinbar
 
Manassas R - Parkside Middle School 🌎🏫
Manassas R - Parkside Middle School 🌎🏫Manassas R - Parkside Middle School 🌎🏫
Manassas R - Parkside Middle School 🌎🏫qfactory1
 
Bentham & Hooker's Classification. along with the merits and demerits of the ...
Bentham & Hooker's Classification. along with the merits and demerits of the ...Bentham & Hooker's Classification. along with the merits and demerits of the ...
Bentham & Hooker's Classification. along with the merits and demerits of the ...Nistarini College, Purulia (W.B) India
 
Vision and reflection on Mining Software Repositories research in 2024
Vision and reflection on Mining Software Repositories research in 2024Vision and reflection on Mining Software Repositories research in 2024
Vision and reflection on Mining Software Repositories research in 2024AyushiRastogi48
 
Pests of jatropha_Bionomics_identification_Dr.UPR.pdf
Pests of jatropha_Bionomics_identification_Dr.UPR.pdfPests of jatropha_Bionomics_identification_Dr.UPR.pdf
Pests of jatropha_Bionomics_identification_Dr.UPR.pdfPirithiRaju
 
(9818099198) Call Girls In Noida Sector 14 (NOIDA ESCORTS)
(9818099198) Call Girls In Noida Sector 14 (NOIDA ESCORTS)(9818099198) Call Girls In Noida Sector 14 (NOIDA ESCORTS)
(9818099198) Call Girls In Noida Sector 14 (NOIDA ESCORTS)riyaescorts54
 
Solution chemistry, Moral and Normal solutions
Solution chemistry, Moral and Normal solutionsSolution chemistry, Moral and Normal solutions
Solution chemistry, Moral and Normal solutionsHajira Mahmood
 
Scheme-of-Work-Science-Stage-4 cambridge science.docx
Scheme-of-Work-Science-Stage-4 cambridge science.docxScheme-of-Work-Science-Stage-4 cambridge science.docx
Scheme-of-Work-Science-Stage-4 cambridge science.docxyaramohamed343013
 
Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCR
Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCRCall Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCR
Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCRlizamodels9
 
OECD bibliometric indicators: Selected highlights, April 2024
OECD bibliometric indicators: Selected highlights, April 2024OECD bibliometric indicators: Selected highlights, April 2024
OECD bibliometric indicators: Selected highlights, April 2024innovationoecd
 
Harmful and Useful Microorganisms Presentation
Harmful and Useful Microorganisms PresentationHarmful and Useful Microorganisms Presentation
Harmful and Useful Microorganisms Presentationtahreemzahra82
 
‏‏VIRUS - 123455555555555555555555555555555555555555
‏‏VIRUS -  123455555555555555555555555555555555555555‏‏VIRUS -  123455555555555555555555555555555555555555
‏‏VIRUS - 123455555555555555555555555555555555555555kikilily0909
 
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝soniya singh
 

Recently uploaded (20)

Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
 
TOPIC 8 Temperature and Heat.pdf physics
TOPIC 8 Temperature and Heat.pdf physicsTOPIC 8 Temperature and Heat.pdf physics
TOPIC 8 Temperature and Heat.pdf physics
 
Pests of soyabean_Binomics_IdentificationDr.UPR.pdf
Pests of soyabean_Binomics_IdentificationDr.UPR.pdfPests of soyabean_Binomics_IdentificationDr.UPR.pdf
Pests of soyabean_Binomics_IdentificationDr.UPR.pdf
 
Artificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C PArtificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C P
 
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptxTHE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
 
GenBio2 - Lesson 1 - Introduction to Genetics.pptx
GenBio2 - Lesson 1 - Introduction to Genetics.pptxGenBio2 - Lesson 1 - Introduction to Genetics.pptx
GenBio2 - Lesson 1 - Introduction to Genetics.pptx
 
Engler and Prantl system of classification in plant taxonomy
Engler and Prantl system of classification in plant taxonomyEngler and Prantl system of classification in plant taxonomy
Engler and Prantl system of classification in plant taxonomy
 
Twin's paradox experiment is a meassurement of the extra dimensions.pptx
Twin's paradox experiment is a meassurement of the extra dimensions.pptxTwin's paradox experiment is a meassurement of the extra dimensions.pptx
Twin's paradox experiment is a meassurement of the extra dimensions.pptx
 
Manassas R - Parkside Middle School 🌎🏫
Manassas R - Parkside Middle School 🌎🏫Manassas R - Parkside Middle School 🌎🏫
Manassas R - Parkside Middle School 🌎🏫
 
Bentham & Hooker's Classification. along with the merits and demerits of the ...
Bentham & Hooker's Classification. along with the merits and demerits of the ...Bentham & Hooker's Classification. along with the merits and demerits of the ...
Bentham & Hooker's Classification. along with the merits and demerits of the ...
 
Vision and reflection on Mining Software Repositories research in 2024
Vision and reflection on Mining Software Repositories research in 2024Vision and reflection on Mining Software Repositories research in 2024
Vision and reflection on Mining Software Repositories research in 2024
 
Pests of jatropha_Bionomics_identification_Dr.UPR.pdf
Pests of jatropha_Bionomics_identification_Dr.UPR.pdfPests of jatropha_Bionomics_identification_Dr.UPR.pdf
Pests of jatropha_Bionomics_identification_Dr.UPR.pdf
 
(9818099198) Call Girls In Noida Sector 14 (NOIDA ESCORTS)
(9818099198) Call Girls In Noida Sector 14 (NOIDA ESCORTS)(9818099198) Call Girls In Noida Sector 14 (NOIDA ESCORTS)
(9818099198) Call Girls In Noida Sector 14 (NOIDA ESCORTS)
 
Solution chemistry, Moral and Normal solutions
Solution chemistry, Moral and Normal solutionsSolution chemistry, Moral and Normal solutions
Solution chemistry, Moral and Normal solutions
 
Scheme-of-Work-Science-Stage-4 cambridge science.docx
Scheme-of-Work-Science-Stage-4 cambridge science.docxScheme-of-Work-Science-Stage-4 cambridge science.docx
Scheme-of-Work-Science-Stage-4 cambridge science.docx
 
Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCR
Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCRCall Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCR
Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCR
 
OECD bibliometric indicators: Selected highlights, April 2024
OECD bibliometric indicators: Selected highlights, April 2024OECD bibliometric indicators: Selected highlights, April 2024
OECD bibliometric indicators: Selected highlights, April 2024
 
Harmful and Useful Microorganisms Presentation
Harmful and Useful Microorganisms PresentationHarmful and Useful Microorganisms Presentation
Harmful and Useful Microorganisms Presentation
 
‏‏VIRUS - 123455555555555555555555555555555555555555
‏‏VIRUS -  123455555555555555555555555555555555555555‏‏VIRUS -  123455555555555555555555555555555555555555
‏‏VIRUS - 123455555555555555555555555555555555555555
 
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
 

Computer architecture instruction formats

  • 2. Outline Instruction Formats Pentium Instruction Format Type of address instruction Instruction Set Architecture ISA
  • 3. Introduction  An instruction format or instruction code is a group of bits used to perform a particular operation on the data stored in computer  Processor fetches an instruction from memory and decodes the bits to execute the instruction.  Different computer may have their own instruction set .  The operation of the processor is determined by the instructions it executes, referred to as machine instructions or computer instructions  The collection of different instructions that the processor can execute is referred to as the processor’s instruction set  Each instruction must contain the information required by the processor for execution
  • 4. Elements of a Machine Instruction Operation code (opcode) Specifies the operation to be performed. The operation is specified by a binary code, known as the operation code, opcode do ADD, SUB,DIV,LOAD,... Source operand reference The operation may involve one or more source operands, that is, operands that are inputs for the operation Result operand reference The operation may produce a result Next instruction reference This tells the processor where to fetch the next instruction after the execution of this instruction is complete
  • 6. Source and result operands can be in one of four areas: 1) Main memory or virtual memory  As with next instruction references, the main or virtual memory address must be supplied. 2) I/O devices  The instruction must specify the I/O module and device for the operation. If memory-mapped I/O is used, this is just another main or virtual memory address. 3) Processor register  A processor contains one or more registers that may be referenced by machine instructions.  If more than one register exists each register is assigned a unique name or number and the instruction must contain the number of the desired register 4) Immediate  The value of the operand is contained in a field in the instruction being executed
  • 7. Types of Operand Addresses: immediate, direct, indirect, stack Numbers: integer or fixed point (binary, twos complement), floating point (sign, exponent), (packed) decimal (246 = 0000 0010 0100 0110) Characters: ASCII (128 printable and control characters + bit for error detection) Logical Data: bits or flags, e.g., Boolean 0 and 1
  • 8. Instruction Representation Within the computer each instruction is represented by a sequence of bits The instruction is divided into fields, corresponding to the constituent elements of the instruction
  • 9. Instruction Types A computer should have a set of instructions that allows the user to formulate any data processing task.. Any program written in a high- level language must be translated into machine language to be executed, so we can categorize instruction types as follows: Data processing: Arithmetic instructions provide computational capabilities for processing numeric data Data storage: Movement of data into or out of register and or memory locations Data movement :I /O instructions are needed to transfer programs and data into memory and the results of computations back out to the user Control: test instruction test the value of a data word or the status of a computation Branch instruction used to branch to a different set of instructions depending on the decision made
  • 10. Instruction Formats Layout of bits in an instruction Includes opcode Includes (implicit or explicit) operand(s) Usually more than one instruction format in an instruction set Instruction Length Affected by and affects: Memory size Memory organization - addressing Bus structure, e.g., width CPU complexity CPU speed  Trade off between powerful instruction repertoire and saving space
  • 11. Allocation of Bits Number of addressing modes: implicit or additional bits specifying it Number of operands Register (faster, limited size and number, 32) versus memory Number of register sets, e.g., data and address (shorter addresses) Address range Address granularity (e.g., by byte) Number of Addresses  More addresses 1-More complex instructions 2-More registers - inter-register operations are quicker 3-Less instructions per program  Fewer addresses 1-Less complex instructions 2-More instructions per program, e.g. data movement 3-Faster fetch/execution of instructions
  • 12. Pentium Instruction Format Pentium uses a variable length instruction format. The Pentium instruction can be from 2 to 16 bytes long. The Instruction is broken down into 6 sections 1-Instruction Prefixes 2-Opcode 3-Mod R/M 4-SIB 5-Displacement 6-Immediate
  • 13. 1.Instruction Prefixes 2 .Opcode Instruction Prefix:used in multiprocessor enviroments, specifically with strings Segment Override: This specifies which segment-register to use, if not the default. Operand Size: The operand size can be either 16 or 32 bits, this specifies which is being used. Address Size: The Pentium can use a 16 or 32 bit address, this specifies which is being used. The opcode can be either one or two bytes. The opcode can also specify if the data is 16 or 32 bit. The opcode specifies which way the data is going (to or from memory). The opcode specifies if an immediate value is signed or not.
  • 14.  Mod R/M :specifies addressing information. It specifies whether an operand is in a register or in memory.  The Mod and R/M fields are combined to form the means in which the memory is indexed.  The Reg/Opcode specifies either the register being used or 3 bits for more opcode.  The SIB field is used with the Mod R/M field for the addressing mode.  The scale field specifies the factor for scaled indexing.  The index field specifies the register for indexing.  The Base field specifies the base register for addressing. 3.Mod R/M 4.SIB
  • 15. 5.Displacement Displacement: If the addressing mode uses displacement the displacement field is used. It can hold an 8, 16, or 32 bit signed integer for displacement. Immediate: This is where an immediate value is stored if one is used. It can hold an 8, 16, or 32 bit operand.
  • 16. Pentium Instructions  Traditional Instructions Add, sub, add w/carry, sub w/carry, mul, div BCD arithmetic, Booleans, shifts/rotates, string ops Loops, conditionals, condition code setting, subroutines  MMX / SSE /SSE2 Extensions to the instruction set for parallel SIMD operations on packed data Designed to speed up multimedia and communication applications Š graphics and image processing Švideo and audio processing Š speech compression and recognition SIMD – Single Instruction Multiple Data stream „  MMX – Multimedia Extensions :64-bit„  SSE – Streaming SIMD Extension:128-bit  SSE2 – Streaming SIMD Extension 2 :128-bit  Example applications Subtracting one image from another for overlaying Unpacking a compressed image (JPEG, MPEG, etc)
  • 17. Type of address instruction 1) Three address instructions Operation , Result ,Operand1 ,Operand2 Computer with three address instructions formats can use each address field to specify either a processor register or a memory operand . X= (A+B)*(C+D) is shown below Add R1,A,B Add R2,C,D Mul X,R1,R2 Needs very long words to hold everything It is assumed that the computer has two processor registers R1 andR2 The advantage of three address format is that it results in short programs when evaluating arithmetic expression . The disadvantage is the binary coded instructions require too many bits to specify
  • 18. 2) Two address instructions One address doubles as operand and result Most common in commercial in computers . Each address field can specify either a processes register on a memory word X= (A+B)*(C+D) MOV R1, A ADD R1, B MOV R2 ,C ADD R2 , D MUL R1 ,R2 MOV X1 ,R1 Reduces length of instruction Requires some extra work , temporary storage  MOV instruction moves or transfers the operand to and from memory and processor registers.  First symbol listed in an instruction is assumed to be both a source and destination .
  • 19. 3) One address instructions  One address instruction use un implied accumulator (AC) register for all data manipulation now we see the same example X= (A+B)*(C+D) LOAD A ADD B STORE T LOAD C ADD D MUL T STORE X  All operation are done between the AC register and a memory operand  T is the address of a temporary memory location for storing intermediate result
  • 20. 4) Zero address instruction All addresses implicit, e.g. ADD Uses a stack, e.g. pop a, pop b PUSH A Push b ADD PUSH C PUSH D ADD MUL POP X
  • 22. Instruction Set Architecture ISA  Is the structure of a computer that a machine language programmer must understand to write a correct (timing independent) program for that machine.  Is the set of processor design techniques used to implement the instruction work flow on hardware.  ISA tell you that how your processor going to process your program instructions. From the architecture point of view, the microprocessor chips can be classified into two categories: 1-Complex Instruction Set Computer(CISC) . 2-Reduce Instruction Set Computers (RISC) . In either case, the objective is to improve system
  • 23. 1) Complex Instruction Set computer (CISC) Computer with large number of instruction is called CISC it is mostly used in scientific computing applications requiring a lots of floating point arithmetic The essential goal of CISC architecture is to attempt to provide a single machine instruction for each statement that is written in a high-level language. Provide a complex instruction set is the desire to simplify the compilation and improve the overall computer performance. Examples of CISC architecture are the DEC VAX computer and the IBM 370 computer. Other are 8085, 8086, 80x86 etc.
  • 24. The major characteristics of CISC architecture A large number of instructions– typically from 100 to 250 instructions Some instructions that perform specialized tasks and are used infrequently A large variety of addressing modes—typically from 5 to 20 different modes  Variable-length instruction formats Instructions that manipulate operands in memory  Reduced speed due to memory read/write operations  Use of micro program – special program in control memory of a computer to perform the timing and sequencing of the micro operations fetch, decode, execute etc.  Major complexity in the design of micro program  No large number of registers – single register set of general purpose and low cost
  • 25. 2) Reduced Instruction Set Computers (RISC)  A computer with few and simple construction . RISC architecture is simple and efficient . RISC concept – an attempt to reduce the execution cycle by simplifying the instruction set Small set of instructions – mostly register to register operations and simple load/store operations for memory access  Each operand – brought into register using load instruction, computations are done among data in registers and results transferred to memory using store instruction Simplify instruction set and encourages the optimization of register manipulation  May include immediate operands, relative mode etc .
  • 26. The major characteristics of RISC architecture  Relatively few instructions  Relatively few addressing modes  Memory access limited to load and store instructions  All operations done within the registers of the CPU  Fixed-length, easily decoded instruction format  Single-cycle instruction execution  Hardwired rather than micro programmed control Superscalar and out-of-order execution Large number of registers Fast floating point performance Larger Cache.
  • 27. Comparison between RISC and CISC Architectures CISCRISCS.N. Complex instructions taking multiple cycles Simple instructions taking one cycle1 Any instructions may reference memoryOnly load and store memory references2 Not/less pipelinedHeavily pipelined3 Single register setMultiple register sets4 Complexity is in micro-programmingComplexity is in compiler5 Instructions interpreted by micro- programming Instructions executed by hardware6 Variable format instructionsFixed format instructions7 Large instructions and modesFew instructions and modes8
  • 28. Table below shows some examples of CISC and RISC processors The two architectures, CISC and RISC, can be compared based on 1- instruction set 2-studying the available addressing modes 3-the integer and floating point units RISC ProcessorCISC Processor MIPS R2000IBM 370/168 SUN SPARSVAX 11/780 INTEL I 860MICROVAX II MOTORLA 8800INTEL 80286 POWERPC 601INTEL 80386 IBM RS/6000SUN-3/75 MIPS R4000PDP-11 Intel x86/ pentium
  • 29. Pentium 4 microinstructions  Embeds a RISC architecture and pipelining within a CISC instruction set  Instructions fetched to CPU Translated into internal RISC-style “microinstructions” Microinstructions are stored in the level 0 instruction cache CPU execution logic executes microinstructions in a pipelined fashion  Retains compatibility with old Pentium and x86 code while achieving RISC-like performance
  • 30. Intel x86 Processor-CISC or RISC or both Now we are into the post-RISC era, where processors have the advantages of both RISC and CISC architecture. The gap between RISC and CISC has blurred significantly, longer relevant. Intel’s Pentium Core 2 Duo processor can execute more than one CISC instruction per clock cycle due to increased processing speed. This speed advantage would enable CISC instructions to be pipelined. On the other hand, RISC instructions are also becoming complex (CISC-like) to take advantage of increased processing speed.  RISC processors also use complicated hardware for superscalar execution. So at present, classifying a processor as RISC or CISC is almost impossible, because their instructions sets all look similar.

Editor's Notes

  1. 14
  2. 7