CS

# VirtualAddress - FAQ Given a memory reference(a virtual...

• Notes
• 2

This preview shows pages 1–2. Sign up to view the full content.

FAQ Given a memory reference (a virtual address), how can we know which virtual page this virtual address is in? Let’s take a look at an example. You have 1024 marbles and they are labeled from 0 to 1023. We would like to organize (in order) them in boxes of marbles. Assume each box can store 16 marbles and marbles are organized in a form of 4 Χ 4 checkerboard. So we can order those marbles in a box according to their label. Now the question is: Given the marble with the label 234, which box should we place this marble in and at which slot should we place it? Using traditional arithmetic, we simply have 234 16 = 14, we get the box number (the 15 th box). To find the slot in that box, we simply have 234 % 16 = 10 (that is the 11 th slot). The computer manipulates bit strings, not the decimal number. How does the computer do this? The bit string of 234 is 11101010. The bit string of 14 is 1110, which is just happened to be the first 4 bits (from the left) 1110 1010.

This preview has intentionally blurred sections. Sign up to view the full version.

This is the end of the preview. Sign up to access the rest of the document.
• Spring '10
• DR
• Virtual memory, Decimal, bit string

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern