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

  Write code for the missing sections

Use the following code outline as a starting point for your final project. You will need to correct any errors you find and write code for the missing sections.

  Program to compute flow of water flowing through a pipe

Write a program to calculate the volume flow rate in cubic feet per second of water flowing through a pipe of diameter d in inches and a velocity of v feet per second.

  Write a program that computes the monthly gross pay

The owners of the Super Supermarket would like to have a program that computes the monthly gross pay of their employees as well as the employee's net pay.

  Which selection technique do you think is best suited

Which selection technique do you think is best suited for such a program? Why? Do you agree that all control structures are nothing but a form of the ''Go to'' statement? Why or why not? Justify your responses with reasons

  Use switch statement to display roman numeral version

Use a switch statement to display the Roman numeral version of that number. Input Validation: Do not accept a number less than 1 or greater than 10.

  Based on the kercher 2009 article how can management tools

q1. based on the kercher 2009 article how can management tools for microsoft windows server 2008 automate user account

  Can an until loop sometimes never execute

Does the following script print to standard output, a list of numbers equal to the number passed on the command line?

  What are advantages of using menus in a gui application

What are advantages of using menus in a GUI application? Design a menu structure for a program you would find useful in your work or hobbies. Write and post the code for the menu creation

  Write function to calculate and print fractional powers

Write down a function which calculates and prints fractional powers of its first argument as shown below for first argument of 2(1/2,1/4,1/8 and so on).

  Create a glossary generator

Prompt the user to enter a word, return its definition and scrabble score (or output "not valid in scrabble")

  Design an application

The entries cannot be less than 0 or above 100.

  Create class to include fields for length-width in inches

Create a class name Tape that includes fields for length and width in inches and properties for each field. Also include a ToString () method that returns a string constructed from the return value

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