GATE / CS ARCHIVE

GATE CSE 2001 / QUESTION 9(d)

Cache byte offset width

Computer Organization & Architecture · Cache Memory · Full GATE CSE 2001 paper

GATE 2001, Q9(d) Descriptive
Report issue

Cache Memory

Question 9(d), GATE 2001: 32-bit byte addresses; cache data capacity 256 KB=2^18 bytes; 4-way set associative; 16-byte blocks.

Task: Find the byte-offset address width.
Question 9(d), GATE 2001: 32-bit byte addresses; cache data capacity 256 KB=2^18 bytes; 4-way set associative; 16-byte blocks.

Task: Find the byte-offset address width.
Tap to enlarge
Shared context

32-bit byte addresses; cache data capacity 256 KB=2^18 bytes; 4-way set associative; 16-byte blocks.

Answer & solution

Answer: 4 bits. (no official key was published)

Step through it (7 steps)

1. A block stores 16 individually addressable bytes. The byte offset must distinguish positions 0 through 15 within that block.

2. An unsigned b-bit field distinguishes 2b positions, so 2b=16 gives b=4.

3. These are the lowest four address bits A3…A0. For example offsets 0000 and 1111 identify the first and last byte.

4. The four-way organization does not change this field: associativity changes where a whole block is placed, not how bytes inside it are selected.

Original paper, page 8