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

Info icon 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.
Image of page 1

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

Image of page 2
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

  • Left Quote Icon

    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.

    Student Picture

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

  • Left Quote Icon

    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.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    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.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern