Consider virtual addressing of 32 bits Assume that the page
Solution
How many entries do you need in the page table:
Answer 1:
Virtual addressing has 32 bit which is equivalent to 4GB Logical space (Table is shown at the end)
 page size is given as 4KB
Out of 32 bits of virtual address, 12 bits will be giving physical address in the page, as 12bits is 4KB
20 bits are used to identify the page referred. Page table requires 2^20 addresses which is 1MB
You require 1MB entries in the page table.
Answer 2: Indexing page table
Indexing of a page table can be 10 bits and hence this is 2 level. Index size of 2^10 = 1KB, and then each entry 10bits or 1KB
Mapping to the physical address:
Last 12 bits provide the physical address and earlier bits provide the page number
When the page is loaded in the memory, the physical address will be as below
1536 in decimal.
in page 10 as virtual page 0 is loaded there.
336 in decimal.
however, logical page no. 101 binary or 9 decimal is not loaded as it is not seen in the table.
3130 in decimal.
The page number is 20 (binary 10100), which is physical page no. 14 as seen in the table
No. of bits
| Virtual address | Binary equivalent | Physical address indicated by last 12 bits is as velow | |
| 1536 | 11000000000 | 11000000000 | 1536 in decimal. in page 10 as virtual page 0 is loaded there. | 
| 20816 | 101000101010000 | 101010000 | 336 in decimal. however, logical page no. 101 binary or 9 decimal is not loaded as it is not seen in the table. | 
| 85050 | \' 10100110000111010 | 110000111010 | 3130 in decimal. The page number is 20 (binary 10100), which is physical page no. 14 as seen in the table | 

