Write a short RISC-V assembly program named quad.asm that querries the user with the prompt Integer: , the user writes an integer and then the program prints the string The value of the quadratic is: followed by a space (without a newline), followed by the value of the quadratic x*x + 2*x + 1 where x is the number the user entered, followed by a newline. You do not need any functions for this part.
Q: Show that a simple connected planar graph with 8 vertices and 13 edges cannot be bichromatic
A: Answer: Given ,A simple connected planed graph. no. of vertices = 8 no. of edge's = 13 We have to sh...
Q: Given a directed graph G=(V, E), design an algorithm to find out whether there is a route between tw...
A: DFS Pseudo code DFS (V,E) for each vertex u in V[G] do color[v] ← GRAY π[v] ← NIL // predecessor o...
Q: 1. Please provide comments for the instruction 2. What is the memory mapped address for the co...
A: A company has the total cost Is MOP, the variable cost of the part is S3.00 per unit vetlle the sell...
Q: Explain the salient features of Information System in a hospital. List out various application modul...
A: Answer: Because most procedures in HIS-implemented hospitals are automated and software and servers ...
Q: 3. The equilibrium constant for the reaction of chlorine gas with phosphorus trichloride to form pho...
A: a) Mole balance equation: 0.414 PCl3 + 0.0064 Cl2 ----->0.0086 PCl5 For part b & c mention ...
Q: Can i please have help with this question in java, please . Java is the language java kind regars...
A: The answer is given below:-
Q: You are provided with an array that contains different characters. Ask the user for an integer input...
A: INTRODUCTION: In the given problem statement we are asked to complete the code so that if user input...
Q: A number 428 in duodenary (base 12) is to be added to C10 in tredenary (base 13), what is their sum ...
A: Concept: Duodenary or base 12 number system have digit 0,1,2,3,4,5,6,7,8,9,A,B. Tredenary or base 13...
Q: I NEED THE COUNTEREXAMPLE Q: for A set of natural numbers, define binary A = {binary representation...
A: The answer is given below:-
Q: 1. Explain the following with suitable examples. a. Keyword, Topic and Placement Targeting b. Ad s...
A: Introduction: Digital marketing, is additionally called Internet marketing or Online Marketing, is u...
Q: 1). what would the output of following code be: ArrayList list = new ArrayList); list.add("10"); lis...
A: After removing all error i provide the code and output screenshot
Q: Write a MIPS program that will handle calculating minifloat addition for two numbers using the rules...
A: Algorithm:- Start. Take the mini float numbers. load them on registers. Add them. Print the result....
Q: Write a program that replaces each line of a file with its reverse. For example, if you run java Rev...
A: The required java program is provided below in the next step.
Q: a=0;b=1;N=17; TOL=10^-5; i=1; f=@ (x) x-2^ (-x); fa = f(a); Ewhile i 02 a - p: fa - fp; else b = p: ...
A: According to the information given:- We have to make code executable.
Q: Write a pthread program using c/c++ or java code to print the sum of 100 numbers of the first 1000...
A:
Q: Explain what is a "Resource" in a REST
A: REST architecture treats every content as a resource. These resources can be Text Files, Html Pages,...
Q: Q1. Eight LEDS are connected to P3. Write an 8051 C program that shows the count from FF down to 0 o...
A: Calculation for delay : assuming 8051 clock frequency = 12MHZ thus 1 machine cycle time is = (1/12MH...
Q: Please help me with A+B, A-B, A*B and A/B
A: figure 1 :
Q: What is the output of the program? #include using namespace std; int main() { enum dayS { mon,tues,...
A: Option a: 15913
Q: code should be in python: I need the user who's running the code to pick a game from 1 to 5 and the...
A: Python: Python is a general purpose programming language developed by Guido Van Rossum in 1989. Pyth...
Q: Make a your own webpage, and make it presentable, informative and creative. Write a simple program...
A: I give the code along with code and output screenshot
Q: Which Win32 function moves the file pointer to a specified offset in relation to the beginning of a ...
A: Introduction: SetFilePointer: SetFilePointer is a built-in Win32 API function that modifies the pos...
Q: Problem 4: Given: Host IP Address: 192.168.1.245 New Subnet Mask: 255.255.255.252 Find: Number of Su...
A:
Q: Each year, almost 20,000 of children are rushed to the hospital with injuries related to playground ...
A: The safety of children on playgrounds in the neighborhood is a significant concern.
Q: Write a program that takes in a positive integer as input, and outputs a string of 1's and O's repre...
A: Use a while loop and we repeat in loop till number becomes 0
Q: If the English Philosopher Thomas Hobbes could be called 'grandfather' of artificial intelligence, t...
A: if grandfather' of artificial intelligence :- Thomas Hobbes father of ai :- A.M. Turning real fa...
Q: Create a Java program in codiva.io to print the "smallest" and "largest" character in your name. For...
A: public class chegg { // function that return the largest alphabet. static char larg...
Q: The screen buffer's dimensions may be changed by using which Win32 function?
A: SetConsoleWindowInfo()
Q: The result is negative when the dividend and divisor have not same sign. * O False True
A: Binary Coded Decimal, or BCD, is a telephone system or code that uses binary numbers or digits to re...
Q: Show one possible derivation tree for the expression A=B+C*A given: S → P = Q P → A | B |C Q → Q+Q ...
A: Given expression is A=B+C*A and the grammar is, S → P = QP → A | B |CQ → Q+Q | Q*Q | (Q) | P Where S...
Q: To facilitate the retrieval of specific records from a file, one field in each record is chosenas a(...
A: A key in a file is the field (or fields) whose value identifies a record among others in a data file...
Q: eering short question. What is the differe
A: Below The difference between pattern and an anti-pattern
Q: a valid lo
A: Below the addresses represents a valid loopback address
Q: What feature allows EIGRP to perform unequal-cost load balancing across multiple paths?
A: Answer: The feature allows EIGRP to perform unequal-cost load balancing across multiple paths are as...
Q: Create a Vehicle class (Activity1.java), include Create 2 properties: make - String, mileage - doub...
A: Please refer below for the code according to constraints provided by question: I have assumed make v...
Q: Assume the following initial values of registers r1-r5: re= 0x0 r1= 0x0 r2= 0x0000000A r3= 0x1000000...
A: Please check the step 2 for solution
Q: Write a Java class named Rightiriangle that prompts the user to enter three integers that are to be ...
A: I give the code in Java along with output and code screenshots.
Q: Identify a previous technology which has impacts in subsequent technologies and inventions. describe...
A: Technology has improved over the last one hundred years starting from the invention radio in 1849. I...
Q: Which of the follow describes the fixed partition technique? Group of answer choices: a) Main memor...
A: Which of the follow describes the fixed partition technique? Group of answer choices: a) Main mem...
Q: List and explain Four examples each of probabilistic and non- propabilistic sampling technically
A: INTRODUCTION: In the given problem statement, we are asked about the probabilistic and non- probabil...
Q: achine Problem: Create a C-program using one dimensional array that will display the output below. T...
A: In this question, we are asked to write a C program where user enter a element and position for the ...
Q: B. Accident & Emergency C. OPD Services
A: given - Briefly explain the following application modules with a block diagram:A. RegistrationB. Acc...
Q: The objective of this assignment is to give you some practice using inheritance, virtual functions, ...
A: Below is the required program in C++. Screenshot of Output is also attached at the end of the progra...
Q: Bell State University Scenario Draw a detailed ERD with primary keys, foreign keys, and all provide...
A: An entity relationship model describes the structure of a database with the help of a diagram which ...
Q: ur criteria were defined for comparing search strategies: completeness, optimality, time complex ace...
A: Lets see the solution.
Q: Hi, please answer this correctky and completely. Thanks! The subject is Data Structure and Algorithm...
A: SUMMARY: - Hence, we discussed all the points.
Q: What is the virtual key symbol for the Right Ctrl function key?
A: Answer:
Q: Algorithms are important to know if you want to use computers to invest in the financial market.
A: Solution: The computer algorithm are makes life easier by trimming the time it takes to manually do ...
Q: For the give memory interfacing schematic find out the starting and ending address of EPROM and RAM.
A: EPROM Starting address = 0000 Ending Address = 03FF (In Hexadecimal )
Write a short RISC-V assembly
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
- The progarmming language is risc-v, sorry that i will dislike if not written in risc-v and copied from another answer Please also show the screenshot of the 3 test cases Write a function square in RISC-V that takes in an integer n ad returns its square. If n is not positive, then the function returns 0. Save your program as task1.s. Test cases: (1) n = 3, output: 9 (2) n = 12, output: 144 (3) n = -1, output: 0Write an LC-3 assembly language program that counts the number of 1s in the value stored in R0 and stores the result in R1. For example, if R0 contains 0001001101110000 (x1370), then after the program executes, the value stored in R1 would be 0000000000000110 (decimal 6) Here are some hints ORIG x3000 AND R5, R5, #0 ADD R5, R5, #1 ;R5 will act as a mask AND R1, R1, #0 ;zero out the result register AND R2, R2, #0 ;R2 will act as a counter LD R3, NegSixt MskLoop AND R4, R0, R5 ;mask off the bit Add code here... if you want more than a 0 Solicit the number to be inspected via the keyboard. 10 points for a single digit (e.g. 5) decimal number, which must be converted to binary. 20 points for a two digit (e.g. 55) decimal number, which must be converted to binary.Write a general-purpose program that is able to add two 8 bytes length numbers. Numbers are saved in EBX: EAX and EDX: ECX Consider this sample call: Number1 QWORD = 1234567898765432h Number2 QWORD = 1234567898765432h Please write code in Masm (Microsoft assembly) No High-Level Assembly. And please don't separate the variables, keep it as it is. If you do split it please do it in the code part. If possible please use 1 loop anything more than inc, dec, mov, xchg, I don't know how to do that yet.
- Write a Pep/9 assembly language program that reads two integer values from the keyboard and prints the sum of the original input values, the sum doubled, the sum tripled, and the sum quadupled on separate lines. In other words, your program should produce exactly the same output as the following C program: #include ‹stdio.h> int num1 ; int num2; int sum; int calcVal; int main) f printf ("?") : scanf("%d" , &num1) ; printf ('"?") ; scanf("%d", &num2) ; sum = num1 + num2; calcVal = sum + sum; printf("sum of inputs = %d n", sum) : printf("* 2 = %d\ n", calcVal); calcVal += sum: printf("* 3 = %d\n" calcVal): 13 calcVal += sum; printf("* 4 = %d \n", calcVal); return 0;Write a program that includes two subprograms, one that takes a single parameter and performs some simple operation on that parameter and one that takes 20 parameters and uses all of the parameters, but only for one simple operation. The main program must call these two subprograms a large number of times. Include in the program timing code to output the run time of the calls to each of the two subprograms. Run the program on a RISC machine and on a CISC machine and compare the ratios of the time required by the two subprograms. Based on the results, what can you say about the speed of parameter passing on the two machines?Write a program in MARS MIPS assembly language that asks the user to enter an unsigned number and read it. Then swap the bits at odd positions with those at even positions and display the resulting number. For example, if the user enters the number 9, which has binary representation of 1001, then bit 0 is swapped with bit 1, and bit 2 is swapped with bit 3, resulting in the binary number 0110. Thus, the program should display 6.
- Write a c++ program to receive one integer value 'num' from user such that the number is greater than 0 but less than 10. Then draw a triangle on screen such that there is one number in first row, two in second, three in third and so on in an increasing fashion until num rows are printed. For example if the user inputs 5, the output pattern is: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15Write a complete program in MARS MIPS assembly language that asks the user to enter an unsigned number and read it. Then swap the bits at odd positions with those at even positions and display the resulting number. For example, if the user enters the number 9, which has binary representation of 1001, then bit 0 is swapped with bit 1, and bit 2 is swapped with bit 3, resulting in the binary number 0110. Thus, the program should display 6. note: in MARS MIPS assembly only and with #commentsWrite an assembly program for the processor family x86-32 that reads three real numbers from the keyboard and shows on the console the average value of them. In your implementation include the function averageOfThree and define for that function the interface below. ; ******************************************************************************************************************* averageOfThree: ; Input: Three memory addresses on the stack of three 64-bit floating point numbers in main memory. ; Output: The average value of the three input numbers on the stack as a 64-bit floating point number.
- Write a MIPS assembly program that converts a grade letter A, B, C, D or F to its decimal value. Each grade letter is converted as follow: A to 100 B to 85 C to 75 D to 65 F to 0 Your program should ask the user for a grade letter to convert "Please enter a grade letter: " Then, it should convert the input letter value to the decimal value as shown above: For example, If the user input is A the output should be: "Your grade is 100" If the user input is B the output should be: "Your grade is 85"Write a simple assembly language program that performs a few arithmetic operations of an ID number which has a 7 digit number. Begin by splitting the ID number into two different values. Assign the four most significant digits to a variable called ‘left’ and the three least significant digits to be a variable called ‘right’. Choose a data type that is appropriate for a range of decimal values each variable can store. Then choose a data type that you can define each of the variables in the program. Then calculate the sum of the two variables ‘left’ and ‘right’. Store the result in a variable called ‘diff’. Then define a character string called ‘message’ that contains the characters “Hello World!”. Last define an array of data type WORD called ‘numbers’ that is initialized to the following values: 1, 2, 4, 8, 16, 32 and 64Write a program in python with a function timestable(n), which prints a multiplication table of size n. For example, timestable(5) would print: 12345 2 3 4 5 4 6 8 10 6 9 12 15 8 12 16 20 10 15 20 25Use the function in a program where you ask the user for n and you print the corresponding table.