operating-systempage-numberingpage-size

Getting the page number?


I wanted to know how to get the page number in the following exercise:

The page number of the 24-bit address 0x654321 that has 256 bytes page size is: A) 0x21 B) 0x65 C) 0x6543 D) 0x4321

I think the answer is letter C but I am not sure why. Could anyone tell me how to solve these types of exercises?

Thanks!


Solution

  • The answer is

       0x654321  / 256
    

    Just integer division on using the page size.