title: How to find Cache Hit or Miss given specific Hexadecimal Values?
body: <p>I have to write a C code that states whether a hex number has cache hit or miss depending on the following four variables:
  1. The size of address used in the cache (bit)
  2. The number of index bits (S = 2<sup>s</sup> is the number of sets)
  3. The number of line bits (E = 2<sup>e</sup> is the number of lines)
  4. The size of block bits (B = 2<sup>b</sup> is the block size)</p>
  
  <p>Let's say the size of the address is 64, the number of index bits is 4, number of line bits is 0, the size of block bits is 4. (64,4,0,4)</p>
  
  <p>How do I find whether the following hexadecimal values have a cache hit or miss
  10
  20
  22
  18
  E10
  210
  12</p>
  
  <p>I don't care so much about the specific answer, but rather how to find the answers. How does cache hit or miss vary depending on the four (64,4,0,4) numbers?</p>