Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Bartleby Related Questions Icon
Related questions
Topic Video
Question
Transcribed Image Text:For this assignment, you are to write a MIPS assembly language program using the MARS IDE and
assume a system has 31-bit virtual memory address (so no worry about negative numbers) with a 4-KB
page size (4096 bytes). Write a MIPS program that accepts an integer input that represents a virtual
address and outputs the page number and offset for the given address in decimal.
The output should look like:
The address 19986 is in:
Page number = 4
Offset = 3602
Check to make certain your program works. You can use the output from 19986 given above as a test,
but I will use other numbers to test it.
Submit the MIPS assembly language code and a screenshot showing a test run.
Expert Solution
Check MarkThis question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
bartleby
Step by stepSolved in 3 steps with 1 images
Knowledge Booster
Background pattern image
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Write 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.arrow_forwardComputer Science Consider that I have declared an 8-bit variable called counter. Its purpose is to count secondspassing (and eventually display the count). Here, let’s start by creating a subroutine that incrementsthe count with the appropriate rollover (that is, 59 → 00). Pass the address of the counter in anappropriate register, modify the counter in memory and return. No return value is necessary. Writethe code to accomplish this in Nios assembly..arrow_forwardint i; float x[5], y[5]; [ lots of code deleted... ] for (i=0;i y[i]) x[i] = x[i] + y[i]; [ more code deleted... ] Translate to MIPS assembly language:arrow_forward
- Write a Pep/9 Assembly program that reads in and stores two integers from the user and prints out their sum in the form: Total = <value> Create two versions of the program. One version should use just memory addresses in the commands. (No labels.) The second version should replace the memory addresses and just use labels. please show the output of the working programarrow_forwardConvert the given code fragment to assembly code fragment, using only instructions of the following types. These instructions are generally discussed in class. Here X,Y,Z are any memory locations; R, R1, R2 are any general registers; L is a label in the code (you can use any names as labels, ex. L, L1, L2 etc. ). load X, R //copy contents of memory location X into R. store R, X //Store contents of R into Mem location X cmp R1, R2 //Compute R1-R2 and update condition codes; //throw away result of subtraction. jmp L //Jump to location L in the code. jmpp L //If P bit is 1, Jump to location L in the code add X, R //Add contents of X,R and store result in R; //Also update the condition codes. Be careful about what type of argument is allowed in the instruction (Memory or Register). Ex. the first argument of ADD instruction is memory, not register. Do Not...arrow_forwardCreate an HLA Assembly language program that prompts a number from the user. Create and call a function that calculates the sum of all the numbers from 1 up to the number entered. So for example, a value of 10 would lead to the sum: 1+たす2+たす3+たす4+たす5+たす6+たす7+たす8+たす9+たす10 =わ 55 In order to receive full credit, you must not use recursion to solve this problem. Instead, you should build an iterative (that is, looping or branching...) function. In order to receive full credit, you must define a function, preserve registers, pass arguments on the run-time stack and return the answer in the register AH. To solve this problem, define a function whose signature is: procedure summing( value : int8 ); @nodisplay; @noframe; Here are some example program dialogues to guide your efforts: Provide a number: 10summing(10) equals 55!Provide a letter: 5summing(5) equals 15!arrow_forward
- Consider a program that declares global integer variables x, y[10]. Thesevariables are allocated starting at a base address of decimal 1000. All thesevariables have been initialized to zero. The base address 1000 has been placed in$gp. The program executes the following assembly instructions:lw $s1, 0($gp)addi $s1, $s1, 25sw $s1, 0($gp)lw $s2, 12($gp)add $s2, $s2, $s1sw $s2, 8($gp)sw $s2, 12($gp) What are the memory addresses of variables x, y[0], and y[1]? What are the values of variables x, y[0], y[1], and y[2] at the endof the program?arrow_forwardSuppose the block size of the cache in the processor is 4096 bytes. The ASCII value of the characters 'a' through 'z' is 97 through 122. Suppose previously array2[99*4096] was loaded into the cache. Now we write a program that accesses array2[k*4096] and measures the time it takes to access the value, with k varying from 97 to 122. Why can you expect the access time to array2[k*4096] be lower for k=99 than others?arrow_forwardWrite 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.arrow_forward
- A processor uses a serial link to communicate with a keyboard for word processing. A typist using this keyboard can type at rates peaking at 120 words per minute, where a word is 6 characters (including spaces and punctuation). The characters will be transmitted from the keyboard in 8-bit ASCII with one stop bit and no parity. Only consider these and no special characters. The programmer writes setup and polling service routines based on a minimum baud rate, but then finds that the keyboard will only interface at 19.2 Kbaud. Will the polling service routine have to change? Why or why not? Baud Rates 300 600 1200 2400 4800 9600 19200arrow_forwardI need an x86 assembly program that uses a 2D random walk. The program should ask the number of steps of the random walk and then generate the random sequences x and y. The results must be written in a txt file, where the coordinates values of x and y must be organized in columns. Output file example: -1 -3 -1 -2 -2 OH O N O H N Maarrow_forwardYour Question: Write a program in MARIE assembler to print "Hello World!" Define the message as a "C" style NULL terminated string. The program must implement a loop, like the pseudocode below. str ="Hello World!" index = 0 while str[index] != 0 output str[index] index = index + 1 ORG 100 START, LOAD STR STORE INDEXLOOP, LOAD INDEX ADD ONE STORE INDEX LOAD INDEX ADD STR STORE X LOAD X OUTPUT JUMP END JUMP LOOP END, HALT STR, HEX 0048 HEX 0065 HEX 006C HEX 006C HEX 006F HEX 0020 HEX 0057 HEX 006F HEX 0072 HEX 006C HEX 0064 HEX 0021 HEX 0000 INDEX, DEC 0ONE, DEC 1X, DEC 0 END START // it does not print anything, help plsarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Text book imageDatabase System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationText book imageStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONText book imageDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- Text book imageC How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONText book imageDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningText book imageProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education