title: How does direct mapped cache work?
body: <p>I am taking a System Architecture course and I have trouble understanding how a direct mapped cache works.</p>
  
  <p>I have looked in several places and they explain it in a different manner which gets me even more confused.</p>
  
  <p>What I cannot understand is what is the Tag and Index, and how are they selected?</p>
  
  <p>The explanation from my lecture is:
  "Address divided is into two parts
  index (e.g 15 bits) used to address (32k) RAMs directly
  Rest of address, tag is stored and compared with incoming tag. "</p>
  
  <p>Where does that tag come from? It cannot be the full address of the memory location in RAM since it renders direct mapped cache useless (when compared with the fully associative cache).</p>
  
  <p>Thank you very much.</p>