Question

A processor can support a maximum memory of 4 GB, where the memory is word-addressable (a word consists of two bytes). The size of the address bus of the processor is at least _____ bits.

Official answer and solution
Official answer
31
From
Official GATE 2016 answer key

Solution

Compute the number of unique word addresses in a 4 GB word-addressable memory.

Total memory capacity is:

Capacity=4 GB=4×230 bytes=22×230 bytes=232 bytes\text{Capacity} = 4\text{ GB} = 4 \times 2^{30}\text{ bytes} = 2^2 \times 2^{30}\text{ bytes} = 2^{32}\text{ bytes}

The memory is word-addressable with a word size of 2 bytes (212^1 bytes). Therefore, the total number of addressable words is:

Number of words=232 bytes21 bytes/word=231 words\text{Number of words} = \frac{2^{32}\text{ bytes}}{2^1\text{ bytes/word}} = 2^{31}\text{ words}

To provide a distinct address for each of the 2312^{31} words, the processor address bus must have at least 31 address lines:

Address bus size=log⁡2(231)=31 bits\text{Address bus size} = \log_2(2^{31}) = 31\text{ bits}
Final answer

31

Common trap

Assuming byte-addressable memory and choosing 32 bits (4 GB=2324\text{ GB} = 2^{32} locations).

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2016 Computer Science and Information Technology (CS) Session 1
Question
19 of 65, printed as CS Q.9
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.