logical address=32 bit
page size= 4KB =2^12 byte ,
now we can write logical address = !!20!!12!! , 12 bits are for representing pages and 20 bits are for no of pages in 1st level page table.
so,
page table 1 = 2^20 * PTE = 2^20 * 4 byte = 4 MB > 1 page size , so we will do paging again on this page table. that it can fit in 1 page.
now, # of pages of page table = 2^22 / 2^12 = 2^10 pages
page table 2 = # of pages of page table1 * PTE
= 2^10 * 2^2 = 2^12 = 4KB which is equal to page size
so level of page table =2
now logical address = !! 10 !! 10 !! 12 !!