Write a program that is passed a virtual address

Assignment Help Programming Languages
Reference no: EM131119320

Lab Instruction

Assume that a system has a 32-bit virtual address with a 4-KB page size (12bits).

Write a program that is passed a virtual address (in decimal) via the attached txt file and have it output the page number and offset for the given address in the command line. The program should mask page number and offset from an unsigned 32-bit address.
A memory reference appears as:

|------------|-----|

31         12 11     0

As an example, your program would run as follows:

./mm input.txt

Number of Translated Addresses: 456

Address     PageNumber    Offset
 16916            4                532
  62493          15               1053
.....

printf("***DONE***\n");

Submission Instruction:

1. Test your code.

2. Take a screenshot of the first and last page of your output and save them in a PDF file as YourCSUNID_YourLastName.pdf.

3. Upload your source code.

Attachment:- Input_File.txt

Reference no: EM131119320

Questions Cloud

The epidemiological data and the information provided : Need help with Week 3 Assignment. Must be A+ work, non plagarized, APA format. Must follow the instructors directions, complete all questions and portions of the assignment. Will provide login info to access school online library for schloarly re..
Find the derivative : Find the derivative of d/dx(y3). It is implied that y is a function of x.
Why do some communities become ambivalent to gangs : Why do some communities become ambivalent to gangs? What characteristics make gangs feel safe and how do communities contribute to this feeling?
Guillen uses the completed contract method : At December 31, 2010, the balances in certain accounts were construction in process $1,715,000; accounts receivable $240,000; and billings on construction in process $1,000,000.
Write a program that is passed a virtual address : Write a program that is passed a virtual address (in decimal) via the attached txt file and have it output the page number and offset for the given address in the command line.
Discuss advantages of interpreting mixed methods data : In a 250-300 word essay, discuss the advantages and disadvantages of interpreting mixed methods data, and give examples of the possibility of bias affecting the results in this process.
How these elements were critical to achieving his goals : Were there any elements of Arnstein's ladder of participation in the discharge of street services function?
Flexible benefits programs are employer inducements : Flexible benefits programs are employer inducements to reduce benefits costs. The average employee has neither the ability nor information to make such important choices. Employees should suspect such programs.” Do you agree or disagree? Explain your..
Describe function of protein in our diets : Describe function of protein in our diets by identifying at least 2 benefits and then describe one issue with consuming too much protein

Reviews

Write a Review

Programming Languages Questions & Answers

  Program to calculate interest on account balance

10% of total amount owed, which ever is larger. Program comprises loop which lets user repeat this computations until user says she or he is done.

  Write an application that prints out the receipt

Write an application that prints out the receipt details for these shopping baskets...

  Create the logic for a program that accepts input values

Create the logic for a program that accepts input values for the projected cost of a vacation and the number of month until vacation. Pass both values to a method that displays the amount you must save per month to achieve your goal.

  Create a class called pizzaorder

Create a class called PizzaOrder that has the following members: toppingsOffered[] - a constant array of Strings representing the choice of low-price toppings, e.g., { "onions", "bell peppers", "olives", "pepperoni"... }. This member is public and..

  Develop two single dimension arrays-floating-point numbers

Develop two single dimension arrays which contain 10 floating-point numbers in each array. Develop third single dimension array to hold sum.

  Create a query that lists the following fields

Create a query that lists the following fields, in the order in which they appear below:

  Write a program that prompts for and reads an amount

Write a program that prompts for and reads an amount (integer) for Canadian dollars and convert the amount to Euros. The exchange rate is 1.

  Write accessors for each of the declared class variables.

Read the file and display in the listbox each record splitting out the fields, eliminating the comma delimiters and placing spaces between the fields.

  My goal is to write down a php database application with a

my goal is to write a php database application with a gui that will display and update information on a remote database

  Compute the estimated direction of current motion

This is your template code for a simple maze "game". The player's task is to drag an arrow through the maze from the red starting dot to touch the Blue middle square without touching the black maze walls on the way. compute the estimated direction ..

  Create program to read file calculate numbers of single men

Create a program to read through file and calculate numbers of married men, single men, married women and single women.

  There is two part in this assignment1-discussion1-what does

there is two part in this assignment1-discussion1-what does ethics have to do with recruiting and please define ethics?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd