OS & Hardware
With 4 KB pages, which pair gives the page number and offset of the 32-bit virtual address 0x00403ABC?
- APage number 0x00403, offset 0xABC0
- BPage number 0x004, offset 0x03ABC
- CPage number 0x00403, offset 0xABC
Show answer and explanation
Answer: C. Page number 0x00403, offset 0xABC
A 4 KB = 2¹² page means the low 12 bits (the last three hex digits) are the offset and the upper 20 bits (the first five hex digits) are the page number. Splitting 0x00403ABC gives page number 0x00403 and offset 0xABC. The page table translates 0x00403 into a physical page number, and appending 0xABC yields the physical address. Using four or five digits as the offset would correspond to 64 KB or 1 MB pages.
- A. An offset of 0xABC0 is shifted by a digit.
- B. A five-digit offset applies to 1 MB pages.
- C. Correct. The last three digits 0xABC are the offset and 0x00403 the page number.