edited by
5,926 views
7 votes
7 votes

How many total bits are required for a direct-mapped cache with $128$ KB of data and $1$ word block size, assuming a $32$-bit address and $1$ word size of $4$ bytes?

  1. $2$ Mbits
  2. $1.7$ Mbits
  3. $2.5$ Mbits
  4. $1.5$ Mbits
edited by

5 Answers

6 votes
6 votes

$\underline{\textbf{Answer:}\Rightarrow}\;\mathbf{1.5Mb}$

$\underline{\textbf{Explanation:}\Rightarrow}$

Data cache $=128\;\text{KB}$

Block Size $= 1\;\mathrm W = 4\;\text{Bytes} = 32 \;\text{bits}$

Main Memory address $=32$

Tag-bits (15) Index-bits(15) Block Offset(2)



$\therefore $ Number of cache lines $=\dfrac{\text{Cache Memory Size}}{\text{Block Size}} = \dfrac{128\;\mathbf{ KB}}{4\;\text{Bytes}} = \dfrac{2^{17}}{2^2}= 2^{15}$

Now,

$\text{Tag Memory Size} = \text{Number of lines in cache memory} \times \text{Tag space in the line} =2^{15}\times 15 \;\text{bit}$

$\text{Total Cache Size} = \text{Tag Memory size + Data Memory size } =2^{15} \times \left (15+32\;\text{}\right ) = 1.5 \text{Mb}$

edited by
1 votes
1 votes

Answer: d) 1.5 Mbits

Cache size = 128KB

Block size = 4B

 #lines = 32K

Physical address size = 32 bits

Tag | Line | Block

 15  |  15   |   2

Tag memory = 15 * $2^{15}$ b

Cache memory = 128 * $2^{10}$ B

Total memory = 32*15 + 128*8 Kb = 1504 Kb = 1.5 Mb 

0 votes
0 votes
2^15×16+128×2^10×2^3

=1.5Mbits

Here 2^15 is number of blocks in cache memory

Out of 16 bits 15 bits are for tag field and one bit for valid status bit

In cache the format is

Valid+tag+data

Since data is in bytes we converted it into bits

If you have any doubt go and watch professor raman videos on computer oraganisation

He explained same model and video is lecture 17
0 votes
0 votes
word addressable

we get 17 bits for tag and 15 for line number

so total cache size=( (2^17)+(128)*((2^10)*(8))bits=1.5Mbits
Answer:

Related questions

2 votes
2 votes
3 answers
1
Satbir asked Jan 13, 2020
3,679 views
Which of the following is an efficient method of cache updating?Snoopy writesWrite throughWrite withinBuffered write
6 votes
6 votes
5 answers
2
Satbir asked Jan 13, 2020
4,438 views
A computer which issues instructions in order, has only $2$ registers and $3$ opcodes $\text{ADD, SUB}$ and $\text{MOV}$. Consider $2$ different implementations of the fo...
4 votes
4 votes
5 answers
3
Satbir asked Jan 13, 2020
4,258 views
A stack organized computer is characterised by instructions withindirect addressingdirect addressingzero addressingindex addressing
9 votes
9 votes
1 answer
4