Virtual address bits can be divided into two parts page index and page offset bits.
Page index bits are used to index into the page table.
There are total 256k entries in the page table.
So the number of page index bits=18bits(as 256k=2^18)
Size of the page frame=2^30/2^12=2^18
We know the size of the page is equal to size of page frame.
So the size of the page = 2^18
So the number of bits for page offset=18 bits
Total number of bits in the virtual address=18+18=36bits