Question

# Suppose a computer using direct mapped cache has 224 bytes of byte-addressable main memory, and a...

Suppose a computer using direct mapped cache has 224 bytes of byte-addressable main memory, and a cache of 128 blocks, where each cache block contains 8 bytes. For four-way set associative cache, to which block of cache the address 0x1895BA maps?

Block 70

Block 16

Block 23

Not enough information

Q:- Suppose a computer using direct mapped cache has 224 bytes of byte-addressable main memory, and a cache of 128 blocks, where each cache block contains 8 bytes. For four-way set associative cache, to which block of cache the address 0x1895BA maps?

Block 70
Block 16
Block 23
Not enough information

2^24 / 2^7 = 2^17

24 bit addresses with 14 bits in the tag field, (128 = 2^7) 7 in the block field, and (8 = 2^3) 3 in the offset field.
0x1895BA
= 0001 1000 1001 0101 1011 1010
This is separated as 0001 1000 1001 01 | 01 1011 1 | 010 .
Thus the offset is 010 , the block field is 01 1011 1 , and the tag field is 0001 1000 1001 01.
This address maps to cache block/line (0110111)2 = 5510

So,
55 block of cache the address 0x1895BA maps.