SlideShare a Scribd company logo
1 of 19
Download to read offline
5- Computer Architecture
Structure of instruction
• Structure
– The task to be carried out by the processor
– The address or addresses in memory where the operand or operands
would be found.
– The address in memory where the result is to be stored.
– The address in memory where next instruction to be carried out is stored.
• Types of instruction
– 4-Address instruction
– 3-Address instruction
– 2- Address instruction
– 1- Address instruction
– 0- Address instruction
ADD P Q R S
What task?
(Operation
code)
Address of first
operand
Address of
second
operand
Address of
result
Address where
next instruction
would be found
Cont…
• 4- Address instruction
– The instruction in which four operands are there is called 4- address
instruction.
– Ex:-
– ADD a b c d
– MUL x y z q
• 3- Address instruction
– The instruction in which three operands are there is called 3- address
instruction.
– Ex:-
– ADD a b c
– SUB x y z
• 2- Address instruction
– The instruction in which two address are there is called 2- address instruction.
– Ex:-
– MOV a b
Cont…
• 1- Address instruction
– The instruction in which 1 operand is there is called 1 –address instruction.
– Ex:-
– MOV a
– READ a
• 0- Address instruction
– The instruction in which no operand is specified is called 0-address instruction.
– Ex-
PUSH a
PUSH a
ADD
PUSH c
Cont…
• If a processor has 16 different operation than 12 bits are needed to represent each
address so 12 bits are needed to represent each address.
• If length of an operand equals length of an instruction then the instruction and the
operand are said to occupy one word on computer’s memory such computer is
known as word addressable computer.
• A computer in which each byte stored can be addressed individually is known as
byte addressable computer.
Operation code Operand address
-----4-bits---- -------------------12-bits------------------
Description of Processor
• The processor of hypothetical computer which is known as HYPCOM. Reason
behind use of hypothetical computer is that it is easy to explain fundamental ideas
with a simple model. Real computers are too complex.
• The processor of HYPCOM has an accumulator register (ACC), instruction register
(IR), program counter register(PC).
• IR is used to temporarily store the instruction being executed. It has two parts: an
operation code part and address part.
• PC register stores the address of the next instruction to be executed.
• Other specification of HYPCOM are:
– It has 4K word addressable memory.
– A word of HYPCOM is 16 bits long.
– A word of HYPCOM stores either an instruction or data to be processed.
– It has 15 operations code.
– The instructions are single address instructions. 4 bits are needed to represent
15 operations. 12 bits are needed to store address in memory so instruction is
of 16 bits.
– It has an input unit which is used to give both instruction and data. For read
via input unit and store it in memory READ operation code is executed.
– It has a printer as its output unit which is used to output word when PRINT
operation is executed.
Cont…
Cont…
• Operation codes of HYPCOM processor.
Operation Code
(Hexadecimal)
Mnemonic
used
Meaning
1 CLA Clear ACC and place contents of specified memory
address in it.
2 ADD Add to ACC contents of specified address
3 SUB Subtract from ACC contents from specified address
4 MUL Multiply contents of ACC by contents of specified address
5 DIV Divide contents of ACC by content of specified address
and leave integer quotient in ACC
6 STO Store content of ACC in specified address in memory
7 JMP Take next instruction from given address of memory
8 JNE Take next instruction from given address if ACC<0 else
next instruction from address given in PC.
9 JZE Take next instruction from given address if ACC=0 else
next instruction from address given in PC
Cont…
Operation Code
(Hexadecimal)
Mnemonic
used
Meaning
A READ Input into specified address in memory data read from
input unit.
B PRINT Print data retrieved from the specified address in
memory
C SHR Shift content of ACC right by 8 bits
D COM Complement content of ACC
E EOR EX-OR operation. Match each bit of ACC with each bit
of content of specified address. If bits are identical
make the bit of ACC=0 else that bit in ACC=1
F HLT Halt computation
Cont…
• Opcode may be grouped by as follows:
– Data movement operation
CLA, STO
– Arithmetic operations
ADD, SUB, MUL, DIV
– Control operations
JMP, JNE, JZE, HLT
– Input/output operations
READ, PRINT
– Logical operation
SHT, COM, EOR
Interconnection Unit
• A set of wires which carries a group of bits in parallel is known as a bus.
• A bus which carries a word to or from memory is known as a Data bus. Its width is
equal to length of word.
• To retrieve a word from memory it is necessary to specify its address that address
is carried out by a Memory address bus whose width equals the number of bits in
MAR.
• Besides buses to carry address and data we also need control signals between the
units of a computer. Control signal issued by the processor to memory to READ or
WRITE and to I/O units to START or STOP a unit are carried by a control bus.
• A system bus is consist of a data bus, a memory address bus and control bus.
Cont…
• One method of connecting I/O units to the computers to connect them to the
processor via bus, it consist of a bus called DAB which specifying the addresses of
the I/O units.
• Data bus carrying a word from the addressed input unit to the processor or
carrying a word from the processor to the addressed output unit.
• Control bus carries command such as READ, WRITE, START, STOP from the
processor to I/O units. It also carries I/O unit’s status information to the processor.
• All data will be first taken to a processor register from the input unit and from
there to the memory is known as program controlled transfer.
• The interconnection of I/O units, processor and memory using two independent
system buses is known as a two bus interconnection structure.
• I/O devices are connected to a special interface logic known as Direct Memory
Access logic (DMA). It is also two bus structure. One bus connects the processor to
the memory other bus instead of connecting I/O units to the processor, connects
them directly to memory.
• Another popular method of interconnecting units is through the use of single bus
which is known as unibus system.
• In this case, the bus is shared by the three units and thus transfer of data can take
place only between two of the three unit at a time.
Cont…
• If the processor and an I/O unit want to use the bus at same time, only one can be
granted the bus. This decision is made by a circuit known as a bus arbitration unit.
• I/O units are given preference over the processor because I/O units have moving
parts which cannot be suddenly and if bus is not granted data may be lost.
• Main advantage of single bus system is the addressing of I/O units. These units use
the same memory address space.
• A READ instruction with an address corresponding to an input device will read data
from that device.
• It is easy to add new device as no new instructions specific to the device would be
required.
• This single bus is called the PC system bus or ISA (Industry Standard Architecture)
bus.
Processor to memory communication
• Following are steps for transfer data from memory to the processor
– Step 1- the processor places the address in MAR via the memory address bus.
– Step 2- the processor issues a READ command via the control bus.
– Step 3- the memory places the retrieved data in MDR and transfers it via the
data bus to the processor. Based on the read time of memory, a specific
number of processor clock intervals are allotted for completion of this
operation. During this period, the processor is forced to wait.
• For writing in memory
– The processor places the address in MAR via the memory address bus.
– The processor transmits the data to be written in memory via data bus to
MDR.
– The processor issues a WRITE command to memory via the control bus.
– The data in MDR is written in memory in the address specified in MAR.
• Main problem is mismatch between speed of processor and memory.
• This speed mismatch is alleviated by using small fast memory as an intermediate
buffer between the main memory and the processor it is known as a catch
memory.
• It is fabricated using high speed semiconductor device. Effective cycle time of catch
would be about a tenth of the main memory cycle time and its cost about 10 times
cost per byte of main memory.
Cont…
• Most program execute instructions in the order in which they are written is called
spatial locality of reference of instruction in a program.
• Instruction is executed there is a likelihood of the same instruction being executed
again soon is called temporal locality.
• Locality of reference is main feature which makes the use of a catch memory
effective in alleviating the speed mismatch between the main memory and
processor.
• It have two cache: Instruction cache, data cache( both are of equal size and small
compared to main memory)(size cache 64KB and main memory 64 MB)
• Block of instruction is copied in the cache memory from the main memory and
data are copied into the instruction cache and data cache respectively.
• JMP
• The block of instructions/data fetched from main memory for the storage in cache
is known as cache line. It is normally order of 16 to 64 bytes.
• There are two level hierarchy of caches.
– L1 cache
– L2 cache
• L1 cache
– First level cache is fabricated as a part of the CPU chip.
– It is known as on-chip cache or L1 cache.
Cont…
– The time to access a byte from L1 cache is very low. As the area of CPU is
limited the size of L1 cache is small (between 16 to 64KB).
– L1 cache itself divide into an instruction cache and data cache.
• L2 cache
– Second level cache is outside the CPU chip. It is called L2 cache.
– It uses SRAM which is faster then DRAM.
– Access time of L2 cache is larger than L1 cache. Size is of 256 KB to 512 KB and
access time is few nanosecond.
• Data first move from main memory to L2 cache and from there to L1 cache.
RISC and CISC
• CISC
– Goal of CPU designer to provide more and more instruction in the instruction
set of a CPU to ensure that the CPU supports more functions directly.
– It makes easier to translate high-level language program to machine language
and ensure that the machine language programs run more effectively.
– Another goal of CPU designers was to optimize the usage of expensive
memory, to achieve this the designers tries to pack more instructions in
memory by introducing the concept of variable-length instructions such as
half-word.
– CPUs with large instruction set, variable-length instructions, and a variety of
addressing modes are said to be CISC (Complex Instruction Set Computer)
architecture.
– It makes the job of machine language programmer’s easier.
• RISC
– In 1980s CPU designers realize that many instruction supported by CISC based
are rarely used.
– Complexity of CPU can be reduce by implementing only basic set of instruction
and some of the more frequently used instructions in hardware.
– Other complex instruction can be designed using this simple set of
instructions.
Cont…
– So decoding and execution becomes simple and fast. If the instructions are
designed in such a way that they retrieve operands stored in register in CPU
rather than from memory. This ideas have been used in designing Reduced
Instruction Set Computer (RISC).
– General steps for design RISC instructions:
1. Reduce number of instructions make them of equal length. Reduce
addressing modes. These makes decoding instructions easy. The decoding
instructions can be integrated as a part of CPU. This will enable instructions to
be decoded fast.
2. Reduce references to memory to retrieve operands. This is achieved by
increasing the general purpose registers in CPU. Operands and intermediate
results are stored in these registers. Usually 32 to 256 registers are provided
in the CPU of RISC. Only two instructions refer to the memory. First is load an
operand from memory into a register and second store result to memory. So
RISC sometimes called Load-store architecture.
3. Instructions to be executed in following steps:
I. Fetch instructions from memory.
II. Decode instructions to determine what is to be done.
III. Fetch the operand from register.
IV. Execute the instruction
V. Store the result in register.
Cont…
• Operands and results are stored in CPU and decoding circuit is simple then each
step takes about the same time. This allows overlapping of various stage of
instruction fetching and execution . When series of instructions are retrieved from
memory is called pipelining.
• One feature of RISC architecture is single cycle execution of most instruction.

More Related Content

What's hot

Unit 5 lect-3-multiprocessor
Unit 5 lect-3-multiprocessorUnit 5 lect-3-multiprocessor
Unit 5 lect-3-multiprocessorvishal choudhary
 
Data Manipulation
Data ManipulationData Manipulation
Data ManipulationAsfi Bhai
 
COMPUTER ORGNAIZATION NOTES
COMPUTER ORGNAIZATION NOTESCOMPUTER ORGNAIZATION NOTES
COMPUTER ORGNAIZATION NOTESDr.MAYA NAYAK
 
Computer organiztion5
Computer organiztion5Computer organiztion5
Computer organiztion5Umang Gupta
 
Computer System Architecture
Computer System ArchitectureComputer System Architecture
Computer System ArchitectureBrenda Debra
 
COMPUTER ORGANIZATION NOTES Unit 3 4
COMPUTER ORGANIZATION NOTES  Unit 3 4COMPUTER ORGANIZATION NOTES  Unit 3 4
COMPUTER ORGANIZATION NOTES Unit 3 4Dr.MAYA NAYAK
 
Процессорын архитектур
Процессорын архитектурПроцессорын архитектур
Процессорын архитектурMuuluu
 
B.sc cs-ii-u-2.2-overview of register transfer, micro operations and basic co...
B.sc cs-ii-u-2.2-overview of register transfer, micro operations and basic co...B.sc cs-ii-u-2.2-overview of register transfer, micro operations and basic co...
B.sc cs-ii-u-2.2-overview of register transfer, micro operations and basic co...Rai University
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAAiman Hud
 
COMPUTER ORGANIZATION NOTES Unit 5
COMPUTER ORGANIZATION NOTES Unit 5COMPUTER ORGANIZATION NOTES Unit 5
COMPUTER ORGANIZATION NOTES Unit 5Dr.MAYA NAYAK
 

What's hot (18)

Processor Basics
Processor BasicsProcessor Basics
Processor Basics
 
Chapter 4
Chapter 4Chapter 4
Chapter 4
 
Data Manipulation
Data ManipulationData Manipulation
Data Manipulation
 
Unit 5 lect-3-multiprocessor
Unit 5 lect-3-multiprocessorUnit 5 lect-3-multiprocessor
Unit 5 lect-3-multiprocessor
 
Data Manipulation
Data ManipulationData Manipulation
Data Manipulation
 
COMPUTER ORGNAIZATION NOTES
COMPUTER ORGNAIZATION NOTESCOMPUTER ORGNAIZATION NOTES
COMPUTER ORGNAIZATION NOTES
 
Computer organiztion5
Computer organiztion5Computer organiztion5
Computer organiztion5
 
Computer System Architecture
Computer System ArchitectureComputer System Architecture
Computer System Architecture
 
Chapter 2
Chapter 2Chapter 2
Chapter 2
 
DMA
DMADMA
DMA
 
COMPUTER ORGANIZATION NOTES Unit 3 4
COMPUTER ORGANIZATION NOTES  Unit 3 4COMPUTER ORGANIZATION NOTES  Unit 3 4
COMPUTER ORGANIZATION NOTES Unit 3 4
 
Процессорын архитектур
Процессорын архитектурПроцессорын архитектур
Процессорын архитектур
 
B.sc cs-ii-u-2.2-overview of register transfer, micro operations and basic co...
B.sc cs-ii-u-2.2-overview of register transfer, micro operations and basic co...B.sc cs-ii-u-2.2-overview of register transfer, micro operations and basic co...
B.sc cs-ii-u-2.2-overview of register transfer, micro operations and basic co...
 
Chapter 7
Chapter 7Chapter 7
Chapter 7
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
 
COMPUTER ORGANIZATION NOTES Unit 5
COMPUTER ORGANIZATION NOTES Unit 5COMPUTER ORGANIZATION NOTES Unit 5
COMPUTER ORGANIZATION NOTES Unit 5
 
Ec305.13 buses mgl
Ec305.13 buses mglEc305.13 buses mgl
Ec305.13 buses mgl
 
03 Buses
03 Buses03 Buses
03 Buses
 

Similar to Computer Architecture Instruction Structure

Computer Organization and Design.pptx
Computer Organization and Design.pptxComputer Organization and Design.pptx
Computer Organization and Design.pptxSherinRappai
 
Hcs Topic 2 Computer Structure V2
Hcs Topic 2  Computer Structure V2Hcs Topic 2  Computer Structure V2
Hcs Topic 2 Computer Structure V2Kyle
 
Bindura university of science education
Bindura university of science educationBindura university of science education
Bindura university of science educationInnocent Tauzeni
 
Memory organization
Memory organizationMemory organization
Memory organizationishapadhy
 
Computer structurepowerpoint
Computer structurepowerpointComputer structurepowerpoint
Computer structurepowerpointhamid ali
 
Computer organisation and architecture module 1
Computer organisation and architecture module 1Computer organisation and architecture module 1
Computer organisation and architecture module 1abinrj123
 
Unit 1. introduction
Unit 1. introductionUnit 1. introduction
Unit 1. introductionKiran Bagale
 
Computer Structure Slides
Computer Structure SlidesComputer Structure Slides
Computer Structure Slidesiarthur
 
HHCJ AMUMARA:COMPUTER STUDIES LECTURE NOTE FOR SS3:005
HHCJ AMUMARA:COMPUTER STUDIES LECTURE NOTE FOR SS3:005HHCJ AMUMARA:COMPUTER STUDIES LECTURE NOTE FOR SS3:005
HHCJ AMUMARA:COMPUTER STUDIES LECTURE NOTE FOR SS3:005SOLOMONCHINAEMEUCHEA
 
Basic Structure of Computers: Functional Units, Basic Operational Concepts, B...
Basic Structure of Computers: Functional Units, Basic Operational Concepts, B...Basic Structure of Computers: Functional Units, Basic Operational Concepts, B...
Basic Structure of Computers: Functional Units, Basic Operational Concepts, B...Abhishekn84
 
Unit-1_Digital Computers, number systemCOA[1].pptx
Unit-1_Digital Computers, number systemCOA[1].pptxUnit-1_Digital Computers, number systemCOA[1].pptx
Unit-1_Digital Computers, number systemCOA[1].pptxVanshJain322212
 
4.1 Introduction 145• In this section, we first take a gander at a.pdf
4.1 Introduction 145• In this section, we first take a gander at a.pdf4.1 Introduction 145• In this section, we first take a gander at a.pdf
4.1 Introduction 145• In this section, we first take a gander at a.pdfarpowersarps
 

Similar to Computer Architecture Instruction Structure (20)

Computer Organization and Design.pptx
Computer Organization and Design.pptxComputer Organization and Design.pptx
Computer Organization and Design.pptx
 
Hcs Topic 2 Computer Structure V2
Hcs Topic 2  Computer Structure V2Hcs Topic 2  Computer Structure V2
Hcs Topic 2 Computer Structure V2
 
Unit I.pptx
Unit I.pptxUnit I.pptx
Unit I.pptx
 
Microprocessor
MicroprocessorMicroprocessor
Microprocessor
 
Bindura university of science education
Bindura university of science educationBindura university of science education
Bindura university of science education
 
CPU.ppd
CPU.ppdCPU.ppd
CPU.ppd
 
Memory organization
Memory organizationMemory organization
Memory organization
 
COA (Unit_4.pptx)
COA (Unit_4.pptx)COA (Unit_4.pptx)
COA (Unit_4.pptx)
 
Computer structurepowerpoint
Computer structurepowerpointComputer structurepowerpoint
Computer structurepowerpoint
 
Computer organisation and architecture module 1
Computer organisation and architecture module 1Computer organisation and architecture module 1
Computer organisation and architecture module 1
 
Unit 1. introduction
Unit 1. introductionUnit 1. introduction
Unit 1. introduction
 
Cpu & its execution of instruction
Cpu & its execution of instructionCpu & its execution of instruction
Cpu & its execution of instruction
 
Computer Structure Slides
Computer Structure SlidesComputer Structure Slides
Computer Structure Slides
 
E.s unit 4 and 5
E.s unit 4 and 5E.s unit 4 and 5
E.s unit 4 and 5
 
Bc0040
Bc0040Bc0040
Bc0040
 
HHCJ AMUMARA:COMPUTER STUDIES LECTURE NOTE FOR SS3:005
HHCJ AMUMARA:COMPUTER STUDIES LECTURE NOTE FOR SS3:005HHCJ AMUMARA:COMPUTER STUDIES LECTURE NOTE FOR SS3:005
HHCJ AMUMARA:COMPUTER STUDIES LECTURE NOTE FOR SS3:005
 
Chap 3 CA.pptx
Chap 3 CA.pptxChap 3 CA.pptx
Chap 3 CA.pptx
 
Basic Structure of Computers: Functional Units, Basic Operational Concepts, B...
Basic Structure of Computers: Functional Units, Basic Operational Concepts, B...Basic Structure of Computers: Functional Units, Basic Operational Concepts, B...
Basic Structure of Computers: Functional Units, Basic Operational Concepts, B...
 
Unit-1_Digital Computers, number systemCOA[1].pptx
Unit-1_Digital Computers, number systemCOA[1].pptxUnit-1_Digital Computers, number systemCOA[1].pptx
Unit-1_Digital Computers, number systemCOA[1].pptx
 
4.1 Introduction 145• In this section, we first take a gander at a.pdf
4.1 Introduction 145• In this section, we first take a gander at a.pdf4.1 Introduction 145• In this section, we first take a gander at a.pdf
4.1 Introduction 145• In this section, we first take a gander at a.pdf
 

Recently uploaded

18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupJonathanParaisoCruz
 

Recently uploaded (20)

18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized Group
 

Computer Architecture Instruction Structure

  • 2. Structure of instruction • Structure – The task to be carried out by the processor – The address or addresses in memory where the operand or operands would be found. – The address in memory where the result is to be stored. – The address in memory where next instruction to be carried out is stored. • Types of instruction – 4-Address instruction – 3-Address instruction – 2- Address instruction – 1- Address instruction – 0- Address instruction ADD P Q R S What task? (Operation code) Address of first operand Address of second operand Address of result Address where next instruction would be found
  • 3. Cont… • 4- Address instruction – The instruction in which four operands are there is called 4- address instruction. – Ex:- – ADD a b c d – MUL x y z q • 3- Address instruction – The instruction in which three operands are there is called 3- address instruction. – Ex:- – ADD a b c – SUB x y z • 2- Address instruction – The instruction in which two address are there is called 2- address instruction. – Ex:- – MOV a b
  • 4. Cont… • 1- Address instruction – The instruction in which 1 operand is there is called 1 –address instruction. – Ex:- – MOV a – READ a • 0- Address instruction – The instruction in which no operand is specified is called 0-address instruction. – Ex- PUSH a PUSH a ADD PUSH c
  • 5. Cont… • If a processor has 16 different operation than 12 bits are needed to represent each address so 12 bits are needed to represent each address. • If length of an operand equals length of an instruction then the instruction and the operand are said to occupy one word on computer’s memory such computer is known as word addressable computer. • A computer in which each byte stored can be addressed individually is known as byte addressable computer. Operation code Operand address -----4-bits---- -------------------12-bits------------------
  • 6. Description of Processor • The processor of hypothetical computer which is known as HYPCOM. Reason behind use of hypothetical computer is that it is easy to explain fundamental ideas with a simple model. Real computers are too complex. • The processor of HYPCOM has an accumulator register (ACC), instruction register (IR), program counter register(PC). • IR is used to temporarily store the instruction being executed. It has two parts: an operation code part and address part. • PC register stores the address of the next instruction to be executed. • Other specification of HYPCOM are: – It has 4K word addressable memory. – A word of HYPCOM is 16 bits long. – A word of HYPCOM stores either an instruction or data to be processed. – It has 15 operations code. – The instructions are single address instructions. 4 bits are needed to represent 15 operations. 12 bits are needed to store address in memory so instruction is of 16 bits. – It has an input unit which is used to give both instruction and data. For read via input unit and store it in memory READ operation code is executed. – It has a printer as its output unit which is used to output word when PRINT operation is executed.
  • 8. Cont… • Operation codes of HYPCOM processor. Operation Code (Hexadecimal) Mnemonic used Meaning 1 CLA Clear ACC and place contents of specified memory address in it. 2 ADD Add to ACC contents of specified address 3 SUB Subtract from ACC contents from specified address 4 MUL Multiply contents of ACC by contents of specified address 5 DIV Divide contents of ACC by content of specified address and leave integer quotient in ACC 6 STO Store content of ACC in specified address in memory 7 JMP Take next instruction from given address of memory 8 JNE Take next instruction from given address if ACC<0 else next instruction from address given in PC. 9 JZE Take next instruction from given address if ACC=0 else next instruction from address given in PC
  • 9. Cont… Operation Code (Hexadecimal) Mnemonic used Meaning A READ Input into specified address in memory data read from input unit. B PRINT Print data retrieved from the specified address in memory C SHR Shift content of ACC right by 8 bits D COM Complement content of ACC E EOR EX-OR operation. Match each bit of ACC with each bit of content of specified address. If bits are identical make the bit of ACC=0 else that bit in ACC=1 F HLT Halt computation
  • 10. Cont… • Opcode may be grouped by as follows: – Data movement operation CLA, STO – Arithmetic operations ADD, SUB, MUL, DIV – Control operations JMP, JNE, JZE, HLT – Input/output operations READ, PRINT – Logical operation SHT, COM, EOR
  • 11. Interconnection Unit • A set of wires which carries a group of bits in parallel is known as a bus. • A bus which carries a word to or from memory is known as a Data bus. Its width is equal to length of word. • To retrieve a word from memory it is necessary to specify its address that address is carried out by a Memory address bus whose width equals the number of bits in MAR. • Besides buses to carry address and data we also need control signals between the units of a computer. Control signal issued by the processor to memory to READ or WRITE and to I/O units to START or STOP a unit are carried by a control bus. • A system bus is consist of a data bus, a memory address bus and control bus.
  • 12. Cont… • One method of connecting I/O units to the computers to connect them to the processor via bus, it consist of a bus called DAB which specifying the addresses of the I/O units. • Data bus carrying a word from the addressed input unit to the processor or carrying a word from the processor to the addressed output unit. • Control bus carries command such as READ, WRITE, START, STOP from the processor to I/O units. It also carries I/O unit’s status information to the processor. • All data will be first taken to a processor register from the input unit and from there to the memory is known as program controlled transfer. • The interconnection of I/O units, processor and memory using two independent system buses is known as a two bus interconnection structure. • I/O devices are connected to a special interface logic known as Direct Memory Access logic (DMA). It is also two bus structure. One bus connects the processor to the memory other bus instead of connecting I/O units to the processor, connects them directly to memory. • Another popular method of interconnecting units is through the use of single bus which is known as unibus system. • In this case, the bus is shared by the three units and thus transfer of data can take place only between two of the three unit at a time.
  • 13. Cont… • If the processor and an I/O unit want to use the bus at same time, only one can be granted the bus. This decision is made by a circuit known as a bus arbitration unit. • I/O units are given preference over the processor because I/O units have moving parts which cannot be suddenly and if bus is not granted data may be lost. • Main advantage of single bus system is the addressing of I/O units. These units use the same memory address space. • A READ instruction with an address corresponding to an input device will read data from that device. • It is easy to add new device as no new instructions specific to the device would be required. • This single bus is called the PC system bus or ISA (Industry Standard Architecture) bus.
  • 14. Processor to memory communication • Following are steps for transfer data from memory to the processor – Step 1- the processor places the address in MAR via the memory address bus. – Step 2- the processor issues a READ command via the control bus. – Step 3- the memory places the retrieved data in MDR and transfers it via the data bus to the processor. Based on the read time of memory, a specific number of processor clock intervals are allotted for completion of this operation. During this period, the processor is forced to wait. • For writing in memory – The processor places the address in MAR via the memory address bus. – The processor transmits the data to be written in memory via data bus to MDR. – The processor issues a WRITE command to memory via the control bus. – The data in MDR is written in memory in the address specified in MAR. • Main problem is mismatch between speed of processor and memory. • This speed mismatch is alleviated by using small fast memory as an intermediate buffer between the main memory and the processor it is known as a catch memory. • It is fabricated using high speed semiconductor device. Effective cycle time of catch would be about a tenth of the main memory cycle time and its cost about 10 times cost per byte of main memory.
  • 15. Cont… • Most program execute instructions in the order in which they are written is called spatial locality of reference of instruction in a program. • Instruction is executed there is a likelihood of the same instruction being executed again soon is called temporal locality. • Locality of reference is main feature which makes the use of a catch memory effective in alleviating the speed mismatch between the main memory and processor. • It have two cache: Instruction cache, data cache( both are of equal size and small compared to main memory)(size cache 64KB and main memory 64 MB) • Block of instruction is copied in the cache memory from the main memory and data are copied into the instruction cache and data cache respectively. • JMP • The block of instructions/data fetched from main memory for the storage in cache is known as cache line. It is normally order of 16 to 64 bytes. • There are two level hierarchy of caches. – L1 cache – L2 cache • L1 cache – First level cache is fabricated as a part of the CPU chip. – It is known as on-chip cache or L1 cache.
  • 16. Cont… – The time to access a byte from L1 cache is very low. As the area of CPU is limited the size of L1 cache is small (between 16 to 64KB). – L1 cache itself divide into an instruction cache and data cache. • L2 cache – Second level cache is outside the CPU chip. It is called L2 cache. – It uses SRAM which is faster then DRAM. – Access time of L2 cache is larger than L1 cache. Size is of 256 KB to 512 KB and access time is few nanosecond. • Data first move from main memory to L2 cache and from there to L1 cache.
  • 17. RISC and CISC • CISC – Goal of CPU designer to provide more and more instruction in the instruction set of a CPU to ensure that the CPU supports more functions directly. – It makes easier to translate high-level language program to machine language and ensure that the machine language programs run more effectively. – Another goal of CPU designers was to optimize the usage of expensive memory, to achieve this the designers tries to pack more instructions in memory by introducing the concept of variable-length instructions such as half-word. – CPUs with large instruction set, variable-length instructions, and a variety of addressing modes are said to be CISC (Complex Instruction Set Computer) architecture. – It makes the job of machine language programmer’s easier. • RISC – In 1980s CPU designers realize that many instruction supported by CISC based are rarely used. – Complexity of CPU can be reduce by implementing only basic set of instruction and some of the more frequently used instructions in hardware. – Other complex instruction can be designed using this simple set of instructions.
  • 18. Cont… – So decoding and execution becomes simple and fast. If the instructions are designed in such a way that they retrieve operands stored in register in CPU rather than from memory. This ideas have been used in designing Reduced Instruction Set Computer (RISC). – General steps for design RISC instructions: 1. Reduce number of instructions make them of equal length. Reduce addressing modes. These makes decoding instructions easy. The decoding instructions can be integrated as a part of CPU. This will enable instructions to be decoded fast. 2. Reduce references to memory to retrieve operands. This is achieved by increasing the general purpose registers in CPU. Operands and intermediate results are stored in these registers. Usually 32 to 256 registers are provided in the CPU of RISC. Only two instructions refer to the memory. First is load an operand from memory into a register and second store result to memory. So RISC sometimes called Load-store architecture. 3. Instructions to be executed in following steps: I. Fetch instructions from memory. II. Decode instructions to determine what is to be done. III. Fetch the operand from register. IV. Execute the instruction V. Store the result in register.
  • 19. Cont… • Operands and results are stored in CPU and decoding circuit is simple then each step takes about the same time. This allows overlapping of various stage of instruction fetching and execution . When series of instructions are retrieved from memory is called pipelining. • One feature of RISC architecture is single cycle execution of most instruction.