# How do I calculate offset from virtual address?

If the page size is 4Kbyte and the physical size of the main memory is 32Kbyte. Now if I consider virtual address of 37064..

The page number is then 37064/4096 = 9

And according to my diagram page 9 is mapped to frame 6

But how do I calculate the offset? According to exercise it should be 200. Thank you

• Hint: do the exercise in hexadecimal. A 4 kilobyte page is exactly 0x1000 bytes long. Jan 25 at 10:59

37064 = 0b1001 0000 1100 1000,