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

  How to write a constructor

I'm trying to draw a diagram for the following problem statement. I need to create the function in JavaScript and call it in an HTML file.

  Summary of the technical experiences that you used

Create the logic for a program that accepts input values for the projected cost of a vacation and the number of months until vacation. A summary of the technical experiences that you used in completing this lab. The commands that were of greatest be..

  Create memo to grace to outline purposes of organization

Create a memo to Grace in which you outline purposes of organization and costs and benefits of becoming a member.

  Write a program to clean up lane9.dat

Write a program to clean up lane9.dat. Write all numbers and spaces to cleanlane9.txt.

  Discuss the business ethics to promote ethical behaviour

Discuss the business ethics (concept, common issues, ethical decision factors), actions to promote ethical behavior, social responsibility (concept/dimensions, consumerism), and the business legal environment (source of law, resolution of disputes..

  Create a class that simulates an alarm clock

Store time in hours, minutes, and seconds. Note if time is AM or PM. (Hint: You should have separate private members for the alarm and the clock. Do not forget to have a character variable representing AM or PM.)

  Draw and implement abstract base class

Draw and implement the abstract base class ArithmeticExpression which represent any binary (having two arguments) arithmetic expression.

  Write program that asks user for two digit number

Write program which asks user for two digit number and then prints English word for that number. Sample run: Enter a two-digit number: 45

  Calculate the total cost with a function procedure

The program should request the quantity of each item ordered in a Sub procedure, calculate the total cost with a Function procedure, and use a Sub procedure to display an itemized bill.

  Create command line based application for perfect hundred

Create a COMMAND LINE based application to play a game called Perfect Hundred. In this game, the user/player competes against the computer.

  Assignment on the service-oriented architecture

Assignment  : The Service-Oriented Architecture

  Html/css

"Validating Your Work" Please respond to the following:  Describe attribute minimization. Explain what would happen if you tried to validate a page containing instances of attribute minimization. Propose a solution to this problem.

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