Question

# 1. Suppose we have a 32KB direct-mapped data cache with 32-byte blocks. a) Show how a...

1. Suppose we have a 32KB direct-mapped data cache with 32-byte blocks.
a) Show how a 32-bit memory address is divided into tag, index and offset. Show clearly how many bits are in each field.
b) How many total bits are there in this cache?
2. Suppose we have a 8KB direct-mapped data cache with 64-byte blocks.
a) Show how a 32-bit memory address is divided into tag, index and offset. Show clearly how many bits are in each field.
b) How many total bits are there in this cache?

#### Homework Answers

Answer #1

1. Given-

• Cache memory size = 32KB​​​​​​
• Block size = Frame size = Line size=32 byte
• Memory address = 32 byte

Number of Bits in Block Offset-

we have,

Block size

=32 byte

= bytes

Thus, Number of bits in block offset= 5 bits

Number of bits in index number-

Total number of the lines in cache

= Cache size/ Line size

=32 KB/32 bytes

= bytes/ bytes

= lines

Thus, Number of bits in index number= 10 bits

Number of bits in tag

= Number of bits in physical address – (Number of bits in index number + Number of bits in block offset)

=32 bits -(10 bits + 5 bits)

=32 bits - 15 bits

=17 bits

Thus, number of bits in tag= 17 bits

b. Size of cache memory

=32 KB

= bytes

Thus, total number of bits in cache= 15.

Know the answer?
Your Answer:

#### Post as a guest

Your Name:

What's your source?

#### Earn Coins

Coins can be redeemed for fabulous gifts.

##### Not the answer you're looking for?
Ask your own homework help question
ADVERTISEMENT
##### Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

ADVERTISEMENT