2,614 views
1 votes
1 votes
A cache has a capacity of 16 kbits and a line length of 128 bytes.how many set does cache have if it is 8 way set associative?

A)16

B)32

C)64

D)none of the above

1 Answer

Best answer
3 votes
3 votes

Cache size = 16 Kbits = 16 * 2^10 bits = 2^14 bits = 2^11 Bytes

 Line size = 128 Bytes = 2^7 Bytes

Number of lines in cache = Cache size /  Line size

                                              = (2^11) /(2^7)

                                              = 2^4 Lines

Number of sets = number of lines in cache / kth way set associative

                            = 2^4 / 2^3

                             = 2

Hence Number of sets = 2

selected by

Related questions

0 votes
0 votes
1 answer
1
junior hacker asked Jan 15
174 views
a computer has 32-bit instructions and 12-bit addressing if there are already 250 two address instruction how many one address instruction can be formulated
2 votes
2 votes
1 answer
3