Difficulty: Medium
Correct Answer: 128
Explanation:
Introduction / Context:
Paging divides an address space into fixed-size pages. The number of virtual pages depends on total virtual address space size and the page size. This question tests the ability to convert address bits and page size to the number of pages.
Given Data / Assumptions:
Concept / Approach:
Total virtual address space equals 2^address_bits bytes. The number of pages equals total virtual bytes divided by bytes per page. With a power-of-two page size, the result is also a power of two. Use exponents to simplify division.
Step-by-Step Solution:
Verification / Alternative check:
Alternative: Determine page offset bits equal to log2(512) = 9 bits. The remaining 16 - 9 = 7 bits form the virtual page number. 7 bits index 2^7 = 128 pages. Both methods agree.
Why Other Options Are Wrong:
Common Pitfalls:
Confusing KB with 1000 bytes; forgetting that 0.5 KB equals 512 bytes; mixing up page offset bits with page number bits.
Final Answer:
128
Discussion & Comments