in CO and Architecture
719 views
1 vote
1 vote

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

in CO and Architecture
719 views

1 comment

option A)  ?
0
0

2 Answers

1 vote
1 vote
Best answer

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

1 comment

thanks
0
0
0 votes
0 votes

(E4201F)16   ...

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

Related questions