Answer
See explanation
Work Step by Step
A 20-bit MAR (Memory Address Register) can directly address $2^{20}=1$ MB of memory locations.
However, the computer actually has $4$ MB of memory, meaning there are $4\times 2^{20}=2^{22}$ memory cells in total - requiring $22$ bits to address them.
This can be achieved using one of these methods:
- memory paging (memory is divided into pages or segments, each of $1$ MB or smaller; the MAR addresses within a page, while a page table or segment register maps logical addresses to physical memory)
- bank switching (memory is divided into banks (e.g., four 1 MB banks); a separate register selects which bank is currently active; the MAR still uses 20 bits to address within the selected bank; the CPU changes the bank register to access different parts of the 4 MB memory)
- extended addressing via CPU (the CPU may use more than 20 bits internally to generate a full 22-bit address; the MAR receives only the lower 20 bits, while the upper bits are managed by control logic or registers)