703 views
1 votes
1 votes

Consider a machine with a byte addressable main memory of 224 bytes, block size is 32 bytes and 4 way set associative cache having 215 cache blocks. Block size of cache is 32 byte then what is the set and tag address of memory (E4201F)16 in hexadecimal?

A) 0100, 39

B) 0010, 37

C) 0110, 39

D) 0100, 36

2 Answers

Best answer
1 votes
1 votes

Block size  = 32 bytes ( 5 bit need to represent it)
Number of lines  = 215 
4 way set associative
Number of sets = 213
24 bit will be represented as 6 ( TAG) + 13 (Number of set) + 5 (block)

Address given = (E4201F)16 i.e (1110 0100 0010 0000 0001 1111)2

First 6 bit will be use for tag i.e 1110 01 or 39 in hex
Next 13 bit will be used for set i.e 0100 in hex

option a is correct here

selected by
0 votes
0 votes

(E4201F)16   ...

1110 01(39)    00 0010 0000 000(0100)     1 1111

Related questions

0 votes
0 votes
0 answers
3
Mrityudoot asked Jan 14
127 views
In it’s solution how are they obtaining x with the given operation? Should we not have 1 more register to keep x separate?