Question

Given: An 8-bit computer system with 4 MB of main memory. It has a 16K-words direct-mapped cache with a block size of 16 Bytemultiply hifhlighted number by 4 and please explain

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Solution:

Given,

=>8-bit computer system

=>Size of main memory = 4 MB

=>Size of cache = 16 K words

=>Direct mapped cache

=>Block size = 16 bytes

=>Byte address = 5678 in decimal

=>Need to multiply byte address by 4.

Explanation:

Direct mapped cache:

Tag Cache index Block offset

8 bits                      10 bits                                      4 bits

Number of bits required for main memory address:

=>Number of bits required to express main memory address = log2(main memory size)

=>Number of bits required to express main memory address = log2(4 MB)

=>Number of bits required to express main memory address = log2(4*2^20 B) as 1 MB = 2^20 B

=>Number of bits required to express main memory address = log2(2^22 B)

=>Number of bits required to express main memory address = 22 bits

Number of bits required for cache index:

=>Size of cache = 16 K words

=>We know that system is 8-bits so 1 word = 8 bits

=>1 word = 1 byte as 1 byte = 8 bits

=>Size of cache = 16 KB

=>Number of blocks in the cache memory = Size of cache memory/size of cache block

=>Number of blocks in the cache memory = 16*1024 B/16 B as 1 KB = 1024 B

=>Number of blocks in the cache memory = 1024 blocks(0-1023)

=>Number of bits required for cache index = log2(number of blocks)

=>Number of bits required for cache index = log2(1024)

=>Number of bits required for cache index = log2(2^10)

=>Number of bits required for cache index = 10 bits

Number of bits required for block offset:

=>Number of bits required for block offset = log2(size of block)

=>Number of bits required for block offset = log2(16 B)

=>Number of bits required for block offset = log2(2^4 B)

=>Number of bits required for block offset = 4 bits

Number of bits required for tag:

=>Number of bits required for tag = 22 - 4 - 10

=>Number of bits required for tag = 8 bits

Calculating value of cache line number:

=>Mulitply the byte address by 4 = 4*5678

=>So calculated new address = 22712

=>In direct mapped cache byte address is mapped according to the relation: B mod P = i where B is the byte address of main memory, P is the number of blocks present in the cache memory and i the cache line number where the main memory block address is mapped.

=>22712 mod 1024 = 184 in decimal

=>Cache line number in hexadecimal = (B8)16

I have explained each and every part with the help of statements attached to it.

Add a comment
Know the answer?
Add Answer to:
multiply hifhlighted number by 4 and please explain Given: An 8-bit computer system with 4 MB...
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. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Given: An 8-bit computer system with 4 MB of main memory. It has a 16K-words direct-mapped...

    Given: An 8-bit computer system with 4 MB of main memory. It has a 16K-words direct-mapped cache with a block size of 16 Bytes. Sought: Calculate the cache line number when Byte address2271len from main memory is mapped to cache. Consider that numbering of main memory blocks and cache lines starts from zero. Express your answer in hexadecimal. It is required to show ALL incremental steps of the solution.

  • Please, multiply the highlighted yellow digit by 6 first then solve. thank you! Given: An 8-bit...

    Please, multiply the highlighted yellow digit by 6 first then solve. thank you! Given: An 8-bit computer system with 4 MB of main memory. It has a 16K-words direct-mapped cache with a block size of 16 Bytes. Sought: Calculate the cache line number when Byte address 5678ten from main memory is mapped to cache. Consider that numbering of main memory blocks and cache lines starts from zero. Express your answer in hexadecimal. It is required to show ALL incremental steps...

  • 3) Direct-Mapped Cache Determine the Cache line holding an address EEL 3801 UCF Given: An 8-bit...

    3) Direct-Mapped Cache Determine the Cache line holding an address EEL 3801 UCF Given: An 8-bit computer system with 4 MB of main memory. It has a 16K-words direct-mapped cache with a block size of 16 Bytes. Sought: Calculate the cache line number when Byte address 5678ten from main memory is mapped to cache. Consider that numbering of main memory blocks and cache lines starts from zero. Express your answer in hexadecimal. It is required to show ALL incremental steps...

  • A computer with a 24‐bit address bus has a main memory of size 16 MB and...

    A computer with a 24‐bit address bus has a main memory of size 16 MB and a cache size of 64 KB. The word length is two bytes. a. What is the address format for a direct mapped cache with a line size of 32 words? b. What is the address format for a fully associative cache with a line size of 32 words? c. What is the address format for a 4‐way set associative cache with a line size...

  • For a 16K-byte, direct-mapped cache, suppose the block size is 32 bytes, draw a cache diagram....

    For a 16K-byte, direct-mapped cache, suppose the block size is 32 bytes, draw a cache diagram. Indicate the block size, number of blocks, and address field decomposition (block offset, index, and tag bit width) assuming a 32-bit memory address.

  • Suppose a computer using direct mapped cache has 232 byte of byte-addressable main memory, and a...

    Suppose a computer using direct mapped cache has 232 byte of byte-addressable main memory, and a cache of 1024 blocks, where each cache block contains 32 bytes. a. How many blocks of main memory are there? b. What is the format of a memory address as seen by the cache, i.e., what are the sizes of the tag, block, and offset fields? c.To which cache block will the memory address 0x000063FA map?

  • Example 4.2 For all three cases, the example includes the following elements: The cache can hold...

    Example 4.2 For all three cases, the example includes the following elements: The cache can hold 64 Kbytes. Data are transferred between main memory and the cache in blocks of 4 bytes each. This means that the cache is organized as 16K = 214 lines of 4 bytes each. The main memory consists of 16 Mbytes, with each byte directly addressable by a 24-bit address (24 = 16M). Thus, for mapping purposes, we can consider main memory to consist of...

  • QUESTION 2 Suppose a computer using direct mapped cache has 216 bytes of byte-addressable main memory...

    QUESTION 2 Suppose a computer using direct mapped cache has 216 bytes of byte-addressable main memory and a cache of 64 blocks, where each cache block contains 32 bytes. a. How many blocks of main memory are there? b) What is the format of a memory address as seen by the cache, (include field names and their sizes) c) To which cache block will the memory address (F8C916 map? What address in that block does it map to?

  • please answer $5 UXIF map in the computer uses direct mapping Question 18 5 pts Suppose...

    please answer $5 UXIF map in the computer uses direct mapping Question 18 5 pts Suppose we have a byte-addressable computer using 2-way set associative mapping with 16-bit main memory addresses and 32 blocks of cache. Suppose also that each block contains 8 bytes. The size of the block offset field is bits, the bits. size of the set field is bits, and the size of the tag field is 5 pts Question 19 Suppose we have a byte-addressable computer...

  • 7.3 What is the memory layout of the 16-bit value, 0x7654 in a big-endian 16-bit machine,...

    7.3 What is the memory layout of the 16-bit value, 0x7654 in a big-endian 16-bit machine, and a little-endian 16-bit machine? b. What would the layouts be in 32-bit machines? 7.19 A certain two-way set-associative cache has an access time of 4 ns, compared to a miss time of 60 ns. Without the cache, main memory access time was 50 ns. Running a set of bench-marks with and without the cache indicated a speedup of 90%. What is the approximate...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT