Question

A computer system supports a logical address space of 2322^{32} bytes. It uses two-level hierarchical paging with a page size of 4096 bytes. A logical address is divided into a bb-bit index to the outer page table, an offset within the page of the inner page table, and an offset within the desired page. Each entry of the inner page table uses eight bytes. All the pages in the system have the same size.

The value of bb is ___________ . (Answer in integer)

Official answer and solution
Official answer
11
From
Official GATE 2025 answer key

Solution

Subtract the page offset bits (log⁡24096=12\log_2 4096 = 12) and the inner page table index bits (log⁡2(4096/8)=9\log_2(4096/8) = 9) from the 32-bit logical address.

  1. Total logical address bits: log⁡2(232)=32 bits\log_2(2^{32}) = 32\text{ bits}.
  2. Page offset bits: Since page size =4096=212 bytes= 4096 = 2^{12}\text{ bytes}, the page offset requires 12 bits12\text{ bits}.
  3. Inner page table offset bits: Each inner page table page has size 4096 bytes4096\text{ bytes} and each entry uses 8 bytes8\text{ bytes}, so one page of the inner page table holds 40968=512=29\frac{4096}{8} = 512 = 2^9 entries, requiring 9 bits9\text{ bits}.
  4. Outer page table index bits (bb):
    b=32−12−9=11b = 32 - 12 - 9 = 11
Final answer

11

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2025 Computer Science and Information Technology - Session 2 (CS2)
Question
58 of 65
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.