4. For your code in the previous problem, microprocessors require the following amounts of time to fetch, decode and execute each instruction. Which microprocessor calculates X the fastest? Instruction Type Microprocessor Microprocessor #0 Microprocessor #1 Microprocessor #2 Microprocessor #3 Time per instruction 0-operand instructions 1-operand instructions 2-operand instructions 3-operand instructions 48 ns 60 ns 80 ns 120 ns

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Please Help ASAP!!!

Only number 4 please

Number 3 code is attached

3. Show the code to perform the computation X = A + (B + C) * D * E using microprocessors which use
the instruction formats shown below. Each microprocessor has ADD and MUL instructions in its
instruction set. Do not modify the values of A, B, C, D and E. If necessary, use temporary location T
to store intermediate results.
a) 3-operand instructions
b) 2-operand instructions
c) 1-operand instructions
d) 0-operand instructions
Step 2
Solution: X = (Ax B) + (CX (D+ E)) compute using Zero,0ne,Two,Three operand(Address) Instructions
a.3-Operand Instructions for X = (Ax B) + (CX (D+ E))
Code
Description
R1 <--A * B ( Multiplication of operands A,B) where R1 is
Temporary Register to store result
MUL R1,A,B
ADD R2, D,E
R2 <--D +E ( Addition of Operands D,E) and R2 is another
Temporary Register to store result
MUL R2, R2,C R2 <-- R2* C ( Multiplication of operands R2,C) where R2 is
Temporary Register to store result
ADD X, R1,R2 X<-R1 + R2 ( Here R1 already contains A *B and
R2 Contains (C * (D + E))
Transcribed Image Text:3. Show the code to perform the computation X = A + (B + C) * D * E using microprocessors which use the instruction formats shown below. Each microprocessor has ADD and MUL instructions in its instruction set. Do not modify the values of A, B, C, D and E. If necessary, use temporary location T to store intermediate results. a) 3-operand instructions b) 2-operand instructions c) 1-operand instructions d) 0-operand instructions Step 2 Solution: X = (Ax B) + (CX (D+ E)) compute using Zero,0ne,Two,Three operand(Address) Instructions a.3-Operand Instructions for X = (Ax B) + (CX (D+ E)) Code Description R1 <--A * B ( Multiplication of operands A,B) where R1 is Temporary Register to store result MUL R1,A,B ADD R2, D,E R2 <--D +E ( Addition of Operands D,E) and R2 is another Temporary Register to store result MUL R2, R2,C R2 <-- R2* C ( Multiplication of operands R2,C) where R2 is Temporary Register to store result ADD X, R1,R2 X<-R1 + R2 ( Here R1 already contains A *B and R2 Contains (C * (D + E))
4. For your code in the previous problem, microprocessors require the following amounts of time to
fetch, decode and execute each instruction. Which microprocessor calculates X the fastest?
Instruction Type
Microprocessor
Microprocessor #0
Microprocessor #1
Microprocessor #2
Microprocessor #3
Time
instruction
per
48 ns
0-operand instructions
1-operand instructions
2-operand instructions
3-operand instructions
60 ns
80 ns
120 ns
Transcribed Image Text:4. For your code in the previous problem, microprocessors require the following amounts of time to fetch, decode and execute each instruction. Which microprocessor calculates X the fastest? Instruction Type Microprocessor Microprocessor #0 Microprocessor #1 Microprocessor #2 Microprocessor #3 Time instruction per 48 ns 0-operand instructions 1-operand instructions 2-operand instructions 3-operand instructions 60 ns 80 ns 120 ns
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY