Two considerations while choosing the size of page
1. Larger Page Size : Smaller Page table but larger internal fragmentation
2. Smaller Page size : Larger Page table which may not be able to fit in one frame and less unused pages in memory
So ultimately we want an optimal size of page so that both we can manage both the things together.
Let Page size is S, size of process is P and entry size is e.
Page Table Size = (P/S)* e
Average amount of internal fragmentation is S/2.
So in order to minimize this quantity differentiate it .
$\frac{\mathrm{d} }{\mathrm{d} S} ((P/S)*e + (S/2)) = 0$
-(1/S2) Pe + 1/2 = 0
S= $\sqrt{2Pe}$
Answer to the question
P= 2d , e= 32bit= 4B
S= $\sqrt{2*2^d*4}$
Hence answer is S= 2$\sqrt{2^(d+1)}$