answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Vera_Pavlovna [14]
2 years ago
15

Ld' is the instruction with the longest latency on the CPU from Section 4.4 (in RISC-V text). If we modified ld and sd so that t

here was no offset (i.e., the address to be loaded from/stored to must be calculated and placed in rs1 before calling ld/sd), then no instruction would use both the ALU and Data memory. This would allow us to reduce the clock cycle time. However, it would also increase the number of instructions, because many ld and sd instructions would need to be replaced with ld/add or sd/add combinations.
(a) What is the primary factor that influences whether a program will run faster or slower on the new CPU?
(b) Do you consider the original CPU a better overall design; or do you consider the new CPU a better overall design? Why?

Computers and Technology
1 answer:
antiseptic1488 [7]2 years ago
8 0

Answer:

See explaination

Explanation:

a)

The primary factors that influence the program's speed on a new CPU are given as:-

CPU Clock speed where the speed of the process instructions is being measured.

Multi-core which is when the transistors work faster than respective CPU.

Cache which helps to note that the transition of data is smooth and fast.

b)

So, there are two CPUs suppose the old one as 'A' and the modified one as 'B'.

'A' has following features---

It takes more time to execute program as it has more clock cycle time or we can say it has low clocking rate or low speed in terms of MHz or GHz. Clock rate is the inverse of Clock Cycle Time. When you will increase the clocking rate of CPU, it will get faster and then Clock Cycle Time will get reduced.

It has less instructions provided.

'B' has following features----

It takes less time to execute program as it has less clock cycle time or we can say it has high clocking rate or high speed in terms of MHz or GHz.

It has more instructions provided.

The performance of CPU depends upon 2 factors:

The number and types of instructions that are executed by the CPU

How fast the CPU can execute those instructions?

So, overall CPU B is better as it has less execution time than CPU A but the performance will always depend upon the number and type of instructions executed by the CPU so it may vary.

Please refer to attachment for instructions and formulas.

You might be interested in
Another solution to minimize resonance is to ________ the bridge.
lakkis [162]
I believe the answer is d
7 0
2 years ago
Which of the following is not considered hardware? Monitor Mouse Windows Keyboard Printer
Dima020 [189]
A hardware helps to set up the computer to do things with. A monitor, mouse, keyboard, and printer all help to interact with the computer to make it work. Windows would not be considered a hardware because it is downloaded onto the computer to enhance the computer or to make the computer better
7 0
2 years ago
Which graphics element loads faster when used with text or audio on a web page?
Kobotan [32]

An “iframe” maybe idk what is asking

5 0
1 year ago
Read 2 more answers
Write a Java class with the following methods: getArray(int numStrings) is an instance method that takes command line input (use
mezya [45]

Answer:

Follows are the code to this question:

import java.util.*;//import packae for user-input  

public class Main//defining a class Main

{

public String[] getArray(int numString)//defining a method getArray

{

String[] name=new String[numString];//defining array of String values

Scanner in = new Scanner(System.in);// creating scanner class object for input values from user-end

for(int i=0;i<numString;i++)//defining for loop for input multiple values

{

System.out.print("Enter String Value :");//print message

name[i]=in.nextLine();//input values

}

return name;//return array values

}

public String getLongestString(String[] sArray)//defining a method getLongestString

{

int m=0,mi=0; //defining integer variables

for(int i=0;i<sArray.length;i++)//defining for loop for check the longest value in array

{

if(m<sArray[i].length())//defining if block that checks m varaible value greater then sArray length  

{

m=sArray[i].length();//use m to hold sArray length

mi=i;//use max_index to hold i that is loop value

}

}

return sArray[mi];//return Longest value

}

public static void main(String[] args)//defining main method

{

Main s=new Main();//Creating object of main class    

String[] n;//defining string variable n  

n=s.getArray(5);//use n varaible to call getArray method and store its value

System.out.println("Longest value is: "+s.getLongestString(n));//use print method to call getLongestString method

}

}

Output:

please find attached file.

Explanation:

In the given java program code, inside the main class two method that is "getArray and getLongestString", is defined, in which the "getArray" method uses an integer variable in its parameter and inside the method, an array is defined that use a  scanner class for input array value.

  • In the "getLongestString" pass as a parameter and inside the method, two integer variable "m and mi" is defined that use in the loop to return the longest string value.
  • In the class main method is to define that creates a class object and call the above method and use the print method to return its value.  

4 0
2 years ago
Convert Newton’s method for approximating square roots in Project 1 to a recursive function named newton. (Hint: The estimate of
PIT_PIT [208]

Answer:

import math

tolerance=0.00001

approximation=1.0

x = float(input("Enter a positive number: "))

def newton(number,approximation):

   approximation=(approximation+number/approximation)/2

   difference_value =abs(number-approximation**2)

   if difference_value<= tolerance:

       return approximation

   else:

       return newton(number,approximation)

print("The approximation of program = ", newton(x, approximation))

print("The approximation of Python = ", math.sqrt(x))

Explanation:    

  • Create a recursive function called newton that calls itself again and again to approximate square root for the newton technique.
  • Apply the formulas to find the estimate value  and the difference value .
  • Check whether the difference_value is less than the tolerance value  and then return the value of approximation  else make a recursive call to the newton function by passing the  user input and the new approximation value .
  • Finally display all the results using the print statement.
3 0
2 years ago
Other questions:
  • Write a loop that subtracts 1 from each element in lowerScores. If the element was already 0 or negative, assign 0 to the elemen
    6·2 answers
  • Identify the normalized form of the mantissa in 111.01.
    14·1 answer
  • An organization has a datacenter manned 24 hours a day that processes highly sensitive information. The datacenter includes emai
    5·1 answer
  • In the game of $Mindmaster$, secret codes are created by placing pegs of any of seven different colors into four slots. Colors m
    5·1 answer
  • Mobile computing has two major characteristics that differentiate it from other forms of computing. What are these two character
    8·1 answer
  • The Web can play a significant role in making large amounts of information available to decision makers. Decision makers must be
    10·1 answer
  • In a real-world environment, changing granularity requirements might dictate changes in primary key selection, and those changes
    15·1 answer
  • A Color class has a method getColorName that returns a string corresponding to the common name for the color, e.g., yellow, blue
    11·1 answer
  • There are two cons to an OLTP database. Which of the following are a solution of these cons?​
    9·1 answer
  • Write a class named Employee that has private data members for an employee's name, ID_number, salary, and email_address. It shou
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!