Computer Science, asked by dinu4562, 10 months ago

A block-set associative cache memory with 128 blocks are divided into four block sets. The main memory consists of 16,384 blocks where each block contains 256 eight bit words. How many bits are required for addressing the main memory?

Answers

Answered by srikanth2716
27
· A block-set associative cache memory consists of 128 blocks divided into four block sets. The main memory consists of 16,384 blocks and each block contains 256 eight bit words.
For  main memory, there are 214214blocks and each block size is 2828 byte (byte can be considered as eight-bit words)

Size of main memory = 214∗28=4MB214∗28=4MB ( 22−bits22−bitsrequired for addressing the main memory).

For WORD field , we require 8−bits8−bits, as number of blocks is 2727.

As there are 44 blocks in 11 set, 3232 sets will be needed for 128128 blocks. Thus SET field require 5−bits5−bits.

Then, TAG field require =22−(5+8)=9−bits=22−(5+8)=9−bits

9-bits (for tag)5- bits (for set)8-bits (for word)9-bits (for tag)5- bits (for set)8-bits (for word)

9−bits9−bits (for tag)5−bits5−bits( for set)
Answered by mindfulmaisel
4

The SET field requires 5 bits

Explanation:

Total number of blocks given = (16,384)

by numerical analysis = (2^14 = 16,384)

According to the question, there are 2^14 blocks

and each block size is 2^8 bytes.

thus, size of the main - memory = 2^14 * 2^8

                                                    = 4MB

The TAG field requires = 22-(5+8) = 9 bits

thus, 9 bits for TAG, 5 bits for set, 8 bits

as there are 4 blocks in 1 set, 32 sets will be needed for 128 Blocks.

Thus, SET field requires 5 bits.

Similar questions