Suppose that the system has 32-bit virtual address, write down the Java program which is passed:
1. The size of the page,
2. The virtual address.
Your program will report page number and offset of given virtual address with specified page size. Page sizes should be specified as power of 2 in the range 1024-16384 (inclusive). Suppose such program is named Address, it would run as follows:
java Address 4096 19985
And right output would appear as:
The address 19986 contains:
Page number = 4
Offset = 3602