All mock tests are FREE till 31 December — register to save your progress

A memory management system has 64 pages with a page size of 512 bytes. Physical memory consists of 32 page frames. The number of bits required in the logical and physical addresses are respectively:

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: C. 15 and 14

Explanation

The page offset needs log2(512) = 9 bits, since the offset must address every byte within a 512-byte page, and this offset width is the same in both the logical and physical address because the page size equals the frame size. The logical address additionally needs log2(64) = 6 bits to select one of the 64 pages, giving a logical address of 6+9 = 15 bits. The physical address instead needs log2(32) = 5 bits to select one of the 32 frames, giving a physical address of 5+9 = 14 bits. So the logical and physical addresses need 15 and 14 bits respectively, option (iii).

More Programming Languages and Computer Graphics questions